Не могу запустить единорога.

Я пытаюсь запустить свое приложение с единорогом, но не могу запустить. У меня ошибка аргумента parse_rackup_file: rackup file (config.ru) not readable (ArgumentError)

Моя среда — rbenv ruby1.9.3 и rails 3.1.3.

Что случилось?

Mac-mini:rails_app Macmini$ cap deploy:start
  * executing `deploy:start'
  * executing "cd /home/deployer/public_html/rails_app/current/; bundle exec unicorn -c /home/deployer/public_html/rails_app/current/config/unicorn.rb -E production -D"
    servers: ["211.125.67.15"]
    [211.125.67.15] executing command
*** [err :: 211.125.67.15] /home/deployer/public_html/rails_app/shared/bundle/ruby/1.9.1/gems/unicorn-4.3.1/lib/unicorn/configurator.rb:610:in `parse_rackup_file': rackup file (config.ru) not readable (ArgumentError)
*** [err :: 211.125.67.15] from /home/deployer/public_html/rails_app/shared/bundle/ruby/1.9.1/gems/unicorn-4.3.1/lib/unicorn/configurator.rb:76:in `reload'
*** [err :: 211.125.67.15] from /home/deployer/public_html/rails_app/shared/bundle/ruby/1.9.1/gems/unicorn-4.3.1/lib/unicorn/configurator.rb:67:in `initialize'
*** [err :: 211.125.67.15] from /home/deployer/public_html/rails_app/shared/bundle/ruby/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:104:in `new'
*** [err :: 211.125.67.15] from /home/deployer/public_html/rails_app/shared/bundle/ruby/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:104:in `initialize'
*** [err :: 211.125.67.15] from /home/deployer/public_html/rails_app/shared/bundle/ruby/1.9.1/gems/unicorn-4.3.1/bin/unicorn:121:in `new'
*** [err :: 211.125.67.15] from /home/deployer/public_html/rails_app/shared/bundle/ruby/1.9.1/gems/unicorn-4.3.1/bin/unicorn:121:in `<top (required)>'
*** [err :: 211.125.67.15] from /home/deployer/public_html/rails_app/shared/bundle/ruby/1.9.1/bin/unicorn:23:in `load'
*** [err :: 211.125.67.15] from /home/deployer/public_html/rails_app/shared/bundle/ruby/1.9.1/bin/unicorn:23:in `<main>'
*** [err :: 211.125.67.15] master failed to start, check stderr log for details
    command finished in 1021ms
failed: "env RBENV_ROOT=/usr/local/rbenv PATH=/usr/local/rbenv/shims:/usr/local/rbenv/bin:$PATH sh -c 'cd /home/deployer/public_html/rails_app/current/; bundle exec unicorn -c /home/deployer/public_html/rails_app/current/config/unicorn.rb -E production -D'" on 211.125.67.15
Mac-mini:rails_app Macmini$ 

person DIGITALSQUAD    schedule 26.05.2012    source источник
comment
Я не знаю, где журнал stderr...   -  person DIGITALSQUAD    schedule 26.05.2012
comment
Не знаю почему, но теперь работает нормально.   -  person DIGITALSQUAD    schedule 26.05.2012


Ответы (1)


Я решил эту проблему, добавив

working_directory("/path/to/rails_root") 

внутри config/unicorn.rb

Вы можете обратиться к документации здесь: http://unicorn.bogomips.org/Unicorn/Configurator.html#method-i-working_directory

person greenif    schedule 10.09.2012