0

I have latest RVM installed in OX 10.9.

$ rvm rubies

* ruby-1.9.3-p545 [ x86_64 ]
=> ruby-2.1.1 [ x86_64 ]

$ rvm gemset list

gemsets for ruby-2.1.1 (found in /Users/rajveershekhawat/.rvm/gems/ruby-2.1.1)
(default)
global
rails403   
rails404
=> rails410

After this i installed rails.

$ gem install rails -v 4.1.0 

It got installed. It is also there in correct location within .rvm folder. But when I try using it, system says rails is not installed.

$ rails -v

Rails is not currently installed on this system. To get the latest version, simply type:

$ sudo gem install rails

You can then rerun your "rails" command.

I have tried it twice and still unable to figure out what am I am missing. Please help. Thanks.

This question is similar but is not helping.

Edits:

 $ gem list | grep rails
 rails (4.1.0)
 sprockets-rails (2.1.3)

 $ echo $PATH

 /Users/rajveershekhawat/.rvm/gems/ruby-2.1.1@rails410/bin:/Users/rajveershekhawat/.rvm/gems/ruby-2.1.1@global/bin:/Users/rajveershekhawat/.rvm/rubies/ruby-2.1.1/bin:/Users/rajveershekhawat/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

Update:

Seems like the rails was not properly installed before. I recreated the gemset and tried to intall rails again but got some error. Then I again emptied the gemset and reinstalled rails with sudo. This resolved the issue.

Community
  • 1
  • 1
Bot
  • 1,001
  • 2
  • 13
  • 32

1 Answers1

0

Try to run:

rvm use ruby-2.1.1@rails410
gem list

Can you find Rails here?

Why did you call sudo gem install rails, cant be this the problem, you do not need to use sudo.

kasi
  • 955
  • 1
  • 12
  • 21