I’m having problems deploying a rails application that contains engines.
When I had namespaced routes (Engine::Application.routes.draw) in
routes.rb, I was unable to get past the “no such file or directory”
from apache. The request never got back to the application.
When I used global routes (Rails.application.routes.draw) in routes.rb,
can not direct the request to the namespaced controller. I get
“uninitialized constant” with the non-namespaced controller name.
The Getting Started with
Engineshttp://guides.rubyonrails.org/engines.htmlRails Guide does not
include information on deploying an application
The relevant portion of the apache configuration is:
<Directory /var/www/html/links> Options -MultiViews RailsBaseURI /links RailsEnv staging PassengerRuby
/var/www/html/links is a symbolic link to the public directory of the
A solution to either problem (namespaced or non-namespaced) is
A solution with namespaced routes is preferred.