heroku没有使用Gemfile

时间:2017-06-01 10:38:49

标签: ruby-on-rails ruby heroku

我有一个使用ruby-2.3.1的ruby应用程序,它在Gemfile中提到。

但是当我们将应用程序推送到heroku时,它总是最终使用ruby-2.2.4。我已经尝试了所有可能的解决方案,例如更新捆绑器和所有,但没有成功;它仍然使用ruby-2.2.4。我们还重述了dynos。

我们缺少任何有线步骤?

的Gemfile:

source 'https://rubygems.org'
# if there is a super emergency and rubygems is playing up, try
#source 'http://production.cf.rubygems.org'
ruby '2.3.1'
def rails_master?
  ENV["RAILS_MASTER"] == '1'


end

if rails_master?

  gem 'arel', git: 'https://github.com/rails/arel.git'
  gem 'rails', git: 'https://github.com/rails/rails.git'
  gem 'seed-fu', git: 'https://github.com/SamSaffron/seed-fu.git', branch: 'discourse'
else

  # Rails 5 is going to ship with Action Cable, we have no use for it as
  # we already ship MessageBus, AC introduces dependencies on Event Machine,
  # Celluloid and Faye Web Sockets.
  #
  # Note this means upgrading Rails is more annoying, to do so, comment out the
  # explicit dependencies, and add gem 'rails', bundle update rails and then
  # comment back the explicit dependencies. Leaving this in a comment till we
  # upgrade to Rails 5
  #
  # gem 'activesupport'
  # gem 'actionpack'
  # gem 'activerecord'
  # gem 'actionmailer'
  # gem 'activejob'
  # gem 'railties'
  # gem 'sprockets-rails'
  gem 'rails', '~> 4.2'
  gem 'seed-fu', '~> 2.3.5'
end

gem 'mail'
gem 'mime-types', require: 'mime/types/columnar'

gem 'hiredis'
gem 'redis', require:  ["redis", "redis/connection/hiredis"]
gem 'redis-namespace'

gem 'active_model_serializers', '~> 0.8.3'

gem 'onebox'

gem 'http_accept_language', '~>2.0.5', require: false

gem 'ember-rails', '0.18.5'
gem 'ember-source', '2.10.0'
gem 'ember-handlebars-template', '0.7.5'
gem 'barber'
gem 'babel-transpiler'

gem 'message_bus'

gem 'rails_multisite'

gem 'fast_xs'

gem 'fast_xor'

# while we sort out https://github.com/sdsykes/fastimage/pull/46
gem 'discourse_fastimage', '2.0.3', require: 'fastimage'
gem 'aws-sdk', require: false
gem 'excon', require: false
gem 'unf', require: false

gem 'email_reply_trimmer', '0.1.6'

gem 'image_optim'
gem 'multi_json'
gem 'mustache'
gem 'nokogiri'
gem 'omniauth'
gem 'omniauth-openid'
gem 'openid-redis-store'
gem 'omniauth-facebook'
gem 'omniauth-twitter'
gem 'omniauth-instagram'

# forked while https://github.com/intridea/omniauth-github/pull/41 is being upstreamd
gem 'omniauth-github-discourse', require: 'omniauth-github'

gem 'omniauth-oauth2', require: false

gem 'omniauth-google-oauth2'
gem 'oj'
gem 'pg'
gem 'pry-rails', require: false
gem 'r2', '~> 0.2.5', require: false
gem 'rake'

gem 'thor', require: false
gem 'rest-client'
gem 'rinku'
gem 'sanitize'
gem 'sass'
gem 'sass-rails'
gem 'sidekiq'
gem 'sidekiq-statistic'

# for sidekiq web
gem 'sinatra', require: false
gem 'execjs', require: false
gem 'mini_racer'
gem 'highline', require: false
gem 'rack-protection' # security

# Gems used only for assets and not required
# in production environments by default.
# allow everywhere for now cause we are allowing asset debugging in prd
group :assets do
  gem 'uglifier'
  gem 'rtlit', require: false # for css rtling
end

group :test do
  gem 'webmock', require: false
  gem 'fakeweb', '~> 1.3.0', require: false
  gem 'minitest', require: false
  gem 'timecop'
  # TODO: Remove once we upgrade to Rails 5.
  gem 'test_after_commit'
end

group :test, :development do
  gem 'rspec'
  gem 'mock_redis'
  gem 'listen', require: false
  gem 'certified', require: false
  # later appears to break Fabricate(:topic, category: category)
  gem 'fabrication', '2.9.8', require: false
  gem 'discourse-qunit-rails', require: 'qunit-rails'
  gem 'mocha', require: false
  gem 'rb-fsevent', require: RUBY_PLATFORM =~ /darwin/i ? 'rb-fsevent' : false
  gem 'rb-inotify', '~> 0.9', require: RUBY_PLATFORM =~ /linux/i ? 'rb-inotify' : false
  gem 'rspec-rails', require: false
  gem 'shoulda', require: false
  gem 'rspec-html-matchers'
  gem 'spork-rails'
  gem 'pry-nav'
  gem 'byebug', require: ENV['RM_INFO'].nil?
end

group :development do
  gem 'bullet', require: !!ENV['BULLET']
  gem 'better_errors'
  gem 'binding_of_caller'
  gem 'annotate'
  gem 'foreman', require: false
end

# this is an optional gem, it provides a high performance replacement
# to String#blank? a method that is called quite frequently in current
# ActiveRecord, this may change in the future
gem 'fast_blank' #, github: "SamSaffron/fast_blank"

# this provides a very efficient lru cache
gem 'lru_redux'
# gem 'babble'
gem 'htmlentities', require: false

# IMPORTANT: mini profiler monkey patches, so it better be required last
#  If you want to amend mini profiler to do the monkey patches in the railties
#  we are open to it. by deferring require to the initializer we can configure discourse installs without it

gem 'flamegraph', require: false
gem 'rack-mini-profiler', require: false

gem 'unicorn', require: false
gem 'puma', require: false
gem 'rbtrace', require: false, platform: :mri
gem 'gc_tracer', require: false, platform: :mri

# required for feed importing and embedding
#
gem 'ruby-readability', require: false
gem 'simple-rss', require: false

gem 'stackprof', require: false, platform: :mri
gem 'memory_profiler', require: false, platform: :mri

gem 'rmmseg-cpp', require: false

gem 'logster'

gem 'sassc', require: false

Gemfile.lock的

GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (4.2.8)
      actionpack (= 4.2.8)
      actionview (= 4.2.8)
      activejob (= 4.2.8)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 1.0, >= 1.0.5)
    actionpack (4.2.8)
      actionview (= 4.2.8)
      activesupport (= 4.2.8)
      rack (~> 1.6)
      rack-test (~> 0.6.2)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    actionview (4.2.8)
      activesupport (= 4.2.8)
      builder (~> 3.1)
      erubis (~> 2.7.0)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.3)
    active_model_serializers (0.8.3)
      activemodel (>= 3.0)
    activejob (4.2.8)
      activesupport (= 4.2.8)
      globalid (>= 0.3.0)
    activemodel (4.2.8)
      activesupport (= 4.2.8)
      builder (~> 3.1)
    activerecord (4.2.8)
      activemodel (= 4.2.8)
      activesupport (= 4.2.8)
      arel (~> 6.0)
    activesupport (4.2.8)
      i18n (~> 0.7)
      minitest (~> 5.1)
      thread_safe (~> 0.3, >= 0.3.4)
      tzinfo (~> 1.1)
    addressable (2.5.1)
      public_suffix (~> 2.0, >= 2.0.2)
    annotate (2.7.1)
      activerecord (>= 3.2, < 6.0)
      rake (>= 10.4, < 12.0)
    arel (6.0.4)
    aws-sdk (2.9.27)
      aws-sdk-resources (= 2.9.27)
    aws-sdk-core (2.9.27)
      aws-sigv4 (~> 1.0)
      jmespath (~> 1.0)
    aws-sdk-resources (2.9.27)
      aws-sdk-core (= 2.9.27)
    aws-sigv4 (1.0.0)
    babel-source (5.8.35)
    babel-transpiler (0.7.0)
      babel-source (>= 4.0, < 6)
      execjs (~> 2.0)
    barber (0.11.3)
      ember-source (>= 1.0, < 3)
      execjs (>= 1.2, < 3)
    better_errors (2.1.1)
      coderay (>= 1.0.0)
      erubis (>= 2.6.6)
      rack (>= 0.9.0)
    binding_of_caller (0.7.2)
      debug_inspector (>= 0.0.1)
    builder (3.2.3)
    bullet (5.5.1)
      activesupport (>= 3.0.0)
      uniform_notifier (~> 1.10.0)
    byebug (9.0.6)
    certified (1.0.0)
    coderay (1.1.1)
    concurrent-ruby (1.0.5)
    connection_pool (2.2.1)
    crack (0.4.3)
      safe_yaml (~> 1.0.0)
    crass (1.0.2)
    debug_inspector (0.0.3)
    diff-lcs (1.3)
    discourse-qunit-rails (0.0.9)
      railties
    discourse_fastimage (2.0.3)
    domain_name (0.5.20170404)
      unf (>= 0.0.5, < 1.0.0)
    email_reply_trimmer (0.1.6)
    ember-data-source (2.14.0.beta.2)
      ember-source (>= 2, < 3.0)
    ember-handlebars-template (0.7.5)
      barber (>= 0.11.0)
      sprockets (>= 3.3, < 4)
    ember-rails (0.18.5)
      active_model_serializers
      ember-data-source (>= 1.0.0.beta.5)
      ember-handlebars-template (>= 0.1.1, < 1.0)
      ember-source (>= 1.1.0)
      jquery-rails (>= 1.0.17)
      railties (>= 3.1)
    ember-source (2.10.0)
    erubis (2.7.0)
    excon (0.56.0)
    execjs (2.7.0)
    exifr (1.2.5)
    fabrication (2.9.8)
    fakeweb (1.3.0)
    faraday (0.11.0)
      multipart-post (>= 1.2, < 3)
    fast_blank (1.0.0)
    fast_xor (1.1.3)
      rake
      rake-compiler
    fast_xs (0.8.0)
    ffi (1.9.18)
    flamegraph (0.9.5)
    foreman (0.84.0)
      thor (~> 0.19.1)
    fspath (3.1.0)
    gc_tracer (1.5.1)
    globalid (0.4.0)
      activesupport (>= 4.2.0)
    guess_html_encoding (0.0.11)
    hashdiff (0.3.4)
    hashie (3.5.5)
    highline (1.7.8)
    hiredis (0.6.1)
    htmlentities (4.3.4)
   http-cookie (1.0.3)
      domain_name (~> 0.5)
    http_accept_language (2.0.5)
    i18n (0.8.4)
    image_optim (0.24.3)
      exifr (~> 1.2, >= 1.2.2)
      fspath (~> 3.0)
      image_size (~> 1.5)
      in_threads (~> 1.3)
      progress (~> 3.0, >= 3.0.1)
    image_size (1.5.0)
    in_threads (1.4.0)
    jmespath (1.3.1)
    jquery-rails (4.3.1)
      rails-dom-testing (>= 1, < 3)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    jwt (1.5.6)
    kgio (2.11.0)
    libv8 (5.3.332.38.5)
    listen (3.1.5)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
      ruby_dep (~> 1.2)
    logster (1.2.7)
    loofah (2.0.3)
      nokogiri (>= 1.5.9)
    lru_redux (1.1.0)
    mail (2.6.5)
      mime-types (>= 1.16, < 4)
    memory_profiler (0.9.8)
    message_bus (2.0.2)
      rack (>= 1.1.3)
    metaclass (0.0.4)
    method_source (0.8.2)
    mime-types (3.1)
      mime-types-data (~> 3.2015)
    mime-types-data (3.2016.0521)
    mini_portile2 (2.1.0)
    mini_racer (0.1.9)
     libv8 (~> 5.3)
    minitest (5.10.2)
    mocha (1.2.1)
      metaclass (~> 0.0.1)
    mock_redis (0.17.3)
    moneta (1.0.0)
    msgpack (1.1.0)
    multi_json (1.12.1)
    multi_xml (0.6.0)
    multipart-post (2.0.0)
    mustache (1.0.5)
    netrc (0.11.0)
    nokogiri (1.7.2)
      mini_portile2 (~> 2.1.0)
    nokogumbo (1.4.11)
      nokogiri
    oauth (0.5.3)
    oauth2 (1.3.1)
      faraday (>= 0.8, < 0.12)
      jwt (~> 1.0)
      multi_json (~> 1.3)
      multi_xml (~> 0.5)
      rack (>= 1.2, < 3)
    oj (3.0.10)
    omniauth (1.6.1)
      hashie (>= 3.4.6, < 3.6.0)
      rack (>= 1.6.2, < 3)
    omniauth-facebook (4.0.0)
      omniauth-oauth2 (~> 1.2)
    omniauth-github-discourse (1.1.2)
      omniauth (~> 1.0)
      omniauth-oauth2 (~> 1.1)
    omniauth-google-oauth2 (0.5.0)
      jwt (~> 1.5)
      multi_json (~> 1.3)
      omniauth (>= 1.1.1)
      omniauth-oauth2 (>= 1.3.1)
    omniauth-instagram (1.1.0)
      omniauth (~> 1)
      omniauth-oauth2 (~> 1)
    omniauth-oauth (1.1.0)
      oauth
      omniauth (~> 1.0)
    omniauth-oauth2 (1.4.0)
      oauth2 (~> 1.0)
      omniauth (~> 1.2)
    omniauth-openid (1.0.1)
      omniauth (~> 1.0)
      rack-openid (~> 1.3.1)
    omniauth-twitter (1.4.0)
      omniauth-oauth (~> 1.1)
      rack
    onebox (1.8.8)
      fast_blank (>= 1.0.0)
      htmlentities (~> 4.3)
      moneta (~> 1.0)
      multi_json (~> 1.11)
      mustache
      nokogiri (~> 1.7)
      sanitize
    openid-redis-store (0.0.2)
      redis
      ruby-openid
    pg (0.20.0)
    progress (3.3.1)
    pry (0.10.4)
      coderay (~> 1.1.0)
      method_source (~> 0.8.1)
      slop (~> 3.4)
    pry-nav (0.2.4)
      pry (>= 0.9.10, < 0.11.0)
    pry-rails (0.3.6)
      pry (>= 0.10.4)
    public_suffix (2.0.5)
    puma (3.8.2)
    r2 (0.2.6)
    rack (1.6.8)
    rack-mini-profiler (0.10.5)
      rack (>= 1.2.0)
    rack-openid (1.3.1)
      rack (>= 1.1.0)
      ruby-openid (>= 2.1.8)
    rack-protection (1.5.3)
      rack
    rack-test (0.6.3)
      rack (>= 1.0)
    rails (4.2.8)
      actionmailer (= 4.2.8)
      actionpack (= 4.2.8)
      actionview (= 4.2.8)
      activejob (= 4.2.8)
      activemodel (= 4.2.8)
      activerecord (= 4.2.8)
      activesupport (= 4.2.8)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.2.8)
      sprockets-rails
    rails-deprecated_sanitizer (1.0.3)
      activesupport (>= 4.2.0.alpha)
    rails-dom-testing (1.0.8)
      activesupport (>= 4.2.0.beta, < 5.0)
      nokogiri (~> 1.6)
      rails-deprecated_sanitizer (>= 1.0.1)
    rails-html-sanitizer (1.0.3)
      loofah (~> 2.0)
    rails_multisite (1.0.6)
      rails (> 4.2, < 5)
    railties (4.2.8)
      actionpack (= 4.2.8)
      activesupport (= 4.2.8)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    raindrops (0.18.0)
    rake (11.3.0)
    rake-compiler (1.0.4)
      rake
    rb-fsevent (0.9.8)
    rb-inotify (0.9.8)
      ffi (>= 0.5.0)
    rbtrace (0.4.8)
      ffi (>= 1.0.6)
      msgpack (>= 0.4.3)
      trollop (>= 1.16.2)
    redis (3.3.3)
    redis-namespace (1.5.3)
      redis (~> 3.0, >= 3.0.4)
    rest-client (2.0.2)
      http-cookie (>= 1.0.2, < 2.0)
      mime-types (>= 1.16, < 4.0)
      netrc (~> 0.8)
    rinku (2.0.2)
    rmmseg-cpp (0.2.9)
    rspec (3.6.0)
      rspec-core (~> 3.6.0)
      rspec-expectations (~> 3.6.0)
      rspec-mocks (~> 3.6.0)
    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-html-matchers (0.9.1)
      nokogiri (~> 1)
      rspec (>= 3.0.0.a, < 4)
    rspec-mocks (3.6.0)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.6.0)
    rspec-rails (3.6.0)
      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)
    rtlit (0.0.5)
    ruby-openid (2.7.0)
    ruby-readability (0.7.0)
      guess_html_encoding (>= 0.0.4)
      nokogiri (>= 1.6.0)
    ruby_dep (1.5.0)
    safe_yaml (1.0.4)
    sanitize (4.4.0)
      crass (~> 1.0.2)
      nokogiri (>= 1.4.4)
      nokogumbo (~> 1.4.1)
    sass (3.4.24)
    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)
    sassc (1.11.2)
      bundler
      ffi (~> 1.9.6)
      sass (>= 3.3.0)
    seed-fu (2.3.6)
      activerecord (>= 3.1)
      activesupport (>= 3.1)
    shoulda (3.5.0)
      shoulda-context (~> 1.0, >= 1.0.1)
      shoulda-matchers (>= 1.4.1, < 3.0)
    shoulda-context (1.2.2)
    shoulda-matchers (2.8.0)
      activesupport (>= 3.0.0)
    sidekiq (4.2.10)
      concurrent-ruby (~> 1.0)
      connection_pool (~> 2.2, >= 2.2.0)
      rack-protection (>= 1.5.0)
      redis (~> 3.2, >= 3.2.1)
    sidekiq-statistic (1.2.0)
      sidekiq (>= 3.3.4, < 5)
    simple-rss (1.3.1)
    sinatra (1.4.8)
      rack (~> 1.5)
      rack-protection (~> 1.4)
      tilt (>= 1.3, < 3)
    slop (3.6.0)
    spork (1.0.0rc4)
    spork-rails (4.0.0)
      rails (>= 3.0.0, < 5)
      spork (>= 1.0rc0)
    sprockets (3.7.1)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.2.0)
      actionpack (>= 4.0)
      activesupport (>= 4.0)
      sprockets (>= 3.0.0)
    stackprof (0.2.10)
    test_after_commit (1.1.0)
      activerecord (>= 3.2)
    thor (0.19.4)
    thread_safe (0.3.6)
   tilt (2.0.7)
    timecop (0.8.1)
    trollop (2.1.2)
    tzinfo (1.2.3)
      thread_safe (~> 0.1)
    uglifier (3.2.0)
      execjs (>= 0.3.0, < 3)
    unf (0.1.4)
      unf_ext
    unf_ext (0.0.7.4)
    unicorn (5.3.0)
      kgio (~> 2.6)
      raindrops (~> 0.7)
    uniform_notifier (1.10.0)
    webmock (3.0.1)
      addressable (>= 2.3.6)
      crack (>= 0.3.2)
      hashdiff

PLATFORMS
  ruby

DEPENDENCIES
  active_model_serializers (~> 0.8.3)
  annotate
  aws-sdk
  babel-transpiler
  barber
  better_errors
  binding_of_caller
  bullet
  byebug
  certified
  discourse-qunit-rails
  discourse_fastimage (= 2.0.3)
  email_reply_trimmer (= 0.1.6)
  ember-handlebars-template (= 0.7.5)
  ember-rails (= 0.18.5)
  ember-source (= 2.10.0)
  excon
  execjs
  fabrication (= 2.9.8)
  fakeweb (~> 1.3.0)
  fast_blank
  fast_xor
  fast_xs
  flamegraph
  foreman
  gc_tracer
  highline
  hiredis
  htmlentities
  http_accept_language (~> 2.0.5)
  image_optim
  listen
  logster
  lru_redux
  mail
  memory_profiler
  message_bus
  mime-types
  mini_racer
  minitest
  mocha
  mock_redis
  multi_json
  mustache
  nokogiri
  oj
  omniauth
  omniauth-facebook
  omniauth-github-discourse
  omniauth-google-oauth2
  omniauth-instagram
  omniauth-oauth2
  omniauth-openid
  omniauth-twitter
  onebox
  openid-redis-store
  pg
  pry-nav
  pry-rails
  puma
  r2 (~> 0.2.5)
  rack-mini-profiler
  rack-protection
  rails (~> 4.2)
  rails_multisite
  rake
  rb-fsevent
  rb-inotify (~> 0.9)
  rbtrace
  redis
  redis-namespace
  rest-client
  rinku
  rmmseg-cpp
  rspec
  rspec-html-matchers
  rspec-rails
  rtlit
  ruby-readability
  sanitize
  sass
  sass-rails
  sassc
  seed-fu (~> 2.3.5)
  shoulda
  sidekiq
  sidekiq-statistic
  simple-rss
  sinatra
  spork-rails
  stackprof
  test_after_commit
  thor
  timecop
  uglifier
  unf
  unicorn
  webmock

RUBY VERSION
   ruby 2.3.1p112

BUNDLED WITH
   1.15.0

1 个答案:

答案 0 :(得分:1)

Heroku不支持Ruby 2.3.1(MRI)。

  

Heroku支持以下Ruby版本及相关的版本   RubyGems的。支持的版本意味着您可以期待我们的工具和   使用给定版本的平台。这也意味着你可以收到   技术支援。以下是我们支持的Ruby版本:

     

MRI:

     
      
  • 2.2.7:patchlevel 470,Rubygems:2.4.5.2
  •   
  • 2.3.4:patchlevel 301,Rubygems:2.5.2
  •   
  • 2.4.1:patchlevel 111,Rubygems:2.6.11
  •   
     

https://devcenter.heroku.com/articles/ruby-support#ruby-versions

如果您指定的Ruby版本不可用,Heroku将选择下一个次要版本。我建议您根据生产中可用的内容选择Ruby版本,而不是相反。