I’ve been trying to get my rails app to work on Dreamhost. I followed the below steps and it sort of works. The one controller I have that doesn’t have a corresponding model works. Whenever I try using one that requires a model, I get a rails application error. Below are the steps I took:
Uploaded local rails app to ~/.
Made sure production database settings are correct in railsapp/config/database.yml.
Modified all instances of dispatch.cgi in the railsapp/public/.htaccess file to dispatch.fcgi. To my knowledge, there is only one line you need to change that looks like this:
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
Modified the shebang location (#!) of ruby in the railsapp/public/dispatch.fcgi file to #!/usr/bin/ruby from whatever it was.
Switched to the production environment by uncommenting line 5 in railsapp/config/environment.rb.
Created a symlink to my site directory:
$ cd ~/railsapp
$ ln -s public ~/yoursite.com/railsapp
I also tried creating a subdomain and putting my app in the root directory. Same deal. I know the app is accessing the database correctly and it works perfectly on my local machine using script/server. Any ideas? Did I configure something wrong somewhere? Thanks!