It is likely that you need to grant write permissions for that path.
What
bundle install時に以下のエラーが発生しました。
There was an error while trying to write to `xxx`. It is likely that you need to grant write permissions for that path.
Solution
エラー文通り、権限関連のエラーです。
以下で権限を与えることで、解決できます。
$ sudo chown <ユーザー名> <ファイル名 (絶対パス)>