Specifying Rails Version

☆樱花仙子☆ 提交于 2019-12-18 07:02:57

问题


I decided to upgrade to Ruby 2.0.0 and Rails 4.0.0. I'm trying to set these as my default programs, by using this line:

rvm use 2.0.0@rails-4.0.0 --default

I get the error

Failed to load /Users/michaeldunnegan/.gemrc because it doesn't contain valid YAML hash

My .gemrc file is blank. I don't know what to do. I can't find any references at all.


回答1:


most likely it is not empty, there is a lot of UTF-8 characters that editor will not show you, just remove the file before continuing:

rm -f /Users/michaeldunnegan/.gemrc



回答2:


You need to make a gemset first:

rvm --default use 2.0.0
rvm gemset create rails-4.0.0
rvm use 2.0.0@rails-4.0.0 --default
gem install rails

I think that is right.



来源:https://stackoverflow.com/questions/18317896/specifying-rails-version

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