Dreamhost Deployment Issues

Hi,

After following the quickstart guide in the Dreamhost wiki:

http://wiki.dreamhost.com/index.php/Rails#Quick_Start_Guide_August_2006

and browsing through old posts on this forum, I am unable to install a
working Rails application on my Dreamhost account. I have an
application with two models and three controllers that I cannot get to
work. I even tried creating a simple application with one model and one
controller, and that didn’t work either.

Has anyone recently deployed a Rails application on Dreamhost? Are
there any errors in the quick start guide (linked above) that I need to
be aware of? Thanks in advance…

Brandon

On 27 Oct 2006, at 8:11 am, Brandon S. wrote:

application with two models and three controllers that I cannot get to


Posted via http://www.ruby-forum.com/.

I’ve set up a RoR application on my Dreamhost account and it worked
OK - mine is at http://search.chooseyournursery.com/. I have only put
the framework in place but it looked just like it looks on my local
machine.

Are you setting it up as a sub-domain or as a sub-directory?

Ian.

I’ve set up a RoR application on my Dreamhost account and it worked
OK - mine is at http://search.chooseyournursery.com/. I have only put
the framework in place but it looked just like it looks on my local
machine.

Ian,

I have the application setup on a subdomain, just like yours. The root
directory is setup like: subdomain.domain.com/public/

Did you follow the quick start guide on the DH wiki to get your app up
and running? If not, where did you find instructions?

Thanks,
Brandon

Brian H. wrote:

Please be specific about what won’t work. I’m sure I can help you once
you’ve given me more to go on.

  1. Did you edit config/environment.rb and set the app to production
    mode?
  2. Did you edit public/.htaccess and change dispatch.cgi to
    dispatch.fcgi?
  3. Did you set public/dispatch.* to chmod 755?

Can you even get the “welcome to Rails” page to display? It’s just HTML
and
should be enough to prove that the subdomain is mounted properly.

Hi Brian,

I can get the “Welcome to Rails” page to display as soon as I create my
new rails app on the server. However, I still can’t get the application
to work. Here is what I’m doing:

  1. Create new rails app on the server
  2. Change instance of dispatch.cgi to dispatch.fcgi in public/.htaccess
  3. Set application to production mode in config/environment.rb
  4. Run this command: chmod -R u+rwX,go-w public log (from the DH wiki,
    This command sets the public directory and dispatch.fcgi to not be
    world-writable (or group-writable, just in case), and the log directory
    to be writable so that log and crash files can be generated.)
  5. Edit config/database.yml with the correct database information.

After all of these steps, the “Welcome to Rails” page still displays.
If I try to create a new scaffold, I get a mysql connection error:

Can’t connect to local MySQL server through socket
‘/var/run/mysqld/mysqld.sock’

I have verified and reverified my database configuration and everything
is correct in config/database.yml.

I don’t know what I’m doing wrong… please help!

Oh :slight_smile: That’s easy.

You can’t use socket: in your database.yml file. You need to use host:
yourdb.yourdomain.com

Let me know if that needs to be more clear. Your mysql database is on a
different machine than your web account so you need to use the hostname
of
the server, not a socket.

Please be specific about what won’t work. I’m sure I can help you once
you’ve given me more to go on.

  1. Did you edit config/environment.rb and set the app to production
    mode?
  2. Did you edit public/.htaccess and change dispatch.cgi to
    dispatch.fcgi?
  3. Did you set public/dispatch.* to chmod 755?

Can you even get the “welcome to Rails” page to display? It’s just HTML
and
should be enough to prove that the subdomain is mounted properly.

Brian H. wrote:

Oh :slight_smile: That’s easy.

You can’t use socket: in your database.yml file. You need to use host:
yourdb.yourdomain.com

Let me know if that needs to be more clear. Your mysql database is on a
different machine than your web account so you need to use the hostname
of
the server, not a socket.

Brian,

Thanks for the help… I was using the hostname of the database the
whole time, but it still wasn’t working. I FINALLY got my Rails app
deployed succesfully. I needed to kill some dispatch.fcgi processes to
get everything working.

Thanks again,
Brandon

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs