Hi,
I updated my server with the latest Rails (2.3.2) and Passenger (2.2.2).
I also updated my Rails app to run under 2.3.2. It runs
fine locally under Mongrel.
The app is deployed into my own home directory under: (deployed via
Capistrano)
/users/me/public_html/myapp/current (which is a symlink to the
actual app)
and it’s accessed by the url:
http://myserver.com/myapp
I was getting routing errors, where Passenger/Apache could not find the
default route. But I found a post saying Passenger
has an issue with routing, so I added the RailsBaseURI to the
environment.rb file:
config.action_controller.relative_url_root = “/myapp”
I found another post that said my apache config should be:
<VirtualHost *:80>
ServerName myserver.com
DocumentRoot /home/me/public_html/myapp/current/public
<Directory “/home/me/public_html/myapp/current/public”>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
RailsBaseURI /
I have not .htaccess file in the public folder.
I am now able to get to the app, but all references to stylesheets and
images are giving routing errors in the
production.log file:
Processing ApplicationController#index (for 1.2.3.4 at 2009-05-30
13:11:46) [GET]
ActionController::RoutingError (No route matches
“/stylesheets/scaffold.css” with {:method=>:get}):
passenger (2.2.2) lib/phusion_passenger/rack/request_handler.rb:81:in
process_request' passenger (2.2.2) lib/phusion_passenger/abstract_request_handler.rb:203:in
main_loop’
passenger (2.2.2)
lib/phusion_passenger/railz/application_spawner.rb:340:in
start_request_handler' passenger (2.2.2) lib/phusion_passenger/railz/application_spawner.rb:298:in
handle_spawn_application’
passenger (2.2.2) lib/phusion_passenger/utils.rb:181:in safe_fork' passenger (2.2.2) lib/phusion_passenger/railz/application_spawner.rb:296:in
handle_spawn_application’
passenger (2.2.2) lib/phusion_passenger/abstract_server.rb:337:in
__send__' passenger (2.2.2) lib/phusion_passenger/abstract_server.rb:337:in
main_loop’
passenger (2.2.2) lib/phusion_passenger/abstract_server.rb:187:in
start_synchronously' passenger (2.2.2) lib/phusion_passenger/abstract_server.rb:154:in
start’
passenger (2.2.2)
lib/phusion_passenger/railz/application_spawner.rb:192:in start' passenger (2.2.2) lib/phusion_passenger/spawn_manager.rb:257:in
spawn_rails_application’
passenger (2.2.2)
lib/phusion_passenger/abstract_server_collection.rb:126:in
lookup_or_add' passenger (2.2.2) lib/phusion_passenger/spawn_manager.rb:251:in
spawn_rails_application’
passenger (2.2.2)
lib/phusion_passenger/abstract_server_collection.rb:80:in synchronize' passenger (2.2.2) lib/phusion_passenger/abstract_server_collection.rb:79:in
synchronize’
passenger (2.2.2) lib/phusion_passenger/spawn_manager.rb:250:in
spawn_rails_application' passenger (2.2.2) lib/phusion_passenger/spawn_manager.rb:153:in
spawn_application’
passenger (2.2.2) lib/phusion_passenger/spawn_manager.rb:282:in
handle_spawn_application' passenger (2.2.2) lib/phusion_passenger/abstract_server.rb:337:in
send’
passenger (2.2.2) lib/phusion_passenger/abstract_server.rb:337:in
main_loop' passenger (2.2.2) lib/phusion_passenger/abstract_server.rb:187:in
start_synchronously’
I’m at a loss as to how to fix this. Anyone?
Thanks!