Skip to content

Instantly share code, notes, and snippets.

@meaganewaller
Created May 21, 2013 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meaganewaller/5620662 to your computer and use it in GitHub Desktop.
Save meaganewaller/5620662 to your computer and use it in GitHub Desktop.
Attempting to do bundle install on any project, and I'm always having to install gems manually before continuing. Goes through all the gems, saying "Using [enter gem here]" and then it will get to a gem that says "Installing [gem here]", it will stall, and then give the output below. However, you can replace 'json(1.7.7)' and 'json -v '1.7.7' wi…
Errno::EACCES: Permission denied - /Users/meaganwaller/.rvm/gems/ruby-1.9.3-p392/build_info/json-1.7.7.info
An error occurred while installing json (1.7.7), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.7'` succeeds before bundling.
source 'http://rubygems.org'
gem 'rspec'
gem 'json', '~> 1.7.7'
gem 'pry'
gem 'guard-rspec'
gem 'simplecov', :require => false, :group => :test
@cpuguy83
Copy link

It looks like bundler can't write to your gems folder. Check the permissions on it... maybe just do:

chown -R meaganwaller /Users/meaganwaller/.rvm

@cpuguy83
Copy link

Also you can try just doing an rvm implode and then re-install rvm.

@gstark
Copy link

gstark commented May 21, 2013

What does:

ls -ld /Users/meaganwaller/.rvm/gems/ruby-1.9.3-p392/build_info
ls -ld /Users/meaganwaller/.rvm/gems/ruby-1.9.3-p392/
ls -ld /Users/meaganwaller/.rvm/gems/
ls -ld /Users/meaganwaller/.rvm/

Show?

Curious to see what the file permissions (read/write/execute) and file ownership is.

@gstark
Copy link

gstark commented May 21, 2013

Also with rvm you rarely (if ever?) need/want to "sudo gem" anything. This might be part of the problem. The "ls" steps above (to show us ownership and file permissions) might tell us if this is what happened. @cpuguy83's suggestion of imploding your RVM install may also be good, but might take longer than just fixing ownership and permissions.

@meaganewaller
Copy link
Author

@gstark & @cpuguy83 The problem was fixed using Brian's suggestion of the

chown -R meaganwaller /Users/meaganwaller/.rvm

Thanks for helping and looking into it! Very appreciated :)

@cpuguy83
Copy link

One should never do use sudo on a local rvm.

Even on a system-wide you can add your user to the rvm group and shouldn't need to use sudo either.
I'm finding I loathe system-wide RVM, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment