views:

90

answers:

3

I'm a rails novice and just finished my first rails app(as far as I can tell). Now I'm at the deployment stage and find myself utterly confused--especially because I'm deploying from a windows machine.

I bought the pragmatic book on deployment and it seems a little out of date since they're recommending subversion instead of Git.

What would be the easiest deployment method these days for someone doomed to use windows? Are there any good up-to-date tutorials on deployment from Windows?

+1  A: 

If you list your specific issues it might be easier to help. If you want reassurance, here is one; I use Windows for Rails development, and I haven't had any major issues(barring lack of support for some gems).

To interact with Git repository I use this windows client

KandadaBoggu
Thanks, I'll check it out!
Kenji Crosland
+4  A: 

The best way right now is to use mod_rails on your server, and deploy using a tool called Capistrano. Capistrano is windows compatible and I use it on windows myself all the time.

Here's a guide that explains how to set up and use both tools: http://cjohansen.no/en/rails/multi_staging_environment_for_rails_using_capistrano_and_mod_rails

If you want an even easier set up, check out http://www.heroku.com. They are a great Rails hosting company and they provide an excellent set of tools to set up and deploy your rails applications to their server. It's free to get started, but you will need to pay a little bit if your site grows. They are 100% windows compatible, since deployment basically consists simply of you pushing to a git repository on their server.

Good luck!

Gdeglin
I already got hosting at hosting rails, so I guess I'll try your first option.I heard that mod_rails doesn't work on windows???
Kenji Crosland
No, it doesn't. mod_rails is something that runs on the server side. You should look at hosting rails' guide on using capistrano: http://www.hostingrails.com/Capistrano-2-x-Deploying-Your-Rails-Application-on-HostingRails-com
Gdeglin
Ahh, that clears things up! So if I install mod_rails on the server side it doesn't matter if I'm using windows or not.
Kenji Crosland
+1  A: 

Capistrano is pretty much the standard way to manage deployment for a Rails app. It's been a while, but IIRC Capistrano has some trouble working on Windows in some situations (related to ssh). If you can set up Cygwin on your Windows, it should make things a bit easier. Assuming you're deploying to a Unix/Linux environment, it shouldn't matter much whether you're using git or svn, as far as your local development environment is concerned. The server side of Capistrano (really just the the remote shell) is responsible for connecting to your git repo and fetching it into your deployment environment.

Another good option that you might want to investigate is running Linux inside of VirtualBox or VMWare on your Windows machine; in general I find Ruby/Rails development to be more hassle-free when working in a unix environment.

Ken Liu
Your VMware sounds like a good idea. I'll check it out if Cygwin doesn't work out for me.
Kenji Crosland