Rails

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 


Want me to help develop your next project or application?

Contact Us

Specializing in Ruby-on-Rails, Javascript, Multi-Platform Electron Desktop Apps and Hybrid Cordova Mobile Apps.

Recommended Posts