Reputation: 4511
I installed Rails. While creating a new application with the command:
rails new myapp
The following error messages occur:
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Installing rake (10.1.0)
Errno::EACCES: Permission denied - /usr/local/lib/ruby/gems/2.0.0/build_info/rake-10.1.0.info
An error occurred while installing rake (10.1.0), and Bundler cannot continue.
Make sure that `gem install rake -v '10.1.0'` succeeds before bundling.
The version of my gem is 4.0.0.
Upvotes: 1
Views: 827
Reputation: 696
This seems to be a bundler issue with the recent versions of rubygems. See https://github.com/bundler/bundler/issues/2445 for details.
Upvotes: 0
Reputation: 1590
If you want to avoid sudo
to make bundler install the gems into your ~/.gem/ruby/2.0.0
directory, try setting the $GEM_HOME
environment variable:
export GEM_HOME="$HOME/.gem/ruby/2.0.0"
Upvotes: 0
Reputation: 4446
This is unlikely to be a rake issue, since rake uses the generic gem install mechanism. My guess is that you have permissions screwed up in the gem install directory.
You can do:
gem env gemdir
to see where gems are being installed. Check the permissions in that area to make sure everything is writeable by you.
Upvotes: 1
Reputation: 2672
This seems to be permission problem so change the permission of the directory and then try:
gem install rake -v '10.1.0'
and post the logs if an error happens.
Or try:
sudo gem install rake -v '10.1.0'
and then post the logs if there is an error again.
Upvotes: 3