Running Rails App In A Subdirectory

Posted by Weston Ganger on May 25, 2015

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:

Posted in Rails and Tagged with rails 

Need help on your next project or application?

I specialize in Ruby-on-Rails, AngularJS, Javascript, Bootstrap, and Hybrid Mobile Apps with Cordova & Ionic.

Contact Me

Recommended Posts