no such file to load — dispatcher

I updated to Rails 3 and tried to deploy the application using passenger in combination with Apache2. I’ve got the following error:

no such file to load — dispatcher

The thing was, that Passenger treats the Rails 3 application as an Rack application because of the config.ru file. To get it run again, you need to change the passenger variables RailsBaseURI and RailsEnv to RackbaseURI and RackEnv respectively in your virtual host configuration of Apache2. Example:

RackBaseURI /
RackEnv production

see also Phusion Passenger User Guide.

  • http://- Sergey Buravtsov

    Thanks, this solved the same issue with redmine 1.4.1.
    I’m not rails developer, but like redmine and it was headache.

  • http://none aaron

    I need to change the passenger variables in what file? /etc/uselessfile? or /etc/somehwereIneverheardof? where do I change the variables?

  • http://www.happy-coding.com/ Daniel

    @aaron: in your host configuration in Apache.

  • bob

    Thanks for this tips! I could upgarade redmine 1.4.0 to 2.0.0.

  • Pingback: ISHII-NET Blog - Redmine 2.0.0 アップグレード時の注意事項

  • Pingback: Redmine 2.0 Kurulum - Murat Özalp

  • lolo6tm

    Thanks !! You’re a God :) I’ve been searching for hours after updating Redmine to 2.0

  • francois

    Thanks a lot ! You’ve saved my life !

  • http://sbeex.com sbeex

    Great ! I had exactly the same problem as lolo6tm with redmine 2.0 and now it’s working fine ! Thank you very much dude :)

  • http://flohei.de Flo

    Thanks a lot! Works for me, too. I did the jump from Redmine 1.4.2 to 2.0.3.

  • Vik

    Great ! Thanks a lot ! You’ve saved my time!

  • Tomasz

    Thanks! Finally I’ve got this over :)

  • http://www.airesis.it Democrazia partecipata

    Thank’s! That fixed the issue also for me! The error came only when i put the variable
    PassengerSpawnMethod conservative

  • http://cnblogs.com/yuxc newptone

    Really Thank you! You save my life in configuring the foreman and passenger.

  • Pavel

    Thanks a lot!
    It fix my problem with Foreman on Debian 6