Rails app not finding models
Posted by: jwatson
Posted on: 2005-11-27 17:33:00
Hi everyone!
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:
1. Uploaded local rails app to ~/.
2. Made sure production database settings are correct in railsapp/config/database.yml.
3. 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]
4. Modified the shebang location (#!) of ruby in the railsapp/public/dispatch.fcgi file to #!/usr/bin/ruby from whatever it was.
5. Switched to the production environment by uncommenting line 5 in railsapp/config/environment.rb.
6. 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!
-Joel