SuperString
SuperString

Reputation: 22549

rails new error

When I run rails new app...I get this error

/Library/Ruby/Site/1.8/rubygems/specification.rb:542:in `read': Permission denied - /Library/Ruby/Gems/1.8/specifications/coffee-script-source-1.2.0.gemspec (Errno::EACCES)
from /Library/Ruby/Site/1.8/rubygems/specification.rb:542:in `load'
from /Library/Ruby/Site/1.8/rubygems/specification.rb:269:in `_all'
from /Library/Ruby/Site/1.8/rubygems/specification.rb:268:in `each'
from /Library/Ruby/Site/1.8/rubygems/specification.rb:268:in `_all'
from /Library/Ruby/Site/1.8/rubygems/specification.rb:267:in `reverse_each'
from /Library/Ruby/Site/1.8/rubygems/specification.rb:267:in `_all'
from /Library/Ruby/Site/1.8/rubygems/specification.rb:409:in `each'
from /Library/Ruby/Site/1.8/rubygems/dependency.rb:216:in `find_all'
from /Library/Ruby/Site/1.8/rubygems/dependency.rb:216:in `matching_specs'
from /Library/Ruby/Site/1.8/rubygems/dependency.rb:238:in `to_specs'
from /Library/Ruby/Site/1.8/rubygems/dependency.rb:256:in `to_spec'
from /Library/Ruby/Site/1.8/rubygems.rb:1208:in `gem'
from /usr/bin/rails:18

I can bypass this by running as root but that has problems when I do. Why am I getting this error/how do I fix it?

Upvotes: 0

Views: 1220

Answers (1)

Max
Max

Reputation: 15985

Use RVM. It will make your life a lot easier. The problem is that your normal user account does not have access to that file. RVM, by default, stores gems and ruby files as the user who installed RVM, so you shouldn't have any problem. You can easily switch versions of Ruby this way, and I would recommend upgrading to 1.9.3.

Upvotes: 1

Related Questions