首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在heroku上通过捆绑包安装本地gem不起作用

在heroku上通过捆绑包安装本地gem不起作用
EN

Stack Overflow用户
提问于 2018-10-10 19:43:00
回答 1查看 305关注 0票数 3

我正在尝试将我的应用程序安装到heroku上。但我对宝石有意见。这是一个私有的gem,我们没有一个私有的gem服务器设置,所以我在本地克隆了gem作为应用程序中的一个子模块。

当我推送到heroku时,我得到了这个错误:

代码语言:javascript
复制
 !     Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.

        Detected buildpacks: Ruby,Node.js

        See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order

-----> Ruby app detected

-----> Compiling Ruby/Rails

-----> Using Ruby version: ruby-2.5.1

-----> Installing dependencies using bundler 1.15.2

   Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment

   Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.2). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.

   You are trying to install in deployment mode after changing

   your Gemfile. Run `bundle install` elsewhere and add the

   updated Gemfile.lock to version control.



   The gemspecs for path gems changed

   Bundler Output: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.2). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.

   You are trying to install in deployment mode after changing

   your Gemfile. Run `bundle install` elsewhere and add the

   updated Gemfile.lock to version control.



   The gemspecs for path gems changed

 !

 !     Failed to install gems via Bundler.

 !

 !     Push rejected, failed to compile Ruby app.

 !     Push failed

当我删除本地安装的gem时,一切都运行良好。

因此强烈的预感是,bundler 1.15.2以不同的方式处理本地gem,这导致了冲突。

在我的Gemfile中,没有在任何组中,我有gem 'portkey', path: './gems/portkey/'

在我的Gemfile.lock顶部,我有

代码语言:javascript
复制
PATH
  remote: gems/portkey
  specs:
    portkey (0.1.10)
      bitly
      omniauth-google-oauth2 (~> 0.5.3)
      rails (~> 5.2.1)
      rebrandly
      shortener (~> 0.8.0)
      will_paginate

Heroku还不支持bundler 1.16.2 afaik

我使用的是Rails5/ruby-2.5,我似乎无法将bundler降级到1.15.2并生成旧版本的锁文件

我不能轻易地让这个宝石以其他方式访问。

我对如何让这个gem的安装工作感到困惑,并将非常感谢您的建议。

EN

回答 1

Stack Overflow用户

发布于 2019-02-26 08:06:39

有类似的问题,通过升级到Bundler 2.0.1 (现在由Heroku支持)解决了。

不过,对于1.x版本,他们仍然使用1.15.2。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52739478

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档