2013-04-26 95 views
0

我是ruby/rails新手。安裝Redmine的乘客

我想安裝Redmine,但我無法啓動應用程序。

我的安裝包括centos 6,apache,mysql,passenger。

RubyGems Environment: 
    - RUBYGEMS VERSION: 2.0.3 (upgrade from 1.8.7) 
    - RUBY VERSION: 1.9.3 (2013-02-22 patchlevel 392) [x86_64-linux] 
    - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.9.1 
    - RUBY EXECUTABLE: /usr/local/bin/ruby 
    - EXECUTABLE DIRECTORY: /usr/local/bin 
    - RUBYGEMS PLATFORMS: 
     - ruby 
     - x86_64-linux 
    - GEM PATHS: 
     - /usr/local/lib/ruby/gems/1.9.1 
     - /root/.gem/ruby/1.9.1 
    - GEM CONFIGURATION: 
     - :update_sources => true 
     - :verbose => true 
     - :backtrace => false 
     - :bulk_threshold => 1000 
    - REMOTE SOURCES: 
    - https://rubygems.org/ 

Apache的配置文件:

LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/ext/apache2/mod_passenger.so 
PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19 
PassengerRuby /usr/local/bin/ruby 

<VirtualHost *:80> 
    ServerAdmin [email protected] 
    ServerAlias redmine.example.com 

    PassengerSpawnMethod smart 
    PassengerPoolIdleTime 300 
    RailsFrameworkSpawnerIdleTime 0 
    PassengerMaxRequests 5000 
    PassengerStatThrottleRate 5 
    PassengerMinInstances 3 
    RailsEnv production 

    DocumentRoot /var/www/html/redmine/public 
    <Directory /> 
    Options FollowSymLinks 
    AllowOverride All 
    </Directory> 

    <Directory /var/www/html/redmine/public/> 
    RackBaseURI /redmine 
    Options -MultiViews 
    AllowOverride All 
    Order allow,deny 
    allow from all  
    </Directory> 
</VirtualHost> 

下面是我收到的錯誤。

[error] *** Passenger could not be initialized because of this error: Unable to start the Phusion Passenger watchdog because its executable (/usr/lib/phusion passenger/agents/PassengerWatchdog) does not exist. This probably means that your Phusion Passenger installation is broken or incomplete, or that your 'PassengerRoot' directive is set to the wrong value. Please reinstall Phusion Passenger or fix your 'PassengerRoot' directive, whichever is applicable. 
[Fri Apr 26 17:27:29 2013] [notice] Apache/2.2.15 (Unix) DAV/2 Phusion_Passenger/3.0.19 PHP/5.3.3 configured -- resuming normal operations 
[Fri Apr 26 17:27:33 2013] [error] [client 173.161.44.5] File does not exist: /var/www/html/redmine/public/index.html 
[Fri Apr 26 17:27:34 2013] [error] [client 173.161.44.5] File does not exist: /var/www/html/redmine/public/index.html 
[Fri Apr 26 17:27:35 2013] [error] [client 173.161.44.5] File does not exist: /var/www/html/redmine/public/index.html 
[Fri Apr 26 17:27:37 2013] [error] [client 173.161.44.5] File does not exist: /var/www/html/redmine/public/redmine.html 

第二個錯誤:

[error] *** Passenger could not be initialized because of this error: Unable to start the Phusion Passenger watchdog because its executable (/usr/lib/phusion-passenger/agents/PassengerWatchdog) does not exist. This probably means that your Phusion Passenger installation is broken or incomplete, or that your 'PassengerRoot' directive is set to the wrong value. Please reinstall Phusion Passenger or fix your 'PassengerRoot' directive, whichever is applicable. 
[Fri Apr 26 17:32:42 2013] [notice] Apache/2.2.15 (Unix) DAV/2 Phusion_Passenger/3.0.19 PHP/5.3.3 configured -- resuming normal operations 
[Fri Apr 26 17:32:50 2013] [error] [client 173.161.44.5] File does not exist: /var/www/html/redmine/public/redmine.html 
[Fri Apr 26 17:32:52 2013] [error] [client 173.161.44.5] File does not exist: /var/www/html/redmine/public/redmine.html 

什麼想法?

回答

0

您可能已經通過APT安裝了Phusion Passenger,現在您的Apache已經加載了兩個相沖突的Phusion Passenger版本。您應該搜索所有Apache配置文件,並刪除與通過APT安裝的版本(特別是LoadModule和PassengerRoot指令)相關的任何配置片段。

0

升級到Ubuntu 14.04後,我有完全相同的問題。這是幾個問題,其中一個是我安裝了多名乘客。

#Remove old installs, just in case 
gem uninstall passenger 
apt-get uninstall libapache2-mod-passenger 
#Reinstall 
apt-get install libapache2-mod-passenger 
#Rebuild passenger module 
passenger-install-apache2-module 
#FOLLOW ALONG, apt-get things it tells you too 
#Copy the snippet it leaves you at the end 
#Paste snippet into your appropriate apache2 sites file 
service apache2 restart 

現在乘客正確加載