Pergunta

I'm trying to deploy my Ruby on Rails app on a Linode VPS with ArchLinux and I'm using Apache as web server.

Here is the Passenger error:

Error message: No such file or directory - config.ru
Exception class: Errno::ENOENT
Application root: /srv/http

Here is the backtrace:

[ 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>'

here is my /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>

following the official Passenger guide (4.3. Deploying to a sub URI) I've created a symlink to my app:

$ 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

I think that the problem is with that Application Root, that should be /srv/http/copisteria/current.

Foi útil?

Solução

/srv/http/copisteria is supposed to be a symlink to /srv/http/copisteria/current/public. In your current situation, /srv/http/copisteria is a directory.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top