Search code examples
ruby-on-railsherokuruby-on-rails-7

rails7 heroku deployment failure (internal server error)


trying to deploy my rails7 app to heroku The home screen is coming up but whenever I click on a link to another page I get a screen saying "sorry something went wrong". "if your the application owner check the logs". an in the logs it says Failed to load resource: the server responded with a status of 500 (Internal Server Error)


Solution

  • My Rails 7 app started up locally fine but failed on Heroku deployment because of class naming errors. Note that Rails 7 uses Zeitwerk as its autoloader. You can test this locally by running: bundle exec rake zeitwerk:check