Posted over 7 years ago. Visible to the public. Linked content.

How to fix: "500 Internal Server Error" after adding Rack::Bug

When Rack::Bug has been added to your project and your Apache2/Passenger only replies with an Error 500 (Internal Server Error) you won't get any love from both application and Apache logs.

You can start a script/server and try connecting there. It should also fail but you will most likely see this error:

Copy
Internal Server Error undefined method `new' for "Rack::Bug":String

While the following is (for some reason) working on OSX…

Copy
config.middleware.use "Rack::Bug", :secret_key => '...'

…you need to do this so it works properly on Linux:

Copy
require 'rack/bug' config.middleware.use "Rack::Bug", :secret_key => '...'

Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for old versions of Ruby on Rails (3.2 and 2.3).

Owner of this card:

Avatar
Arne Hartherz
Last edit:
about 7 years ago
Keywords:
ruby, gem
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Arne Hartherz to makandra dev
This website uses cookies to improve usability and analyze traffic.
Accept or learn more