質問

I am trying to get set up using rbenv and ruby on rails. Everything has been working fine (been working through Lynda.com Ruby on Rails Essential Training) until it came time to actually install the rails gem. It fails in the sam way every time. Can someone tell me what I need to do to continue with Rails?

I've used rbenv and have been set up with Ruby 2.1.1.

Provided Terminal Screenshot

Edit: I am calling sudo because when I try to install without sudo it provides the following (folder permissions provided for context) enter image description here

役に立ちましたか?

解決 2

I never actually set the local ruby version with rbenv local 2.1.1. Everything worked like a charm after that.

他のヒント

Assuming you have a working rbenv installation with 2.1.1 installed, you should just be able to remove sudo from the command:

gem install rails --no-rdoc --no-ri

Using sudo runs as root, which knows nothing of the local rbenv installation for your mattcoker user, so it uses the system's Ruby instead. Generally, when using rbenv locally on your machine, you should never need to use sudo.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top