简体   繁体   English

如何将我的Rails应用程序部署到共享主机

[英]How to deploy my Rails app to a shared host

I have been chipping away at this for the last couple of days but it has become quite frustrating. 在过去的几天里,我一直在努力解决这个问题,但是它已经变得非常令人沮丧。 My web host is "JustHost" and I have a shared hosting service. 我的虚拟主机是“ JustHost”,我有一个共享的托管服务。 I have found this translates directly to "strips you of all privileges," when it comes to trying to set up the deployment on the server. 在尝试在服务器上设置部署时,我发现这直接转化为“带给您所有特权”。

I thought I had found some really good tutorials that might help me to get my environment set up (I tried to Follow Rob McLarty's blogs on How to setup a Production Server and How to Deploy a Rails App as best as I could). 我以为我已经找到了一些非常好的教程,可能会帮助我进行环境设置(我尽力关注了Rob McLarty关于如何设置生产服务器以及如何尽可能地部署Rails应用程序的博客)。 The problem that I found is that I couldn't/didn't need to install any of the things recommended, and when it came time to try to set things up I didn't have permission over the files that were recommended to modify or I didn't have permission to use the commands that were needed. 我发现的问题是我不需要/不需要安装任何推荐的东西,并且当需要尝试进行设置时,我没有对建议修改或修改的文件的权限我没有使用所需命令的权限。

Naturally I can see why this would be important on a shared host. 自然,我可以理解为什么这对于共享主机很重要。 It would be silly if each individual on the host could restart an apache server willy nilly. 如果主机上的每个人都可以随意地重启apache服务器,那将是愚蠢的。

Regardless, I have found this to be the problem with most of the research into getting this deployment up and running. 无论如何,我发现这是启动和运行此部署的大多数研究的问题。 Simply put, most of the things that are recommended I don't have permission to access. 简而言之,大多数没有建议的内容我都没有访问权限。

Does anyone know how to setup a deployment on an environment that is so restrictive? 有谁知道如何在如此严格的环境中设置部署? Even some resources, or a simple "you are thinking about this way too hard" to point me in the right direction would be really really helpful. 甚至是一些资源,或者简单的“您正在以这种方式思考都太困难了”,无法向我指出正确的方向,这真的很有帮助。

I highly recommend OpenShift as a platform for deploying your rails app on a shared environment. 我强烈建议将OpenShift用作在共享环境上部署Rails应用程序的平台。 It gives you the option to start for free with a small amount of resources in the server and gives you the ability of starting up everything you need at first like relational or NoSQL databases, loadbalancers, cache, etc. 它使您可以选择免费启动服务器中的少量资源,并使您能够首先启动所需的一切,如关系数据库或NoSQL数据库,负载平衡器,缓存等。

Heroku是一个简单的设置公式,对于共享主机ROR部署找到了很好的参考: 参考链接,这将有助于在共享主机上部署ROR App。(某些模块在共享服务器环境中可能不允许使用。您可能必须去VPS才能满足所有要求)。

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

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