【发布时间】:2011-08-22 16:36:51
【问题描述】:
我有一个部署在 Heroku 上的 rails 应用程序。我正在使用几台不同的机器,我注意到当我添加新的依赖项(以便重建 Gemfile.lock)并在家里的 Windows 计算机上执行 bundle install 时,推送到 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
...
Gemfile.lock 受版本控制,但 Heroku 似乎选择忽略它,因为它是在 Windows 中创建的,然后在几秒钟后抱怨它丢失了。为什么会这样?我该如何解决?
【问题讨论】:
-
Windows 与 *nix 上的 CR/LF 有什么关系?
-
也许吧?从推送失败的输出来看,Heroku 似乎是故意忽略它。
-
捆绑器是否可能选择预编译的 Windows 二进制文件作为依赖项并将它们列在
Gemfile.lock中? -
看看问题“Bundler 是否可以在 Windows 上工作?”这里:engineyard.com/blog/2011/bundler-pro-tip 看起来可能与您的问题有关。
标签: ruby-on-rails ruby windows heroku