Site5 上的 Rails 部署

发布于 2024-10-31 01:07:38 字数 938 浏览 1 评论 0原文

我正在尝试使用 capistrano 将我的 Rails 3 应用程序部署到站点 5 共享托管。我遇到了很多小问题并一步一步解决了它们,但这一个让我抓狂: 当 capistrano 执行 bundle install 时,我会被要求输入密码,所以我猜测该捆绑包正在尝试在共享托管中全局安装我的应用程序 gem,然后输入 root 密码。这是 capistrano 要求我输入 root 密码,当我执行 cap deploy:migrations 时:

triggering after callbacks for `deploy:update_code'
  * executing `bundle_install'
  * executing "cd /home/domain/public_html/releases/20110406100442 && bundle install"
    servers: ["domain.com"]
    [domain.com] executing command
 ** [out :: domain.com] Fetching source index for http://rubygems.org/
 ** [out :: domain.com] Enter your password to install the bundled RubyGems to your system:

我更改了 .gemrc 文件以包含我的本地 gems 路径,这样我就可以安装连接的 gems通过 ssh 到服务器。效果很好...我还更改了deploy.rb 文件中的GEM_PATH 值,但它仍然不起作用:

default_environment['GEM_PATH']='/home/domain/.gem:/usr/lib/ruby/gems/1.8'

有什么想法吗?在这里疯了...

谢谢!!

I'm trying to deploy my Rails 3 application to a Site 5 shared hosting using capistrano. I've encountered many little problems and solved them step by step, but this one is getting me nuts:
When bundle install is executed by capistrano, i'm getting asked for a password, so I guess that bundle is trying to install my app gems globally in the shared hosting, root password then. This is capistrano asking me for root password, when I execute cap deploy:migrations:

triggering after callbacks for `deploy:update_code'
  * executing `bundle_install'
  * executing "cd /home/domain/public_html/releases/20110406100442 && bundle install"
    servers: ["domain.com"]
    [domain.com] executing command
 ** [out :: domain.com] Fetching source index for http://rubygems.org/
 ** [out :: domain.com] Enter your password to install the bundled RubyGems to your system:

I changed the .gemrc file to include my local gems path, so I can install gems connected to the server via ssh. That works perfectly... I also changed the GEM_PATH value in my deploy.rb file, but it still doesn't work:

default_environment['GEM_PATH']='/home/domain/.gem:/usr/lib/ruby/gems/1.8'

Any ideas? Getting nuts over here...

Thanks!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小耗子 2024-11-07 01:07:38

尝试捆绑安装 --deployment

try bundle install --deployment

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文