作者shelary (喵小咩)
看板Ruby
標題[問題] Rails版本如何使用舊版?
時間Mon Oct 27 20:51:56 2008
環境:
Rails 2.1.0 / 2.0.2 / 1.2.3
狀況:
我是 Linux 的主機, 已經用 gem 安裝過很多種版本的 Rails
使用 gem list 列出來的是:
*** LOCAL GEMS ***
actionmailer (2.1.0, 2.0.2, 2.0.1, 1.3.3)
actionpack (2.1.0, 2.0.2, 2.0.1, 1.13.6, 1.13.3)
actionwebservice (1.2.6, 1.2.3)
activerecord (2.1.0, 2.0.2, 2.0.1, 1.15.6, 1.15.3)
activeresource (2.1.0, 2.0.2, 2.0.1)
activesupport (2.1.0, 2.0.2, 2.0.1, 1.4.4, 1.4.2)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10, 1.0.9)
fastthread (1.0.1)
gd2 (1.1.1)
gem_plugin (0.2.3)
json (1.1.3, 1.1.2)
mongrel (1.1.5, 1.1.4)
mongrel_cluster (1.0.5)
mysql (2.7)
rails (2.1.0, 2.0.2, 2.0.1, 1.2.3)
rake (0.8.1)
ruby-aes-optimized (1.1)
rubygems-update (1.2.0, 1.0.1)
rubyscript2exe (0.5.3)
sources (0.0.1)
will_paginate (2.2.2)
也就是說我的 Rails 有四種版本
現在如果要用 rails 建立新專案時, rails 都會自動使用最新的版本
但因為某些套件不能在 rails 2.1.0 下執行
所以希望能用回舊版的 rails 2.0.2 來跑
但是不知道怎樣在建立新專案時指定 rails 版本
如果無法指定版本, 我希望把 rails 2.1.0 版移除掉
但是也不知道要怎樣移除 >_<
書上都只有提到怎麼安裝......沒有說怎麼移除 Orz
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.126.63.121
推 godfat:$ rails _2.0.2_ your_old_rails_project 10/27 20:57
→ godfat:$ sudo gem uninstall rails -v 2.1.0 10/27 20:58
→ wangaguo:config/environment.rb, RAILS_GEM_VERSION = '2.1.1' 10/29 14:07
→ wangaguo:RAILS_GEM_VERSION改了版本就會用那個版本, 記得restart 10/29 14:09
→ shelary:感謝感謝.可以了.不過光改RAILS_GEM_VERSION還是會不相容 10/30 22:59
推 janyfor:可以在生成專案時指定 rails 版本喔 實際指令我不清楚 10/31 12:11
→ janyfor:但是 aptana 可以選擇 10/31 12:11
→ janyfor:移除的話 gem uninstall rails版本, 不知道可不可行 10/31 12:22
→ janyfor:aptana 同上也可用比較直覺的方式移除 10/31 12:22
→ janyfor:沒注意到版主都回了 =_______= 10/31 12:29