为什么Heroku不能在Windows中接受我的Gemfile.lock? [英] Why won't Heroku accept my Gemfile.lock in Windows?

查看:97
本文介绍了为什么Heroku不能在Windows中接受我的Gemfile.lock?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Heroku上部署了一个rails应用程序。我使用了几个不同的机器,并且我注意到当我添加新的依赖关系(以便重新生成 Gemfile.lock )并执行 bundle install 在我的Windows计算机上,推到Heroku失败并出现以下错误:

 检测到未解析的依赖关系;正在安装... 
检测到Windows Gemfile.lock,忽略它。
您在开发过程中修改了您的Gemfile,但未将
的结果快照(Gemfile.lock)检入版本控制
...
pre
$ b

Gemfile.lock 在版本控制下,但Heroku显然选择忽略它,因为它是在Windows中创建的,然后抱怨几秒钟后就失踪了。为什么会发生?



$ b

解决方案

p>问题是Bundler为Windows创建了不同的 Gemfile.lock 。唯一的解决方案是在* NIX系统上创建并提交锁定文件。



我建议创建一个运行 Ubuntu - 可能使用虚拟Box 。您甚至可以获得可立即使用的虚拟机 - 例如此处


I have a rails application that I deploy on Heroku. I'm using several different machines, and I noticed that when I add new dependencies (so that Gemfile.lock is rebuilt) and do bundle install on my Windows computer at home, push to Heroku fails with the following error:

   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
   ...

Gemfile.lock IS under version control, but Heroku appearently chooses to ignore it since it's created in Windows, and then complains that it's missing seconds later. Why does this happen? And how can I solve it?

解决方案

Like matt commented above:

The problem is that Bundler creates different Gemfile.locks for Windows. The only solution is to create and commit the lock file on a *NIX system.

I would suggest to create a virtual machine running e.g. Ubuntu – maybe using Virtual Box. You can even get ready-to-use virtual machines – for example here.

这篇关于为什么Heroku不能在Windows中接受我的Gemfile.lock?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆