I’m migrating a Rails application to JRuby running on TorqueBox.
As a result I am now running locally as http://localhost:8080/myapp/ instead of the previous http://localhost:3000/.
As a result none of my routes match.
Is there a quick way to take into account this change without having to rewrite all my routes considering I will be running this from / eventually.
Thanks!
You can put
config.action_controller.relative_url_root = "/myapp"in the appropriate environment file. In this case, it sounds like it would beconfig/environments/development.rb. Once you deploy somewhere else and want to use/as your root URL again, just make sure the app is running in the production environment, and it’ll work as expected.