2012-02-02 39 views
0

好吧,所以我有一個新的亞馬遜Ubuntu的11.04 ec2實例和所有似乎偉大的乘客和紅寶石和rvm。 OK,所以我的apache2.conf有這個乘客+ RVM + Ubuntu的11.04服務器==問題

LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-3.0.11/ext/apache2/mod_passenger.so 
    PassengerRoot /var/lib/gems/1.8/gems/passenger-3.0.11 
    PassengerRuby /home/ubuntu/.rvm/bin/ruby 

    # PassengerRuby /home/ubuntu/.rvm/gems/ruby-1.9.2-p290 
    #LoadModule passenger_module /home/ubuntu/.rvm/gems/[email protected]/gems/passenger-3.0.11/ext/apache2/mod_passenger.c 
    #PassengerRoot /home/ubuntu/.rvm/gems/[email protected]/gems/passenger-3.0.11 

我有些評論,因爲我已經嘗試了各種變化來獲得RVM和乘客的共同努力。

我的虛擬主機是這樣的

<VirtualHost *:80> 
    ServerAdmin [email protected] 
    ServerName logicxl.com 
    # ServerAlias 
    DocumentRoot /srv/crm/current/public 
    ErrorLog /srv/crm/logs/error.log 

     <Directory "/srv/crm/current/public"> 
     Options Indexes MultiViews FollowSymLinks 
     Order allow,deny 
     Allow from all 
     </Directory> 
</VirtualHost> 

URL是logicxl.com但你可以看到有耙錯誤

Could not find rake-0.9.2.2 in any of the sources (Bundler::GemNotFound) 

,但我沒有捆綁安裝,並得到這個

/srv/crm/current$ bundle install 
Using rake (0.9.2.2) 
.... 
.... 
.... 
Using thin (1.3.1) 
Using uglifier (1.2.2) 
Using unicorn (4.1.1) 
Using will_paginate (3.0.2) 
Using yajl-ruby (1.1.0) 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. 

所以寶石安裝,但錯誤仍然存​​在....我假設有問題與正在使用的紅寶石和正在使用哪些寶石......但我已經嘗試過幾乎一切得到這個工作...任何幫助,將不勝感激..

回答

1

您是否嘗試過進行全系統的安裝RVM (它就像普通的安裝,但以root身份登錄)?

此外,嘗試使用Capistrano(with RVM support)部署您的應用程序,而不是手動複製文件並運行bundler。有很多關於它的教程。它會確保你正確安裝你的gem依賴。

+0

我正在部署與capistrano ....但我如何與RVM支持,以及如何做系統安裝的rvm ...我以爲我安裝了它 – Trace 2012-02-02 03:39:08

+0

正如我在我的回答中所說,系統範圍的安裝與常規安裝類似,但是您會以root用戶身份登錄。嘗試使用當前的RVM(使用'rvm implode')並以root身份登錄時重新安裝。 – 2012-02-02 03:47:43

+0

並且爲您的Capistrano食譜添加RVM支持,請閱讀:http://beginrescueend.com/integration/capistrano/ – 2012-02-02 03:49:12

0

找到rake-0.9.2.2 gem是否在你的/home/ubuntu/.rvm/bin/ruby路徑中,我想問題是乘客ruby在全局找不到rake gem,試試gem install rake -v = 0.9。 2.2