私はRubyonRailsアプリをArchLinuxを使用するLinodeVPSにデプロイしようとしていますが、WebサーバーとしてApacheを使用しています。
乗客のエラーは次のとおりです。
Error message: No such file or directory - config.ru
Exception class: Errno::ENOENT
Application root: /srv/http
バックトレースは次のとおりです。
[ pid=14560 thr=76553200 file=utils.rb:176 time=2012-10-25 13:28:10.796 ]: *** Exception Errno::ENOENT in PhusionPassenger::Rack::ApplicationSpawner (No such file or directory - config.ru) (process 14560, thread #<Thread:0x92037e0>):
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/lib/phusion_passenger/utils.rb:675:in `lstat'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/lib/phusion_passenger/utils.rb:675:in `lower_privilege'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/lib/phusion_passenger/utils.rb:198:in `prepare_app_process'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/lib/phusion_passenger/rack/application_spawner.rb:156:in `block in initialize_server'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/lib/phusion_passenger/utils.rb:563:in `report_app_init_status'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/lib/phusion_passenger/rack/application_spawner.rb:154:in `initialize_server'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server.rb:204:in `start_synchronously'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server.rb:180:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/lib/phusion_passenger/rack/application_spawner.rb:129:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/lib/phusion_passenger/spawn_manager.rb:253:in `block (2 levels) in spawn_rack_application'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/lib/phusion_passenger/spawn_manager.rb:246:in `block in spawn_rack_application'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize'
from <internal:prelude>:10:in `synchronize'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/lib/phusion_passenger/spawn_manager.rb:244:in `spawn_rack_application'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/helper-scripts/passenger-spawn-server:99:in `<main>'
これが私の/etc/httpd/conf/extra/httpd-vhosts.confです
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin info@stanosas.it
DocumentRoot /srv/http
ServerName stanosas.it
ErrorLog "/var/log/httpd/stanosas.it-error_log"
CustomLog "/var/log/httpd/stanosas.it-access_log" common
<Directory /srv/http>
Allow from all
</Directory>
RackBaseURI /copisteria
<Directory /srv/http/copy>
Options -MultiViews
</Directory>
</VirtualHost>
公式の乗客ガイド(4.3。サブURIへのデプロイ)に従って、アプリへのシンボリックリンクを作成しました。
$ ls -la /srv/http
total 197580
drwxr-xr-x 7 root root 4096 Oct 25 13:07 .
drwxr-xr-x 4 root root 4096 Jul 7 14:23 ..
drwxrwxr-x 4 mylinode root 4096 Oct 1 18:40 copisteria
lrwxrwxrwx 1 root root 35 Oct 25 13:07 copy -> /srv/http/copisteria/current/public
-rw-r--r-- 1 root root 972 Aug 8 18:48 index.html
問題はそれだと思いますApplication Root
、それはそうあるべきです/srv/http/copisteria/current
。