views:

276

answers:

6

Is there a way that I can deploy my locally made rails app on a shared host that has Ruby installed?

A: 

Dreamhost supports Rails, many others probably do also.

As for installation of your app: it depends a bit on what's already available on your shared host, and what you're allow to do / install / configure there. For Dreamhost, here's their documentation. Other shared hosting solutions may or may not be similar depending on their policy.

Wim
I think that @Vector isn' asking about "what shared hosting I can use?" but if he can deploy on a shared hosting that has ruby installed (probably there is no rails and other important stuff there).
klew
Yes I was wondering about that also, let's ask him :-)
Wim
A: 

The best way I've found is to install the passenger gem. Once you've uploaded your app to your account all you need to do is add a few lines to your .htaccess file and you should be off.

fatnic
Do you have a link on how to set this up or a how to?
PythonGem
The only info I have to hand is for my host (Site5) but it should be similar. http://www.site5.com/blog/programming/ruby-rails/how-to-deploy-phusion-passenger-to-a-subdirectory-routing-errors-and-restarting/20090414/
fatnic
+2  A: 

Personally, I would use Capistrano. There are plenty of books and tutorials around that will tell you how to use it to deploy Rails applications. It is very easy to configure.

Mick Sharpe
+1  A: 

Capistrano to deploy and (Mongrel or Passenger... preferably the latter... or if you HAVE to, FastCGI although FastCGI is pretty slow with Rails) to serve.

If you have a shared host you'll have to vendor your Rails version and all your gems, as you probably won't have access to install gems. Even if you did, you won't want Rails picking old versions of things.

RyanWilcox
A: 

Definitely capistrano + git (git, if you have SSH access, like f.e. in HostingRails shared host), nothing can be easier.

Neat Capistrano guide: http://www.linuxjournal.com/article/10100

How to config Capistrano + git: http://github.com/guides/deploying-with-capistrano

Some nice Capistrano recipes: http://github.com/josh/slicehost

sharas
A: 
  1. Assuming your http server is nginx or apache, install Phusion Passenger
  2. On the Passenger site, there are very good docs for configuring Apache/nginx with Rails
  3. As a first step, just copy your Rails app somewhere to the host and get Passenger working
  4. Once you have that working, you will need a better way to deploy/update the app; as others have suggested, Capistrano is a popular way to do it and you should have no problem finding some tutorials online to help you do it

I have done steps 1-3 and it is incredibly easy and works perfectly fine (I was just too lazy to do step 4).

davetron5000