加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 为什么Heroku不会在Windows中接受我的Gemfile.

发布时间:2020-12-16 19:48:12 所属栏目:百科 来源:网络整理
导读:我有一个rails应用程序,我部署在Heroku.我正在使用几种不同的机器,我注意到,当我添加新的依赖项(以便Gemfile.lock被重建)并且在我的 Windows计算机上进行捆绑安装时,推送到Heroku失败并出现以下错误: Unresolved dependencies detected; Installing... Wind
我有一个rails应用程序,我部署在Heroku.我正在使用几种不同的机器,我注意到,当我添加新的依赖项(以便Gemfile.lock被重建)并且在我的 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
   ...

Gemfile.lock在版本控制下,但是Heroku显然选择忽略它,因为它是在Windows中创建的,然后抱怨说它几秒钟后就丢失了.为什么会发生这种情况?那我该怎么解决呢?

解决方法

像以上评论的matt:

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

我建议创建一个运行的虚拟机. Ubuntu – 也许使用Virtual Box.甚至可以使用即用型虚拟机 – 例如here.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读