puma / puma-dev

A tool to manage rack apps in development with puma

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I run an Hanami app via puma-dev?

momolog opened this issue · comments

Starting my small Hanami application via

bundle exec hanami server

works fine.
Serving it with puma-dev fails, however, I am getting this in ~/Library/Logs/puma-dev.log:

! Booting app 'zipper-b2957350' on socket /Users/alexander/.puma-dev/zipper/tmp/puma-dev-800.sock
zipper-b2957350[79711]: bash: no job control in this shell
zipper-b2957350[79711]: sourcing /etc/profile
zipper-b2957350[79711]: Interactive
zipper-b2957350[79711]: Login shell
zipper-b2957350[79711]: sourcing .bash_profile
zipper-b2957350[79711]: sourcing .profile
zipper-b2957350[79711]: Puma starting in single mode...
zipper-b2957350[79711]: * Puma version: 5.3.2 (ruby 2.7.1-p83) ("Sweetnighter")
zipper-b2957350[79711]: *  Min threads: 0
zipper-b2957350[79711]: *  Max threads: 5
zipper-b2957350[79711]: *  Environment: development
zipper-b2957350[79711]: *          PID: 79711
zipper-b2957350[79711]: ! Unable to load application: Bundler::GemNotFound: Could not find rake-13.0.6 in any of the sources
zipper-b2957350[79711]: /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/spec_set.rb:86:in `block in materialize': Could not find rake-13.0.6 in any of the sources (Bundler::GemNotFound)
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/spec_set.rb:80:in `map!'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/spec_set.rb:80:in `materialize'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/definition.rb:170:in `specs'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/definition.rb:237:in `specs_for'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/definition.rb:226:in `requested_specs'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:101:in `block in definition_method'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:20:in `setup'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler.rb:149:in `setup'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/setup.rb:20:in `block in <top (required)>'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/ui/shell.rb:136:in `with_level'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/ui/shell.rb:88:in `silence'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/setup.rb:20:in `<top (required)>'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
zipper-b2957350[79711]: 	from /Users/alexander/projects/zipper/config/environment.rb:1:in `<top (required)>'
zipper-b2957350[79711]: 	from config.ru:1:in `require_relative'
zipper-b2957350[79711]: 	from config.ru:1:in `block in <main>'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/puma-5.3.2/lib/puma/configuration.rb:345:in `load_rackup'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/puma-5.3.2/lib/puma/configuration.rb:267:in `app'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/puma-5.3.2/lib/puma/runner.rb:143:in `load_and_bind'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/puma-5.3.2/lib/puma/single.rb:44:in `run'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/puma-5.3.2/lib/puma/launcher.rb:181:in `run'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/puma-5.3.2/lib/puma/cli.rb:80:in `run'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/puma-5.3.2/bin/puma:10:in `<top (required)>'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/bin/puma:23:in `load'
zipper-b2957350[79711]: 	from /Users/alexander/.asdf/installs/ruby/2.7.1/bin/puma:23:in `<main>'
! Killing 'zipper-b2957350' (79711) - 'stdout/stderr closed'
* App 'zipper-b2957350' shutdown and cleaned up
! Detecting app 'zipper-b2957350' dying on start

I don't understand why this doesn't work and would expect a rack app with a config.ru file to just work. Can somebody help?

Hi, Hanami team member here

I just spent ~15 minutes trying to get puma-dev setup locally but I wasn't successful. bundle exec puma works fine but puma-dev and bundle exec puma-dev the web page just says unknown app (even after bundle install, setup and linking).

Sorry I can't be more help but this seems like an issue with puma-dev not loading the bundled gems properly. This issue is quite similar, in that the error is also Unable to load application: Bundler::GemNotFound, so maybe that will help.

@cllns Thanks for looking into this! Since you got a different error I tried again and it works just fine for me now.

I had just forgotten to add the puma gem to my Gemfile. 😊

So I can officially confirm that Nanami works with puma-dev just as it should.