Every time I close terminal rails defaults back to 2.3.5 from 3.0.3?

后端 未结 4 1650
再見小時候
再見小時候 2021-01-28 21:48

I\'m going through the rails by example tutorial.

Its seems that every time I close terminal rails defaults back to 2.3.5 & I have to go through the process of insta

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-28 22:26

    The problem is almost-assuredly RVM interpreting 2.3.5 as your default rails version in your default gem set. I ran into this problem myself when first experimenting with RVM. Try this:

    rvm --default use 1.9.2 (or whatever you want your default ruby interpreter to be)
    rvm gemset create rails-3.0.3
    rvm use 1.9.2@arails-3.0.3 --default
    gem install rails
    

    That will:

    • Set your default ruby interpreter to the desired ruby version
    • Create a gemset for your Rails 3.0.3 install and make it your default gemset
    • Install rails

    Once you close the terminal and open it back up, it'll load RVM's defaults, putting you back on Rails 3.0.3 again.

提交回复
热议问题