Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing DefaultRackup constant breaks existing config files #683

Closed
indirect opened this issue Apr 11, 2015 · 1 comment
Closed

missing DefaultRackup constant breaks existing config files #683

indirect opened this issue Apr 11, 2015 · 1 comment

Comments

@indirect
Copy link

Running Puma from the current HEAD causes an exception with the Heroku-recommended puma.rb config file. Apparently the DefaultRackup constant has disappeared between 2.11.0 and d3bf7fe.

Here's the exception:

config/puma.rb:7:in `_load_from': uninitialized constant Puma::DSL::DefaultRackup (NameError)
        from /app/.bundle/ruby/2.2.0/bundler/gems/puma-d3bf7fea4bfe/lib/puma/dsl.rb:18:in `instance_eval'
        from /app/.bundle/ruby/2.2.0/bundler/gems/puma-d3bf7fea4bfe/lib/puma/dsl.rb:18:in `_load_from'
        from /app/.bundle/ruby/2.2.0/bundler/gems/puma-d3bf7fea4bfe/lib/puma/dsl.rb:7:in `block in load'
        from /app/.bundle/ruby/2.2.0/bundler/gems/puma-d3bf7fea4bfe/lib/puma/dsl.rb:6:in `tap'
        from /app/.bundle/ruby/2.2.0/bundler/gems/puma-d3bf7fea4bfe/lib/puma/dsl.rb:6:in `load'
        from /app/.bundle/ruby/2.2.0/bundler/gems/puma-d3bf7fea4bfe/lib/puma/configuration.rb:32:in `load'
        from /app/.bundle/ruby/2.2.0/bundler/gems/puma-d3bf7fea4bfe/lib/puma/cli.rb:545:in `parse_options'
        from /app/.bundle/ruby/2.2.0/bundler/gems/puma-d3bf7fea4bfe/lib/puma/cli.rb:190:in `run'
        from /app/.bundle/ruby/2.2.0/bundler/gems/puma-d3bf7fea4bfe/bin/puma:10:in `<top (required)>'
        from /app/.bundle/ruby/2.2.0/bin/puma:23:in `load'
        from /app/.bundle/ruby/2.2.0/bin/puma:23:in `<main>'

And here's the puma.rb file:

workers Integer(ENV['WEB_CONCURRENCY'] || 2)
threads_count = Integer(ENV['MAX_THREADS'] || 5)
threads threads_count, threads_count

preload_app!

rackup      DefaultRackup
port        ENV['PORT']     || 3000
environment ENV['RACK_ENV'] || 'development'

on_worker_boot do
  ActiveSupport.on_load(:active_record) do
    ActiveRecord::Base.establish_connection
  end
end

shutdown_debug
@indirect
Copy link
Author

I just discovered that everything works perfectly with the line rackup DefaultRackup removed completely, since (I assume) Puma can find the default config.ru file without being explicitly told to look for it. Still a pretty weird regression, though. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant