RVM doesn't set correct gem path

£可爱£侵袭症+ 提交于 2019-11-27 21:24:17

So after 1 1/2 days of torture, reading through at least 50 post, and installing rvm / ruby / rails at least 15 different times, I am finally able to use Rails in my RVM install. This was the last series of events that I did after installing RVM and Ruby on last and then it worked. I hope this helps others...

Removed from .gemrc (back up your file if you do this)...

  • gemhome: /home/[user]/ruby/gems
  • gempath: []
  • --remote

THEN rvm use 1.9.3 --default

THEN gem install rails

It seems the trick for was:

  1. change the .gemrc file
  2. Don't create and use a gemset (rvm use 1.9.3@rails3) before installing rails.

Make sure you're always 'using' your ruby version (ugh rvm can be so annoying).

rvm use 1.9.3 --default

Also what does your .gemrc look like? I had to take out --user from mine.

make sure you do a gem install rails after setting the default Ruby version, e.g.

  rvm use 1.9.2-head
  gem install rails

and then check again 'which rails'

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!