I was having wierd asset issues and other errors when running my Rails app in a sub-directory

Example: mydomain.com/myapp

The main fix is to add relative_url_root to your configuration. You probably only need to define this in production.


# config/environments/production.rb

config.action_controller.relative_url_root = "/myapp"


Related External Links: