“捆绑安装”使用 git 路径 Rails 3 时出现 gems 错误
每次部署到生产服务器时,使用 git 路径的 gem 都会出现以下错误:
git://github.com/odorcicd/example.git (at rails3) is not checked out. Please run `bundle install` (Bundler::PathError)
我发现如果运行“bundle install --deployment”,它就可以解决此问题。但它会再次安装我的所有 gem,并且我必须在每次部署后执行此操作。有没有人找到比这更好的解决方案?
这是在我的 Gemfile 中使用 git 路径的示例:
gem 'efax', :git => 'https://github.com/TTDaVeTT/efax.git'
Every time I deploy to my production server I get the following error for gems that use a git path:
git://github.com/odorcicd/example.git (at rails3) is not checked out. Please run `bundle install` (Bundler::PathError)
I've found that if I run "bundle install --deployment" it solves this problem. But it installs all my gems again and I have to do it after each deployment. Has anyone found a better solution than this?
This is an example of the using a git path in my Gemfile:
gem 'efax', :git => 'https://github.com/TTDaVeTT/efax.git'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
同样的问题在这里:我有这个需要 git origin 的 gem。
据我所知;
bundle
安装 gem,但不在您的 gemset 中 - 因此您必须让 Rails 以某种方式专门包含 gem...需要这部分的帮助。Same issue here: I've got this gem that requires a git origin.
From what I've found;
bundle
installs the gem, but not in your gemset - so you have to get rails to include the gems specifically somehow... need help on that part.