[英]Can I deploy a Rails App directly onto my companies website?
I have originally been hosting my apps on Heroku, however this is not an acceptable deployment method in my current environment. 我最初在Heroku上托管我的应用程序,但是在我当前的环境中这不是一种可接受的部署方法。 We have personal information in our applications that deploying to Heroku and setting up DNS forwarding is not acceptable.
我们在部署到Heroku的应用程序中有个人信息,并且不接受设置DNS转发。 Regardless of how 'secure' or 'reliable' anyone may think it is, it is just not acceptable in my case.
无论任何人都认为它是“安全的”或“可靠的”,在我的情况下这是不可接受的。
Our host is siteturn.com, integrated with Plesk 10.4.4. 我们的主机是siteturn.com,与Plesk 10.4.4集成。 If I SSH onto our websites server as admin and type
如果我以管理员身份登录我们的网站服务器并输入
ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]. ruby 1.8.7(2010-08-16 patchlevel 302)[x86_64-linux]。
rails -v
Rails 2.3.5 Rails 2.3.5
It appears Ruby and Rails are already installed (Older versions than I require, as I need ruby 1.9.3 and Rails 3.2) If I'm not mistaken it seems like my host 'supports' rails (why else would it already have it installed :P). 似乎已经安装了Ruby和Rails(比我需要的旧版本,因为我需要ruby 1.9.3和Rails 3.2)如果我没有弄错,好像我的主机'支持'rails'(为什么它已经安装了它) :P)。
How should I go about deploying my application directly onto my companies website? 我应该如何将我的应用程序直接部署到我公司的网站上?
Pick up a copy of Agile Web Development with Rails, Third Edition and read what it says about deployment. 使用Rails,第三版获取Agile Web Development的副本,并阅读有关部署的内容。 That should get you started.
这应该让你开始。 There's more info required than can be put in a SO answer.
需要的信息比SO答案要多。
Heroku is an awesome service but the ease of deploying to Heroku has given you a skewed view of what is involved in hosting your own rails website. Heroku是一项非常棒的服务,但是部署到Heroku的简易性使您对托管自己的rails网站所涉及的内容有了不正确的看法。 Heroku has shielded you from a lot of the hard parts.
Heroku已经将你从许多困难部分中拯救出来。
For example, just because ruby and rails is installed does not necessarily mean you can host a production rails website. 例如,仅仅因为安装ruby和rails并不一定意味着您可以托管生产rails网站。 You'll need a rails specific web server (for example nginx and passenger, unicorn, etc).
您将需要特定于rails的Web服务器(例如nginx和passenger,unicorn等)。 You also need a database (MySQL or Postgres) assuming your web app uses one.
假设您的网络应用使用一个数据库,您还需要一个数据库(MySQL或Postgres)。 Also, as you said you need to upgrade the versions of ruby and rails.
另外,正如您所说,您需要升级ruby和rails的版本。
That's just to get the server setup. 这只是为了获得服务器设置。 After that you can get to the deployment part.
之后,您可以进入部署部分。 Capistrano seems to be the most popular choice right now.
Capistrano似乎是目前最受欢迎的选择。
Take a look at this railscast episode on deploying to a virtual private server for a very good overview of what is involved. 看看这个关于部署到虚拟专用服务器的railscast剧集 ,以便对所涉及的内容进行非常好的概述。 It also briefly goes into Capistrano as well.
它也简要介绍了卡皮斯特拉诺。 It's not a free episode but I feel it's definitly worth the money.
这不是一个免费的插曲,但我觉得它绝对物有所值。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.