[問題] 裝了兩份不同版本RUBY/RAILS時cluster的問題

看板Ruby作者 (那很好哇)時間16年前 (2008/11/05 17:30), 編輯推噓2(203)
留言5則, 2人參與, 最新討論串1/1
(ctrl + y 刪去不必要的行列) 環境: CENTOS 5.0 自己編譯了兩個不同版本的RUBY/RAILS 一、ruby 1.8.6 + rails 1.2.3 在/usr/local/ruby 二、ruby 1.8.7 + rails 2.1.2 在/usr/local/ruby187 各自有跑production的東西 狀況: PATH中並未設定預設路徑到兩者中的任一者目錄 在用1.8.7+2.1.2建立的程式目錄中跑mongrel_rails start是沒問題的 但如果用mongrel_rails cluster::start 就會出現rails版本錯誤如下 ########################################################################## ** Starting Mongrel listening at 0.0.0.0:49900 ** Starting Rails with production environment... Missing the Rails 2.1.2 gem. Please `gem install -v=2.1.2 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed. ########################################################################## 意思應該是說在/usr/local/ruby187/bin/下的mongrel_cluster的部份誤以 為自己是處在/usr/local/ruby/bin底下, 所以找不到2.1.2版的rails 這樣讓我無法用普通方式去啟動cluster..不知有無大大處理過此類情形 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 211.75.165.71

11/05 17:47, , 1F
就修改 mongrel_rails 裡面。不過老實講,還是盡量分開...
11/05 17:47, 1F

11/05 17:48, , 2F
不然很難保證會不會哪個 lib 又有什麼問題
11/05 17:48, 2F

11/05 20:01, , 3F
我也是在centos5.2裡安裝好幾種版本的rails.
11/05 20:01, 3F

11/05 20:02, , 4F
但是跑mongrel_rails cluster::start時並沒有任何問題
11/05 20:02, 4F

11/05 20:03, , 5F
不過我是只有用 ruby 1.8.6
11/05 20:03, 5F
文章代碼(AID): #194MV3Gs (Ruby)
文章代碼(AID): #194MV3Gs (Ruby)