Вопрос

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