zacchi
zacchi

Reputation: 37

Unable to push a custom gem to heroku master

I have created a simple custom gem in 'gemz' folder and configured in gemfile ('checkpercentage', '~>0.1.0') and it works fine in my application but can't deploy it to heroku.

I'm getting the following error when trying to push my updates into my master branch at Heroku.

my Ruby version: ruby 2.1.1p76 (2014-02-24 revision 45161) [i686-linux]

Error:

    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: 

Gemfile:

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

These are the things I tried to fix this problem but had no luck so far:

Any help is appreciated!

Upvotes: 0

Views: 371

Answers (1)

sebkkom
sebkkom

Reputation: 1446

When Heroku "reads" /home/nci/Zacchi/kuizu/gemz (or any other local reference) it doesn't know where to go. You need to publish your gem and remove the local reference from your Gemfile.

Upvotes: 1

Related Questions