无法将自定义 gem 推送到 heroku master
Unable to push a custom gem to heroku master
我在 'gemz' 文件夹中创建了一个简单的自定义 gem 并在 gem 文件 ('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 ...
这些是我试图解决这个问题但到目前为止没有成功的方法:
- 捆绑安装
- 捆绑安装--部署
- 重命名 gemfile.lock 然后重新运行 bundle install
感谢任何帮助!
当 Heroku "reads" /home/nci/Zacchi/kuizu/gemz
(或任何其他本地引用)时,它不知道去哪里。您需要 publish your gem 并从您的 Gemfile 中删除本地引用。
我在 'gemz' 文件夹中创建了一个简单的自定义 gem 并在 gem 文件 ('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 ...
这些是我试图解决这个问题但到目前为止没有成功的方法:
- 捆绑安装
- 捆绑安装--部署
- 重命名 gemfile.lock 然后重新运行 bundle install
感谢任何帮助!
当 Heroku "reads" /home/nci/Zacchi/kuizu/gemz
(或任何其他本地引用)时,它不知道去哪里。您需要 publish your gem 并从您的 Gemfile 中删除本地引用。