I am able to start Puma using this command: $HOME/.rbenv/bin/rbenv exec bundle exec puma -C /home/deploy/tasks/shared/puma.rb --daemon -p 3000 And the app is working serving all pages. I do not have Nginx or Apache installed yet. I am trying to have first and Upstart Puma script developed first. Running the command:
$ sudo start puma-manager
puma-manager start/running
gives me the impression that everything is ok while in reality the command
$ ps -ef | grep puma
returns nothing. Digging more into the log file
$ sudo tail -f /var/log/upstart/puma-_home_deploy_tasks_current.log
I am getting an error like this:
[2889] Puma starting in cluster mode...
[2889] * Version 3.6.0 (ruby 2.3.1-p112), codename: Sleepy Sunday Serenity
[2889] * Min threads: 5, max threads: 5
[2889] * Environment: development
[2889] * Process workers: 2
[2889] * Preloading application
[2889] ! Unable to load application: LoadError: Could not load the 'listen' gem. Add `gem 'listen'` to the development group of your Gemfile
bundler: failed to load command: puma (/home/deploy/tasks/shared/bundle/ruby/2.3.0/bin/puma)
LoadError: Could not load the 'listen' gem. Add `gem 'listen'` to the development group of your Gemfile
/home/deploy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
/home/deploy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
/home/deploy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/home/deploy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
Don't know how to fix this and move forward with the Puma settings?