Rails应用程序 - Heroku推送拒绝 - 看似Gemfile和Gemfile.lock问题

时间:2018-02-21 14:39:04

标签: ruby-on-rails heroku gemfile gemfile.lock

当我尝试将我的主分支推送到Heroku时,我在控制台中获得以下输出。我已经尝试过运行bundle install,但这并没有解决。我已将Gemfile.lock检入版本控制但不确定是否存在 我的Gemfile和Gemfile.lock之间的差异导致了问题。

非常感谢任何帮助 - 谢谢!

*redacted*
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:        The git source `git://github.com/thoughtbot/administrate.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
remote:        Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
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:        The list of sources changed
remote:        You have added to the Gemfile:
remote:        * source: git://github.com/thoughtbot/administrate.git (at master)
remote:        You have deleted from the Gemfile:
remote:        * source: https://github.com/thoughtbot/administrate.git (at master@7e807a4)
remote:        Bundler Output: The git source `git://github.com/thoughtbot/administrate.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
remote:        Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
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:
remote:        The list of sources changed
remote:
remote:        You have added to the Gemfile:
remote:        * source: git://github.com/thoughtbot/administrate.git (at master)
remote:
remote:        You have deleted from the Gemfile:
remote:        * source: https://github.com/thoughtbot/administrate.git (at master@7e807a4)
remote:  !
remote:  !     Failed to install gems via Bundler.
remote:  !
remote:  !     Push rejected, failed to compile Ruby app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !   Push rejected to *redacted*.
remote:
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to *redacted*

的Gemfile:

# Gemfile
source 'https://rubygems.org'

ruby '2.4.1'

# Core
gem 'rails', '~> 5.1.3'
gem 'pg'
gem 'puma'
gem 'sprockets', '>= 3.0.0'
gem 'title'

# Production
group :production do
  gem 'rack-timeout'
end

# Jobs
gem 'delayed_job_active_record'

# Authentication/Authorization
gem 'pundit'
gem 'devise'

# New Frontend
gem 'sass-rails', '~> 5.0'
gem 'bootstrap', '~> 4.0.0.beta'
gem 'jquery-rails', '~> 4.3'
gem 'administrate', github: 'thoughtbot/administrate'
gem 'htmlrender'

# Admin UI
gem 'bourbon'
gem 'neat'

# Geolocation
# gem 'geokit-rails'
gem 'geocoder'

# Development/Test
group :development do
  gem 'listen'
  gem 'rack-mini-profiler', require: false
  gem 'spring'
  gem 'spring-commands-rspec'
  gem 'web-console'
  gem 'guard'
  gem 'guard-livereload', '~> 2.5', require: false
  gem "rack-livereload"
end

group :development, :test do
  gem 'faker'
  gem 'awesome_print'
  gem 'bullet'
  gem 'bundler-audit', '>= 0.5.0', require: false
  gem 'dotenv-rails'
  gem 'factory_girl_rails'
  gem 'pry-byebug'
  gem 'pry-rails'
  gem 'rspec-rails', '~> 3.6'
end

group :test do
  gem 'capybara-webkit'
  gem 'capybara-screenshot'
  gem 'database_cleaner'
  gem 'launchy'
  gem 'shoulda-matchers'
  gem 'simplecov', require: false
end

Gemfile.lock的:

GIT
  remote: https://github.com/thoughtbot/administrate.git
  revision: 7e807a4c29d417848628c2d81b7fa08a89a5101e
  specs:
    administrate (0.8.1)
      actionpack (>= 4.2, < 5.2)
      actionview (>= 4.2, < 5.2)
      activerecord (>= 4.2, < 5.2)
      autoprefixer-rails (>= 6.0)
      datetime_picker_rails (~> 0.0.7)
      jquery-rails (>= 4.0)
      kaminari (>= 1.0)
      momentjs-rails (~> 2.8)
      sass-rails (~> 5.0)
      selectize-rails (~> 0.6)

GEM
  remote: https://rubygems.org/
  specs:
    actioncable (5.1.4)
      actionpack (= 5.1.4)
      nio4r (~> 2.0)
      websocket-driver (~> 0.6.1)
    actionmailer (5.1.4)
      actionpack (= 5.1.4)
      actionview (= 5.1.4)
      activejob (= 5.1.4)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 2.0)
    actionpack (5.1.4)
      actionview (= 5.1.4)
      activesupport (= 5.1.4)
      rack (~> 2.0)
      rack-test (>= 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    actionview (5.1.4)
      activesupport (= 5.1.4)
      builder (~> 3.1)
      erubi (~> 1.4)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.3)
    activejob (5.1.4)
      activesupport (= 5.1.4)
      globalid (>= 0.3.6)
    activemodel (5.1.4)
      activesupport (= 5.1.4)
    activerecord (5.1.4)
      activemodel (= 5.1.4)
      activesupport (= 5.1.4)
      arel (~> 8.0)
    activesupport (5.1.4)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (~> 0.7)
      minitest (~> 5.1)
      tzinfo (~> 1.1)
    addressable (2.5.2)
      public_suffix (>= 2.0.2, < 4.0)
    arel (8.0.0)
    autoprefixer-rails (7.1.5)
      execjs
    awesome_print (1.8.0)
    bcrypt (3.1.11)
    bootstrap (4.0.0.beta)
      autoprefixer-rails (>= 6.0.3)
      popper_js (~> 1.11.1)
      sass (>= 3.4.19)
    bourbon (4.3.4)
      sass (~> 3.4)
      thor (~> 0.19)
    builder (3.2.3)
    bullet (5.6.1)
      activesupport (>= 3.0.0)
      uniform_notifier (~> 1.10.0)
    bundler-audit (0.6.0)
      bundler (~> 1.2)
      thor (~> 0.18)
    byebug (9.1.0)
    capybara (2.13.0)
      addressable
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      xpath (~> 2.0)
    capybara-screenshot (1.0.18)
      capybara (>= 1.0, < 3)
      launchy
    capybara-webkit (1.14.0)
      capybara (>= 2.3.0, < 2.14.0)
      json
    coderay (1.1.1)
    concurrent-ruby (1.0.5)
    crass (1.0.2)
    database_cleaner (1.6.1)
    datetime_picker_rails (0.0.7)
      momentjs-rails (>= 2.8.1)
    debug_inspector (0.0.3)
    delayed_job (4.1.3)
      activesupport (>= 3.0, < 5.2)
    delayed_job_active_record (4.1.2)
      activerecord (>= 3.0, < 5.2)
      delayed_job (>= 3.0, < 5)
    devise (4.3.0)
      bcrypt (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 4.1.0, < 5.2)
      responders
      warden (~> 1.2.3)
    diff-lcs (1.3)
    docile (1.1.5)
    dotenv (2.2.1)
    dotenv-rails (2.2.1)
      dotenv (= 2.2.1)
      railties (>= 3.2, < 5.2)
    em-websocket (0.5.1)
      eventmachine (>= 0.12.9)
      http_parser.rb (~> 0.6.0)
    erubi (1.7.0)
    eventmachine (1.2.5)
    execjs (2.7.0)
    factory_girl (4.8.0)
      activesupport (>= 3.0.0)
    factory_girl_rails (4.8.0)
      factory_girl (~> 4.8.0)
      railties (>= 3.0.0)
    faker (1.7.3)
      i18n (~> 0.5)
    ffi (1.9.18)
    formatador (0.2.5)
    geocoder (1.4.5)
    globalid (0.4.0)
      activesupport (>= 4.2.0)
    guard (2.14.1)
      formatador (>= 0.2.4)
      listen (>= 2.7, < 4.0)
      lumberjack (~> 1.0)
      nenv (~> 0.1)
      notiffany (~> 0.0)
      pry (>= 0.9.12)
      shellany (~> 0.0)
      thor (>= 0.18.1)
    guard-compat (1.2.1)
    guard-livereload (2.5.2)
      em-websocket (~> 0.5)
      guard (~> 2.8)
      guard-compat (~> 1.0)
      multi_json (~> 1.8)
    htmlrender (0.0.0)
    http_parser.rb (0.6.0)
    i18n (0.8.6)
    jquery-rails (4.3.1)
      rails-dom-testing (>= 1, < 3)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    json (2.1.0)
    kaminari (1.1.1)
      activesupport (>= 4.1.0)
      kaminari-actionview (= 1.1.1)
      kaminari-activerecord (= 1.1.1)
      kaminari-core (= 1.1.1)
    kaminari-actionview (1.1.1)
      actionview
      kaminari-core (= 1.1.1)
    kaminari-activerecord (1.1.1)
      activerecord
      kaminari-core (= 1.1.1)
    kaminari-core (1.1.1)
    launchy (2.4.3)
      addressable (~> 2.3)
    listen (3.0.8)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
    loofah (2.1.1)
      crass (~> 1.0.2)
      nokogiri (>= 1.5.9)
    lumberjack (1.0.12)
    mail (2.6.6)
      mime-types (>= 1.16, < 4)
    method_source (0.8.2)
    mime-types (3.1)
      mime-types-data (~> 3.2015)
    mime-types-data (3.2016.0521)
    mini_portile2 (2.3.0)
    minitest (5.10.3)
    momentjs-rails (2.17.1)
      railties (>= 3.1)
    multi_json (1.12.2)
    neat (2.1.0)
      sass (~> 3.4)
      thor (~> 0.19)
    nenv (0.3.0)
    nio4r (2.1.0)
    nokogiri (1.8.1)
      mini_portile2 (~> 2.3.0)
    notiffany (0.1.1)
      nenv (~> 0.1)
      shellany (~> 0.0)
    orm_adapter (0.5.0)
    pg (0.18.4)
    popper_js (1.11.1)
    pry (0.10.4)
      coderay (~> 1.1.0)
      method_source (~> 0.8.1)
      slop (~> 3.4)
    pry-byebug (3.5.0)
      byebug (~> 9.1)
      pry (~> 0.10)
    pry-rails (0.3.6)
      pry (>= 0.10.4)
    public_suffix (3.0.0)
    puma (3.10.0)
    pundit (1.1.0)
      activesupport (>= 3.0.0)
    rack (2.0.3)
    rack-livereload (0.3.16)
      rack
    rack-mini-profiler (0.10.5)
      rack (>= 1.2.0)
    rack-test (0.7.0)
      rack (>= 1.0, < 3)
    rack-timeout (0.4.2)
    rails (5.1.4)
      actioncable (= 5.1.4)
      actionmailer (= 5.1.4)
      actionpack (= 5.1.4)
      actionview (= 5.1.4)
      activejob (= 5.1.4)
      activemodel (= 5.1.4)
      activerecord (= 5.1.4)
      activesupport (= 5.1.4)
      bundler (>= 1.3.0)
      railties (= 5.1.4)
      sprockets-rails (>= 2.0.0)
    rails-dom-testing (2.0.3)
      activesupport (>= 4.2.0)
      nokogiri (>= 1.6)
    rails-html-sanitizer (1.0.3)
      loofah (~> 2.0)
    railties (5.1.4)
      actionpack (= 5.1.4)
      activesupport (= 5.1.4)
      method_source
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (12.1.0)
    rb-fsevent (0.9.8)
    rb-inotify (0.9.8)
      ffi (>= 0.5.0)
    responders (2.4.0)
      actionpack (>= 4.2.0, < 5.3)
      railties (>= 4.2.0, < 5.3)
    rspec-core (3.6.0)
      rspec-support (~> 3.6.0)
    rspec-expectations (3.6.0)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.6.0)
    rspec-mocks (3.6.0)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.6.0)
    rspec-rails (3.6.1)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      railties (>= 3.0)
      rspec-core (~> 3.6.0)
      rspec-expectations (~> 3.6.0)
      rspec-mocks (~> 3.6.0)
      rspec-support (~> 3.6.0)
    rspec-support (3.6.0)
    sass (3.5.2)
      sass-listen (~> 4.0.0)
    sass-listen (4.0.0)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
    sass-rails (5.0.6)
      railties (>= 4.0.0, < 6)
      sass (~> 3.1)
      sprockets (>= 2.8, < 4.0)
      sprockets-rails (>= 2.0, < 4.0)
      tilt (>= 1.1, < 3)
    selectize-rails (0.12.4.1)
    shellany (0.0.1)
    shoulda-matchers (3.1.2)
      activesupport (>= 4.0.0)
    simplecov (0.14.1)
      docile (~> 1.1.0)
      json (>= 1.8, < 3)
      simplecov-html (~> 0.10.0)
    simplecov-html (0.10.1)
    slop (3.6.0)
    spring (1.7.2)
    spring-commands-rspec (1.0.4)
      spring (>= 0.9.1)
    sprockets (3.7.1)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.2.1)
      actionpack (>= 4.0)
      activesupport (>= 4.0)
      sprockets (>= 3.0.0)
    thor (0.20.0)
    thread_safe (0.3.6)
    tilt (2.0.8)
    title (0.0.7)
      i18n
      rails (>= 3.1)
    tzinfo (1.2.3)
      thread_safe (~> 0.1)
    uniform_notifier (1.10.0)
    warden (1.2.7)
      rack (>= 1.0)
    web-console (3.1.1)
      activemodel (>= 4.2)
      debug_inspector
      railties (>= 4.2)
    websocket-driver (0.6.5)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.2)
    xpath (2.1.0)
      nokogiri (~> 1.3)

PLATFORMS
  ruby

DEPENDENCIES
  administrate!
  awesome_print
  bootstrap (~> 4.0.0.beta)
  bourbon
  bullet
  bundler-audit (>= 0.5.0)
  capybara-screenshot
  capybara-webkit
  database_cleaner
  delayed_job_active_record
  devise
  dotenv-rails
  factory_girl_rails
  faker
  geocoder
  guard
  guard-livereload (~> 2.5)
  htmlrender
  jquery-rails (~> 4.3)
  launchy
  listen
  neat
  pg
  pry-byebug
  pry-rails
  puma
  pundit
  rack-livereload
  rack-mini-profiler
  rack-timeout
  rails (~> 5.1.3)
  rspec-rails (~> 3.6)
  sass-rails (~> 5.0)
  shoulda-matchers
  simplecov
  spring
  spring-commands-rspec
  sprockets (>= 3.0.0)
  title
  web-console

RUBY VERSION
   ruby 2.4.1p111

BUNDLED WITH
   1.16.1

这是我尝试安装ffi时遇到的错误

*redacted*-Air:sample_a *redacted*$ gem install ffi -v '1.9.21'
Building native extensions.  This could take a while...
ERROR:  Error installing ffi:
    ERROR: Failed to build gem native extension.

    current directory: /Users/*redacted*/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/ffi-1.9.21/ext/ffi_c
/Users/*redacted*/.rbenv/versions/2.4.1/bin/ruby -r ./siteconf20180221-3659-wisspp.rb extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... no
checking for shlwapi.h... no
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
creating extconf.h
creating Makefile

current directory: /Users/*redacted*/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/ffi-1.9.21/ext/ffi_c
make "DESTDIR=" clean

current directory: /Users/*redacted*/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/ffi-1.9.21/ext/ffi_c
make "DESTDIR="
Running autoreconf for libffi
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I m4 --output=aclocal.m4t
Can't exec "aclocal": No such file or directory at /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf: failed to run aclocal: No such file or directory
make: *** ["/Users/*redacted*/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/ffi-1.9.21/ext/ffi_c/libffi-x86_64-darwin16"/.libs/libffi_convenience.a] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/*redacted*/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/ffi-1.9.21 for inspection.
Results logged to /Users/*redacted*/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-16/2.4.0-static/ffi-1.9.21/gem_make.out
*redacted*-Air:sample_a *red$

1 个答案:

答案 0 :(得分:1)

删除Gemfile.lock并再次运行bundle install