Error message:no such file to load -- dispatcher
Ubuntu 系統內建的 libapache2-mod-passenger 版本不夠新,以至於有些 modules 找不到,解法就是改用 gem 來安裝
$ sudo apt-get libapache2-mod-passenger
$ cat /etc/apache2/mods-available/passenger.load
LoadModule passenger_module /usr/lib/apache2/modules/mod_passenger.so
$ cat /etc/apache2/mods-available/passenger.conf
<IfModule mod_passenger.c>
PassengerRoot /usr
PassengerRuby /usr/bin/ruby
</IfModule>
$ dpkg -l | grep passenger
ii libapache2-mod-passenger 2.2.11debian-2 Rails and Rack support for Apache2
改用 gem 裝法:
$ sudo gem install passenger
$ sudo passenger-install-apache2-module
$ sudo vim /etc/apache2/mods-available/passenger.load
#LoadModule passenger_module /usr/lib/apache2/modules/mod_passenger.so
LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-3.0.19/ext/apache2/mod_passenger.so
$ sudo vim /etc/apache2/mods-available/passenger.conf
<IfModule mod_passenger.c>
#PassengerRoot /usr
#PassengerRuby /usr/bin/ruby
PassengerRoot /var/lib/gems/1.8/gems/passenger-3.0.19
PassengerRuby /usr/bin/ruby1.8
</IfModule>
$ sudo service apache2 reload
$ sudo gem list | grep passenger
passenger (3.0.19)
沒有留言:
張貼留言