Search code examples
ruby-on-railspassengerupstartforeman

foreman start fails with error "Please install daemon_controller first:"


I want to monitor my app with upstart. I'm exporting using

rvmsudo foreman export upstart /etc/init -a <my_app_name> -u ubuntu -l /var/<my_app_name>/log

It finishes successfully, but when i do

sudo start <my_app_name>

I get the following output and nothing happens

<my_app_name> start/running

my procfile

web: rvmsudo passenger start -p80 -e production
worker: rvmsudo bundle exec rake jobs:work RAILS_ENV=production

Its really frustrating because i can run the web and worker commands on different terminals individually. So I tried to just do a foreman start and this fails with the following error

 *** ERROR ***
Please install daemon_controller first:
/usr/local/rvm/gems/ruby-2.0.0-p594/wrappers/gem install daemon_controller

The frustrating bit is that daemon controller is installed and i can see it when i do gem list

Maybe my whole approach to this is wrong can someone please point me in the right direction?


Solution

  • Here's the line in passenger that returns that error, so it looks as though it really can't find daemon_controller as it's rescuing a LoadError. Try updating your web process to run via bundle exec also:

    web: rvmsudo bundle exec passenger start -p80 -e production