mra*_*ers 12 ruby windows ruby-on-rails heroku
我有一个我在Heroku上部署的rails应用程序.我正在使用几台不同的机器,我注意到当我添加新的依赖项(以便Gemfile.lock重建)并bundle install在我家的Windows计算机上执行时,推送到Heroku失败并出现以下错误:
Unresolved dependencies detected; Installing...
Windows Gemfile.lock detected, ignoring it.
You have modified your Gemfile in development but did not check
the resulting snapshot (Gemfile.lock) into version control
...
Run Code Online (Sandbox Code Playgroud)
Gemfile.lock在版本控制下,Heroku显然选择忽略它,因为它是在Windows中创建的,然后抱怨它在几秒钟后丢失.为什么会这样?我该如何解决?
jer*_*rth 24
我通过打开Gemfile.lock并删除以下两行来修复我的问题:
PLATFORMS
x86-mingw32
Run Code Online (Sandbox Code Playgroud)
所以现在我只需要创建一个捆绑的脚本然后从锁定文件中删除它.
像matt上面评论的:
问题是Bundler Gemfile.lock为Windows 创建了不同的s.唯一的解决方案是在*NIX系统上创建和提交锁定文件.
我建议创建一个运行例如Ubuntu的虚拟机- 也许使用Virtual Box.您甚至可以使用现成的虚拟机 - 例如此处.
| 归档时间: |
|
| 查看次数: |
4404 次 |
| 最近记录: |