Site5 上的 Rails 部署
我正在尝试使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试捆绑安装 --deployment
try bundle install --deployment