7

Is there a way that I can deploy my locally made rails app on a shared host that has Ruby installed?

4

7 回答 7

3

就个人而言,我会使用Capistrano。有很多书籍和教程会告诉你如何使用它来部署 Rails 应用程序。它非常容易配置。

于 2010-01-31T19:33:39.460 回答
3

Capistrano 部署和(Mongrel 或Passenger...最好是后者...或者如果你必须,FastCGI 尽管FastCGI 在Rails 中相当慢)来服务。

如果您有一个共享主机,您将不得不提供您的 Rails 版本和所有 gem,因为您可能无权安装 gem。即使你这样做了,你也不希望 Rails 选择旧版本的东西。

于 2010-01-31T21:16:40.320 回答
1

Dreamhost supports Rails, many others probably do also.

As for installation of your app: it depends a bit on what's already available on your shared host, and what you're allow to do / install / configure there. For Dreamhost, here's their documentation. Other shared hosting solutions may or may not be similar depending on their policy.

于 2010-01-31T18:55:25.590 回答
0

The best way I've found is to install the passenger gem. Once you've uploaded your app to your account all you need to do is add a few lines to your .htaccess file and you should be off.

于 2010-01-31T19:01:28.737 回答
0

找到了一个很好的参考:参考链接这将有助于在共享主机上部署 ROR 应用程序。

于 2014-06-25T08:05:03.050 回答
0

绝对 capistrano + git(git,如果你有 SSH 访问权限,比如 HostingRails 共享主机中的 fe),没有什么比这更容易了。

整洁的 Capistrano 指南:http ://www.linuxjournal.com/article/10100

如何配置 Capistrano + git:http: //github.com/guides/deploying-with-capistrano

一些不错的 Capistrano 食谱:http: //github.com/josh/slicehost

于 2010-01-31T23:17:03.503 回答
0
  1. 假设你的 http 服务器是 nginx 或 apache,安装Phusion Passenger
  2. 在乘客站点上,有非常好的文档用于使用 Rails 配置 Apache/nginx
  3. 第一步,只需将您的 Rails 应用程序复制到主机的某个位置并让乘客工作
  4. 一旦你有了这个工作,你将需要一种更好的方法来部署/更新应用程序;正如其他人所建议的那样,Capistrano 是一种流行的方法,您应该可以在网上找到一些教程来帮助您做到这一点

我已经完成了第 1-3 步,它非常简单并且工作得非常好(我只是懒得做第 4 步)。

于 2010-01-31T23:25:15.143 回答