Rails on Dreamhost

I have been playing around with Ruby on Rails on my personal system for several months learning the framework, and now I’m ready to create my first live application. However, using Rails on Dreamhost seems much more complicated than on my own linux system. I’m using passenger and have done all the setup for my databases, including editing my database.yml. But, when I try to view the site through my browser I either get an error page telling me I need Rails 2.3.2 installed on the server or, if I use the freeze command suggested in the documentation, i just get a syntax error.

But all I’ve done is create a single app and build a scaffold. There should be no syntax problem since I haven’t actually written any code myself. The same exact process will go without a hitch on my own development system.

Can anyone help me with getting started? None of the documents on the Dreamhost wiki have led me to successfully create a simple app.

Hello jobenson,
When you look in your config/environment.rb file do you have a line that looks like this:

RAILS_GEM_VERSION = ‘2.3.2’ unless defined? RAILS_GEM_VERSION

Since Dreamhost is running rails version 2.2.2, if you have this line, then it will want you to install rails 2.3.2 which you could do, but I haven’t had any success with this.

If you comment the line out or remove it altogether, then that might help.

And, by the way, 99% of the Dreamhost wiki docs are complete and utter bilge. Every once in a while I glean something useful from them, but the best way to upload an app is just to upload it, and:

  1. change the line I mentioned to you
  2. If you’ve indeed been using 2.3.2, then change the file named application_controller.rb to application.rb
  3. If you’re using mysql, then change your database.yml file with the information pertinent to your database setup.
  4. Also, don’t forget to create the mysql db in the control panel.