我决定完全删除rails 4.0.0.rc1并安装rails 3.2.13。
我需要有关如何删除rails 4.0.0.rc1的说明。
答案 0 :(得分:6)
你可以试试这个:
gem uninstall rails -v 4.0.0.rc1
<强>更新强>
gem uninstall railties
或者如果您已经安装了更多版本:
gem uninstall railties -v 4.0.0.rc1
您可以使用gem list rails
当然,你可以在你想要的宝石之后安装:
gem install rails -v 3.2.13
答案 1 :(得分:3)
ERROR: While executing gem ... (Gem::InstallError) gem "rails" is not installed
输入:
sudo gem uninstall rails -v 4.0.0
然后输入:
sudo gem uninstall railties
命令行会提示您类似的内容:
Select gem to uninstall:
1. railties-3.2.13
2. railties-4.0.0
3. All versions
通过键入相应的数字选择要卸载的版本。在这种情况下2。
答案 2 :(得分:0)
我尝试了以上所有内容,对我有用的东西略有不同。这是我做的 -
tej@ubuntu:~/Rails$ gem list
*** LOCAL GEMS ***
actionmailer (3.2.6)
actionpack (3.2.6)
activemodel (3.2.6)
activerecord (3.2.6)
activeresource (3.2.6)
activesupport (3.2.6)
arel (3.0.2)
blankslate (2.1.2.4)
builder (3.0.0)
bundler (1.3.5, 1.1.4)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.3.3)
erubis (2.7.0)
execjs (1.4.0)
hike (1.2.1)
hoe (3.0.3)
i18n (0.6.0)
journey (1.0.3)
jquery-rails (2.0.2)
mail (2.4.4)
mime-types (1.19)
minitest (3.2.0)
multi_json (1.3.6)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.6)
railties (3.2.6)
rake (0.9.2.2)
rchardet (1.3)
rdoc (3.9.4)
sass (3.1.19)
sass-rails (3.2.5)
sprockets (2.4.3, 2.1.3)
sqlite3 (1.3.6)
thor (0.15.3)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)
uglifier (1.2.5)
yajl-ruby (1.1.0)
**tej@ubuntu:~/Rails$ which rails**
/usr/bin/rails
tej@ubuntu:~/Rails$ ls -l /usr/bin/rails
-rwxr-xr-x 1 root root 206 Jun 30 2012 /usr/bin/rails
tej@ubuntu:~/Rails$ ls -l /usr/bin/rails
-rwxr-xr-x 1 root root 206 Jun 30 2012 /usr/bin/rails
tej@ubuntu:~/Rails$ dpkg -S /usr/bin/rails
ruby-railties-3.2: /usr/bin/rails
**tej@ubuntu:~/Rails$ sudo apt-get remove ruby-railities-3.2**
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ruby-railities-3.2
E: Couldn't find any package by regex 'ruby-railities-3.2'
tej@ubuntu:~/Rails$ sudo apt-get remove ruby-railties-3.2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
bundler libc-ares2 libev4 libjs-coffeescript libjs-jquery-ui libjs-prototype
libjs-scriptaculous libv8-3.8.9.20 nodejs rake ruby-actionmailer-3.2
ruby-actionpack-3.2 ruby-activemodel-3.2 ruby-activerecord-3.2
ruby-activeresource-3.2 ruby-activesupport-3.2 ruby-arel ruby-blankslate
ruby-builder ruby-coffee-script ruby-coffee-script-source ruby-dev
ruby-erubis ruby-execjs ruby-hike ruby-hoe ruby-i18n ruby-journey ruby-mail
ruby-mime-types ruby-minitest ruby-multi-json ruby-polyglot ruby-rack
ruby-rack-cache ruby-rack-ssl ruby-rack-test ruby-rchardet ruby-sass
ruby-sprockets ruby-sqlite3 ruby-text-format ruby-thor ruby-tilt ruby-tmail
ruby-treetop ruby-tzinfo ruby-uglifier ruby-yajl rubygems-integration
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
ruby-coffee-rails ruby-jquery-rails ruby-rails-3.2 ruby-railties-3.2
ruby-sass-rails
0 upgraded, 0 newly installed, 5 to remove and 223 not upgraded.
After this operation, 1,392 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 173785 files and directories currently installed.)
Removing ruby-coffee-rails ...
Removing ruby-jquery-rails ...
Removing ruby-rails-3.2 ...
Removing ruby-sass-rails ...
Removing ruby-railties-3.2 ...
**tej@ubuntu:~/Rails$ gem list**
*** LOCAL GEMS ***
actionmailer (3.2.6)
actionpack (3.2.6)
activemodel (3.2.6)
activerecord (3.2.6)
activeresource (3.2.6)
activesupport (3.2.6)
arel (3.0.2)
blankslate (2.1.2.4)
builder (3.0.0)
bundler (1.3.5, 1.1.4)
coffee-script (2.2.0)
coffee-script-source (1.3.3)
erubis (2.7.0)
execjs (1.4.0)
hike (1.2.1)
hoe (3.0.3)
i18n (0.6.0)
journey (1.0.3)
mail (2.4.4)
mime-types (1.19)
minitest (3.2.0)
multi_json (1.3.6)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.1)
rake (0.9.2.2)
rchardet (1.3)
rdoc (3.9.4)
sass (3.1.19)
sprockets (2.4.3, 2.1.3)
sqlite3 (1.3.6)
thor (0.15.3)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)
uglifier (1.2.5)
yajl-ruby (1.1.0)
tej@ubuntu:~/Rails$
答案 3 :(得分:0)
你可以试试这个:
sudo apt purge rails