views:

139

answers:

3

i want to start a website. it'll be a small community based website. i've learned a fair bit of ruby on rails and am planning to use it. however, i have never deployed a production website before. i've just practiced in my local computer. i wanted to know what are the things i need to deploy the website on the internet. what is the best place to get a domain name and web hosting, esp for ruby on rails sites. how are cloud based services like amazon EC2 etc different from a traditional web host. which is a better choice. what else might i need to do to deploy a website. also i may happen to have a fair bit of users in the future. so how to go about planning for scalability issues. how to sites like twitter, fmylife.com etc all go about these things.

A: 

I use A2 Hosting. They are really professional, responsive and I've found their prices reasonable (at least a couple of years ago when I was shopping around).

They use CPanel, so Capistrano is out of the question. I've never used Capistrano before so I'm not sure what I missing.

The pros:

  • they are quick to answer emails (usually within a couple of hours)
  • give ssh access
  • lots of KB,wikis, etc to help
  • CPanel is pretty easy to use

The cons:

  • they have to install gems for you, since most require root access. So you need to plan ahead.
  • Cpanel can be clunky sometimes. (I could use command line for starting & stopping the database) but I need to actually go into CPanel to start & stop the rails app.

I use github for my repository. When I went to deploy, here is what I did:

  • git pull github MyBranch
  • log into CPanel, create DB and add my rails app to the rails app manager
  • rake db:migrate RAILS_ENV=”production”
  • go back into CPanel and start the app

That's pretty much it. Not very complicated.

The only thing I would change would be to start & stop the mongrel instance from command line. There is a way of doing it but its not so simple.

Good Luck! Hope this helps.

cbrulak
+1  A: 

http://heroku.com is the place to go for rails hosting - it's REALLY easy to get your app up and running in a production environment

this post will take you through purchasing a domain name and getting the app up and running on heroku - http://web.elctech.com/2009/05/17/heroku-0-to-60-in-15-minutes/

when it comes to scalability - watch all of the videos on this site: http://railslab.newrelic.com/scaling-rails - it does what it says on the tin

hope it helps

stephenmurdoch
+1  A: 

I strongly suggest you go for DreamHost, (www.dreamhost.com), their hosting is incredibly cheap and reliable, the suggestion for it came from the Ruby Guru Peter Cooper himself, when i asked him a couple of weeks ago.

They have passenger support which is a gem for getting your rails app to run on Apache (Which we all know :]) there are coupons for it all over the place that will eventually lead you to only pay 19.00 for hosting + domain (That's what i paid :D) for a year.

These is their Ruby on Rails wiki : wiki.dreamhost.com/index.php/Ruby_on_Rails

And this is a site with the info on pre-installed gems and such : http://rails.dreamhosters.com/

Their documentation for Rails app on their servers is unbeatable.

Gotjosh
I used dreamhost for three years and I can't say a bad word about them, but I now use Heroku exclusively because their setup saves me hours of work - but yeah, nothing wrong with DH - some decent discounts if you use any of these vouchers http://www.voucherhub.com/view/dreamhost.com
stephenmurdoch