简体   繁体   English

如何将Ruby on Rails网站从Mac OS X推送到Windows

[英]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. 我正在使用RoR和SQLite数据库进行开发的MacBook Air上,当我对自己的站点感到满意时,我想将其推送到Windows服务器(实际上正在运行Windows 7,但是很好),因为我拥有MSSQL和那里有很多未使用的资源。

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. 我尝试了一些方法:1-我为Windows安装了Ruby on Rails,并尝试为Windows设置单独的RoR开发环境。 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. 缺点:Windows的最新稳定Ruby版本是1.93,而我在OS X上使用的是Ruby v2.1.1。

2- I set up IIS following this great walkthrough written by Durgaprasad Gorti that uses CGI for the rendering. 2-我按照Durgaprasad Gorti编写的出色演练(使用CGI进行渲染)设置了IIS。 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. 我绝对不是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. 3-我正在考虑为Windows部署Apache,看看刚下载完Phusion Passenger后,将RoR网站部署到该网站是否更容易。

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. 到目前为止,我的理解是,有一系列可用的部署工具可简化在OS X和Linux上的部署参数化,但Windows则不存在。

It's not the deploying of ROR that's the challenge here - it's creating an environment which allows it to run. 在这里,挑战不是不是ROR的部署-它正在创建一个允许它运行的环境。 You can just use git & capistrano to push / deploy your app. 您可以只使用gitcapistrano来推送/部署您的应用程序。 Rails apps are just a series of files & dependencies which should run in any environment, considering you have it set up correctly 考虑到正确设置,Rails应用程序只是应该在任何环境中运行的一系列文件和依赖项

I've set up linux boxes for production before, but not Windows. 我已经为生产设置了Linux机器,但是没有为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. 因此,我唯一的建议是说,如果要将ROR部署到Windows环境中,则必须确保拥有运行该应用程序所需的所有依赖项。 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) 您已经引用了2.1.1 etc ,我最好的建议是确保已安装此文件及其他依赖项(使用ImageMagick等来使用Paperclip等)

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 ) 之后,您应该可以在Windows机器上运行该应用程序...。尽管我强烈建议在云托管提供商(我们使用RackSpace )上使用Ubuntu之类的Linux。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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