Moving Ruby on Rails installation

software development

#1

Hello,

I developed Ruby on Rails locally on my laptop, using InstantRails for Windows. Now it has been tested and debugged and ready for deployment. Is there an easy way to move it to dreamhost server?
If not, what are the things that I need to duplicate in dreamhost? I’m assuming all my model and controller files, my database, and my rhtml files. But I can’t think of anything else.

Thanks


#2

I do everything in app/, lib/ public/stylesheets, public/images, public/javascripts, config/routes.rb, and everything in db/. If you have ssh set up for passwordless login, this little script (run on your local/development machine) can come in handy.

#!/bin/bash

RAILS_ROOT = /set/your/development/root/here
DREAMHOST_DIR = subdomain.mydomain.com
SHELL_ACCOUNT = you@yourdomain.com

rsync -auv $RAILS_ROOT/app/ $SHELL_ACCOUNT:$DREAMHOST_DIR/app
rsync -auv $RAILS_ROOT/lib/ $SHELL_ACCOUNT:$DREAMHOST_DIR/lib
rsync -auv $RAILS_ROOT/public/stylesheets/ $SHELL_ACCOUNT:$DREAMHOST_DIR/public/stylesheets
rsync -auv $RAILS_ROOT/public/javascripts/ $SHELL_ACCOUNT:$DREAMHOST_DIR/public/javascripts
rsync -auv $RAILS_ROOT/public/images/ $SHELL_ACCOUNT:$DREAMHOST_DIR/public/images
rsync -auv $RAILS_ROOT/config/routes.rb $SHELL_ACCOUNT:$DREAMHOST_DIR/config/routes.rb
rsync -auv $RAILS_ROOT/db/ $SHELL_ACCOUNT:$DREAMHOST_DIR/db


#3

I have a similar problem… I copied everything from my rails application’s root directory to the default directory of my domain, but I can’t figure out how to get it to run! I’m used to running rails locally using ruby script/server, but apparently there’s a different way to do it here.

What do I need to do, after everything’s been copied? FCGI is enabled, do I need to make my .htaccess file redirect to /public/dispatch.fcgi?

I’m very clueless, please explain slowly and carefully.