Talk:Passenger

Concerning easy setup: Unfortunately, it's not that easy. As of December 22, 2008 these instructions are incomplete. This very [simple app] doesn't work with Passenger, but works with ./script/server. If you can get it to work, please update this page with additional instructions. --> this page gives step-by-step instructions for getting an application running with Passenger on Dreamhost servers.

I installed a Rails app (Redmine) yesterday, and had some trouble getting it running. The major problem was that all HTTP requests were being sent to Rails, even the ones for static resources like images and stylesheets. Rails doesn't expect to handle those, so it 404s on them. After much experimentation, I finally in frustration simply deleted the public/.htaccess file, and that fixed everything!

I was having problems before that where Rails simply wouldn't start up at all; I believe those happened because I tried putting the app in a subdirectory of my domain. I gave up on that and created a new subdomain to put the app at the root of, and then I was able to get farther. I'm not sure whether it's really impossible to put a Rails app on a subdomain with Passenger, or if there were other problems causing this...

Snej 11:43, 31 May 2008 (PDT)

Passenger seems to only use Rails Gems from DH
Trying to run a Rails v 1.2.3 application via Passenger:
 * I followed all instructions for enabling a home directory gems repository.
 * I installed rails 1.2.3 in the private (home directory) cache
 * I tested it by starting my app via the scripts/console program (logged into the DH server with ssh). Worked fine.
 * But when running via Passenger, the web browser shows an error message from Passenger that Rails 1.2.3 is not installed.
 * Fix: changing my rails app to specify version 1.2.6, which is installed in DH.

I believe that Passenger is not affected by my account's gem path settings when looking for the Rails gem. It is only looking at the DH Gem repository which has Rails versions 1.2.6 and 2.0.2 (as of Jul, 2008). I believe, but have not yet tested, that having a local gems repository will work fine for the gems that my application loads (gems other than rails.)

To see which versions of Rails are in the DH Gem Repository: unset GEM_HOME unset GEM_PATH gem list --local|grep rails

Regards, Larry K

It's not just a Feeling Larry K. I've lost about 6 hours resolving RoR issues, one after the other, doing some experimentation (being on IRC made the entire procedure a bit *too* slow), however I can clearly see that Passenger ignores the config/environment.rb and loads only DH gems. I can clearly see this in the error page.

Panagiotis (atma) Atmatzidis

--- It seems like the only solution is to specify the full path to the gem in the require statement,despite how ugly and silly it is. For example: require '/home/USERNAME/.gems/gems/GEMPACKAGE/lib/GEM.rb'

-mrgreenfur

---

I'm trying to get an application that uses 2.3.8 loaded onto my server, and it keeps asking that I install the gem, but when I try, it says I don't have permissions. Is Dreamhost going to update from 2.3.5?? -Benjamin