我是新手,试图将我的Rails应用程序推送到heroku,但它说推送被拒绝。
我已经研究了一些关于stackoverflow的类似问题,但是没有一种解决方案似乎可以为我解决它。
这是终端的代码
Counting objects: 234, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (200/200), done.
Writing objects: 100% (234/234), 393.61 KiB | 0 bytes/s, done.
Total 234 (delta 37), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote:
remote: !
remote: ! There was an error parsing your Gemfile, we cannot continue
remote: ! /app/tmp/buildpacks/b7af5642714be4eddaa5f35e2b4c36176b839b4abcd9bfe57ee71c358d71152b4fd2cf925c5b6e6816adee359c4f0f966b663a7f8649b0729509d510091abc07/vendor/ruby/heroku-18/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)
remote: ! from /app/tmp/buildpacks/b7af5642714be4eddaa5f35e2b4c36176b839b4abcd9bfe57ee71c358d71152b4fd2cf925c5b6e6816adee359c4f0f966b663a7f8649b0729509d510091abc07/vendor/ruby/heroku-18/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
remote: ! from /tmp/d20190419-87-z1jfer/bundler-2.0.1/bin/bundle:23:in `<main>'
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to london-learning.
remote:
To https://git.heroku.com/london-learning.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/london-learning.git'
这是我的Gemfile
source 'https://rubygems.org'
ruby '2.4.4'
gem 'bootsnap', require: false
gem 'devise'
gem 'jbuilder', '~> 2.0'
gem 'pg', '~> 0.21'
gem 'puma'
gem 'rails', '5.2.1'
gem 'redis'
gem 'autoprefixer-rails'
gem 'font-awesome-sass', '~> 5.6.1'
gem 'sassc-rails'
gem 'simple_form'
gem 'uglifier'
gem 'webpacker'
group :development do
gem 'web-console', '>= 3.3.0'
end
group :development, :test do
gem 'pry-byebug'
gem 'pry-rails'
gem 'listen', '~> 3.0.5'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'dotenv-rails'
end
任何帮助都将不胜感激。谢谢!
答案 0 :(得分:0)
尝试手动安装捆绑软件
gem install bundler -v 1.17.3
bundle _1.17.3_ install
git commit -am "Bundler 1.17.3 was installed"
git push heroku master