1

So while doing bundle install I get a JSON error saying

An error occurred while installing json (1.8.6), and Bundler cannot
continue.
Make sure that `gem install json -v '1.8.6'` succeeds before bundling.

then I try

gem install json -v 1.8.6

but it spits out

ERROR:  While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /var/lib/gems/2.3.0 directory.

Why does it do this and why cant I bundle install

1 Answers1

0

Per the answer in https://stackoverflow.com/a/2619731/1949363 try changing you GEMPATH to be in a location your user has access. You could use sudo but will likely lead to access issues later.

export GEM_HOME=~/.gem
export GEM_PATH=~/.gem
srt32
  • 1,260
  • 1
  • 14
  • 27