How can I remove Ruby on Rails 4 beta?

余生长醉 提交于 2019-12-03 12:43:15

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

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).

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.

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.

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.

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