All this weekend I have been trying to setup a Rails 3.0.4 app in production on a Dreamhost shared server. I have followed this wiki article to have my own set of rubygems setup on the server. Furthermore, I also installed rvm and ruby 1.9.2 using the following command:
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
rvm use 1.9.2 --default
Doing ruby -v
returns ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]
, so I believe rvm has installed the version of ruby correctly.
I created my app forcing the use of a mysql database, and then generated an articles controller:
rails new test_app -d mysql
cd test_app
rails g scaffold articles title:string body:text
Now when I visit the domain I see the usual "Welcome aboard You’re riding Ruby on Rails!" screen, but if I click the "About your application’s environment" link I get what looks like to be some kind of passenger error:
Ruby (Rack) application could not be started The application has exited during startup (i.e. during the evaluation of config/environment.rb). The error message may have been written to the web server's log file. Please check the web server's log file (i.e. not the (Rails) application's log file) to find out why the application exited. If that doesn't help, then please use the backtrace below to debug the problem.
Lastly, if I SSH into the server and just do rails s
I can see the app functioning correctly on port 3000.
I have never put an app into production before, so I am very confused. Is passenger not using the RVM version of ruby? Is these even possible on a DreamHost shared server? What do I have to do to rectify this problem?
Any help is appreciated, Thanks.