문제

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