简体   繁体   中英

how to push Ruby on Rails site from Mac OS X to Windows

I'm on my MacBook Air developing with RoR and a SQLite database and when I'm happy with my site I want to push it to my Windows server (which is actually running Windows 7, but oh well), because I have MSSQL and lots of unused resources there.

I'm quite surprised I wasn't able to find much about this topic. Has anyone accomplished that? If yes, can you please write a quick description of the setup?

Some of what I tried: 1- I installed Ruby on Rails for Windows and tried to setup a separate RoR development environment for Windows. Down side: the fact that the latest stable Ruby version for Windows is 1.93 and I'm using Ruby v2.1.1 on OS X.

2- I set up IIS following this great walkthrough written by Durgaprasad Gorti that uses CGI for the rendering. I'm not precisely sure what this does yet, but I'm a bit biased I admit. It's definitely not the type of deployment solution I have in mind for RoR.

3- I'm looking at deploying Apache for Windows and see if it's easier to deploy a RoR website to it as I've just finished downloading Phusion Passenger.

My understanding so far is that there are a series of deployment tools available that make it easy to parameterize deployment on OS X and Linux, but none exists for Windows.

It's not the deploying of ROR that's the challenge here - it's creating an environment which allows it to run. You can just use git & capistrano to push / deploy your app. Rails apps are just a series of files & dependencies which should run in any environment, considering you have it set up correctly

I've set up linux boxes for production before, but not Windows. So the only recommendation I have is to say that if you want to get ROR deployed to a Windows environment -- you'll have to ensure you have all the dependencies required to make the app run. You've cited 2.1.1 etc , the best advice I have is to make sure you have this & your other dependencies installed (using the likes of ImageMagick etc to use Paperclip etc)

If you get the dependencies set up, then you can set up a server to handle the inbound requests. After that, you should be able to run the app from your Windows box.... although I'd highly recommend using a flavour of Linux such as Ubuntu on a cloud hosting provider (we use RackSpace )

您可以使用Helicon Zoo在IIS上运行Ruby。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM