簡體   English   中英

無法將自定義 gem 推送到 heroku master

[英]Unable to push a custom gem to heroku master

我在 'gemz' 文件夾中創建了一個簡單的自定義 gem 並在 gemfile ('checkpercentage', '~>0.1.0') 中進行了配置,它在我的應用程序中運行良好,但無法將其部署到 heroku。

嘗試將更新推送到 Heroku 的主分支時,出現以下錯誤。

我的 Ruby 版本:ruby 2.1.1p76 (2014-02-24 修訂版 45161) [i686-linux]

錯誤:

    nci@nci-VirtualBox:~/Zacchi/kuizu$ git push heroku master
    remote: Compressing source files... done.
    remote: Building source:
    remote: 
    remote: -----> Ruby app detected
    remote: -----> Compiling Ruby/Rails
    remote: -----> Using Ruby version: ruby-2.0.0
    remote: -----> Installing dependencies using 1.7.12
    remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
    remote:        You are trying to install in deployment mode after changing
    remote:        your Gemfile. Run `bundle install` elsewhere and add the
    remote:        updated Gemfile.lock to version control.
    remote:        You have added to the Gemfile:
    remote:        * source: source at /home/nci/Zacchi/kuizu/gemz
    remote:        You have deleted from the Gemfile:
    remote:        * source: source at gemz
    remote:        Bundler Output: You are trying to install in deployment mode after changing
    remote:        your Gemfile. Run `bundle install` elsewhere and add the
    remote:        updated Gemfile.lock to version control.
    remote:        
    remote:        You have added to the Gemfile:
    remote:        * source: source at /home/nci/Zacchi/kuizu/gemz
    remote:        
    remote:        You have deleted from the Gemfile:
    remote:        * source: source at gemz
    remote:  !
    remote:  !     Failed to install gems via Bundler.
    remote:  !
    remote: 
    remote:  !     Push rejected, failed to compile Ruby app
    remote: 
    remote: Verifying deploy....
    remote: 
    remote: !   Push rejected to safe-waters-3501.
    remote: 

寶石檔案:

    source 'https://rubygems.org'

    gem 'bootstrap-sass', '~> 3.2.0'

    gem 'autoprefixer-rails'

    gem 'devise'

    gem 'checkpercentage', '~>0.1.0', :path => "/home/nci/Zacchi/kuizu/gemz"

    # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'

    gem 'rails', '4.2.0'

    # Use sqlite3 as the database for Active Record

    group :development, :test do

     gem 'sqlite3'

    end

    group :production do

     gem 'pg'

    end

    .... more gems ...

這些是我試圖解決這個問題但到目前為止沒有運氣的事情:

  • 捆綁安裝
  • 捆綁安裝 --deployment
  • 重命名 gemfile.lock 然后重新運行 bundle install

任何幫助表示贊賞!

當 Heroku “讀取” /home/nci/Zacchi/kuizu/gemz (或任何其他本地參考)時,它不知道去哪里。 您需要發布您的 gem並從您的 Gemfile 中刪除本地引用。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM