How can I remove Ruby on Rails 4 beta?

后端 未结 5 1361
不思量自难忘°
不思量自难忘° 2021-02-15 12:49

I\'m new to Ruby and Rails and I installed the latest beta version of Rails 4 on my Mac, before I installed RVM to manage my versions. The Rails 4 beta is becoming a huge pain i

相关标签:
5条回答
  • 2021-02-15 13:02

    I had the same problem as ckarbass (Rails was still set at 4.0.0.rc1 when I entered rails -v). To solve it, I used Bernard Potocki's advice, but took into consideration that I had a different version.

    To make it possible for whatever version you may have, just do:

    gem uninstall rails

    Then, select the version of Rails 4 you have and delete it.

    Then, do:

    gem uninstall railties

    And do the same thing.

    When I uninstalled the Rails 4 version of railties, it told me that dependencies for a couple gems (coffee-rails and sass-rails) wouldn't be met. So I just did the same thing with both of them as I did above, and deleted their Rails 4 versions as well (for example, for sass-rails, I had a version installed called sass-rails-4.0.0.rc1).

    And done! The terminal now lists 3.2.13 as my current Rails version.

    0 讨论(0)
  • 2021-02-15 13:02

    I had the same problem with Rails 4.0.0 final version. I used all what was mentioned before with no success. What helped was listing all my gems, I'm using Windows, so it was:

    >pik gem list
    

    Then I checked the rails versions. It showed rails 3.2.14 (what I wanted) with railties 4.0.0, 4.0.0.rc2 and 3.2.14.

    I then ran

    gem uninstall railties
    

    and uninstalled all other versions except 3.2.14 and now it works well. The problem was that when Rails 3.2 installation is called, the latest (or all) versions of railties is installed.

    0 讨论(0)
  • 2021-02-15 13:11

    Try:

    $ gem uninstall rails -v=4.0.0.beta1
    

    or

    $ gem uninstall rails
    

    and you will be asked which version to uninstall (if there are more than one).

    0 讨论(0)
  • 2021-02-15 13:11

    Do

    $ gem uninstall rails
    

    and choose the version 4 beta as the one to uninstall. Do not worry about unmatched dependencies at this point. Just say 'yes' to go ahead with the uninstall.

    Once it is gone, do

    $ gem install rails
    

    This will get and install the latest released version for you.

    0 讨论(0)
  • 2021-02-15 13:16

    Except of uninstalling rails you need to uninstall railties gem - rails exec is only wrapper that will select most up-to-date railties gem.

    $ gem uninstall rails -v=4.0.0.beta1
    $ gem uninstall railties -v=4.0.0.beta1
    
    0 讨论(0)
提交回复
热议问题