RJB 在 Heroku Cedar 上运行良好,在 Cedar 14 上莫名其妙地损坏?
RJB works fine on Heroku Cedar, inexplicably broken on Cedar 14?
所以,就像一个优秀的程序员应该做的那样,我正在为即将到来的 Cedar-14 过渡准备一份申请。
程序在 Cedar 10 上运行良好。在 Cedar 14 上不起作用,RJB 存在某种问题。当我尝试在此处推送应用程序时出现错误:
Counting objects: 7, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 635 bytes | 0 bytes/s, done.
Total 7 (delta 5), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.1.5
remote: -----> Installing dependencies using 1.9.7
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Using rake 10.4.2
remote: Using i18n 0.7.0
remote: Using json 1.8.3
remote: Using minitest 5.8.0
remote: Using thread_safe 0.3.5
remote: Using builder 3.2.2
remote: Using erubis 2.7.0
remote: Using rack 1.5.5
remote: Using mime-types 1.25.1
remote: Using polyglot 0.3.5
remote: Using arel 5.0.1.20140414130214
remote: Using bcrypt 3.1.10
remote: Using sass 3.2.19
remote: Using cancancan 1.12.0
remote: Using cocoon 1.2.6
remote: Using coffee-script-source 1.9.1.1
remote: Using CFPropertyList 2.3.1
remote: Using execjs 2.5.2
remote: Using thor 0.19.1
remote: Using commonjs 0.2.7
remote: Using currencies 0.4.2
remote: Using i18n_data 0.7.0
remote: Using orm_adapter 0.5.0
remote: Using excon 0.45.4
remote: Using formatador 0.2.5
remote: Using net-ssh 2.9.2
remote: Using mini_portile 0.6.2
remote: Using multi_json 1.11.2
remote: Using ipaddress 0.8.0
remote: Using inflecto 0.0.2
remote: Using tilt 1.4.1
remote: Using sexp_processor 4.6.0
remote: Using hike 1.2.3
remote: Using libv8 3.16.14.11
remote: Using nested_form 0.3.2
remote: Using pdf-core 0.2.5
remote: Using pdf-merger 0.3.2
remote: Using pg 0.18.2
remote: Using phony 2.14.13
remote: Using ttfunk 1.2.2
remote: Using bundler 1.9.7
remote: Using rails_serve_static_assets 0.0.4
remote: Using rails_stdout_logging 0.0.3
remote: Using ref 2.0.0
remote: Using tlsmail 0.0.1
remote: Using rdoc 4.2.0
remote: Using tzinfo 1.2.2
remote: Using rack-test 0.6.3
remote: Using warden 1.2.3
remote: Using rack-cache 1.2
remote: Using treetop 1.4.15
remote: Using bootstrap-sass 3.1.1.1
remote: Using validates_email_format_of 1.6.3
remote: Using coffee-script 2.4.1
remote: Using uglifier 2.7.1
remote: Using figaro 1.1.1
remote: Using less 2.6.0
remote: Using net-scp 1.2.1
remote: Using nokogiri 1.6.6.2
remote: Using countries 0.11.5
remote: Using haml 4.0.6
remote: Using ruby_parser 3.7.1
remote: Using prawn 1.1.0
remote: Using rails_12factor 0.0.3
remote: Using therubyracer 0.12.2
remote: Using sprockets 2.12.4
remote: Using sdoc 0.4.1
remote: Using activesupport 4.1.0
remote: Using fission 0.5.0
remote: Using mail 2.5.4
remote: Using fog-core 1.32.0
remote: Using html2haml 2.0.0
remote: Using actionview 4.1.0
remote: Using activemodel 4.1.0
remote: Using climate_control 0.0.3
remote: Using jbuilder 1.5.3
remote: Using phony_rails 0.12.9
remote: Using fog-xml 0.1.2
remote: Using fog-json 1.0.2
remote: Using fog-local 0.2.1
remote: Using actionpack 4.1.0
remote: Using activerecord 4.1.0
remote: Using carrierwave 0.10.0
remote: Using cocaine 0.5.7
remote: Using fog-vmfusion 0.1.0
remote: Using fog-brightbox 0.8.0
remote: Using fog-sakuracloud 1.0.1
remote: Using fog-serverlove 0.1.2
remote: Using fog-softlayer 0.4.7
remote: Using fog-storm_on_demand 0.1.1
remote: Using fog-atmos 0.1.0
remote: Using fog-aws 0.7.4
remote: Using fog-ecloud 0.1.1
remote: Using fog-google 0.0.7
remote: Using fog-powerdns 0.1.1
remote: Using fog-profitbricks 0.0.5
remote: Using fog-radosgw 0.0.4
remote: Using fog-riakcs 0.1.0
remote: Using fog-terremark 0.1.0
remote: Using fog-voxel 0.1.0
remote: Using actionmailer 4.1.0
remote: Using railties 4.1.0
remote: Using formtastic 2.2.1
remote: Using less-rails 2.7.0
remote: Using sprockets-rails 2.3.2
remote: Using paperclip 4.2.4
remote: Using fog 1.32.0
remote: Using coffee-rails 4.0.1
remote: Using responders 1.1.2
remote: Using haml-rails 0.9.0
remote: Using jquery-rails 3.1.3
remote: Using formtastic-bootstrap 3.0.0
remote: Using rails 4.1.0
remote: Using mail_form 1.5.0 from git://github.com/plataformatec/mail_form (at master)
remote: Using sass-rails 4.0.5
remote: Using less-rails-bootstrap 3.3.5.0
remote: Using turbolinks 2.5.3
remote: Using devise 3.5.1
remote: Using prawnto_2 0.2.6
remote: Using rails_autolink 1.1.6
remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote: /tmp/build_fefc826e1bdbba09c960a4c215f98122/vendor/ruby-2.1.5/bin/ruby extconf.rb
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_fefc826e1bdbba09c960a4c215f98122/vendor/ruby-2.1.5/bin/ruby
remote: extconf.rb:39:in `<main>': JAVA_HOME is not directory. (RuntimeError)
remote: extconf failed, exit code 1
remote: Gem files will remain installed in /tmp/build_fefc826e1bdbba09c960a4c215f98122/vendor/bundle/ruby/2.1.0/gems/rjb-1.5.3 for inspection.
remote: Results logged to /tmp/build_fefc826e1bdbba09c960a4c215f98122/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/rjb-1.5.3/gem_make.out
remote: An error occurred while installing rjb (1.5.3), and Bundler cannot continue.
remote: Make sure that `gem install rjb -v '1.5.3'` succeeds before bundling.
remote: Bundler Output: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Using rake 10.4.2
remote: Using i18n 0.7.0
remote: Using json 1.8.3
remote: Using minitest 5.8.0
remote: Using thread_safe 0.3.5
remote: Using builder 3.2.2
remote: Using erubis 2.7.0
remote: Using rack 1.5.5
remote: Using mime-types 1.25.1
remote: Using polyglot 0.3.5
remote: Using arel 5.0.1.20140414130214
remote: Using bcrypt 3.1.10
remote: Using sass 3.2.19
remote: Using cancancan 1.12.0
remote: Using cocoon 1.2.6
remote: Using coffee-script-source 1.9.1.1
remote: Using CFPropertyList 2.3.1
remote: Using execjs 2.5.2
remote: Using thor 0.19.1
remote: Using commonjs 0.2.7
remote: Using currencies 0.4.2
remote: Using i18n_data 0.7.0
remote: Using orm_adapter 0.5.0
remote: Using excon 0.45.4
remote: Using formatador 0.2.5
remote: Using net-ssh 2.9.2
remote: Using mini_portile 0.6.2
remote: Using multi_json 1.11.2
remote: Using ipaddress 0.8.0
remote: Using inflecto 0.0.2
remote: Using tilt 1.4.1
remote: Using sexp_processor 4.6.0
remote: Using hike 1.2.3
remote: Using libv8 3.16.14.11
remote: Using nested_form 0.3.2
remote: Using pdf-core 0.2.5
remote: Using pdf-merger 0.3.2
remote: Using pg 0.18.2
remote: Using phony 2.14.13
remote: Using ttfunk 1.2.2
remote: Using bundler 1.9.7
remote: Using rails_serve_static_assets 0.0.4
remote: Using rails_stdout_logging 0.0.3
remote: Using ref 2.0.0
remote: Using tlsmail 0.0.1
remote: Using rdoc 4.2.0
remote: Using tzinfo 1.2.2
remote: Using rack-test 0.6.3
remote: Using warden 1.2.3
remote: Using rack-cache 1.2
remote: Using treetop 1.4.15
remote: Using bootstrap-sass 3.1.1.1
remote: Using validates_email_format_of 1.6.3
remote: Using coffee-script 2.4.1
remote: Using uglifier 2.7.1
remote: Using figaro 1.1.1
remote: Using less 2.6.0
remote: Using net-scp 1.2.1
remote: Using nokogiri 1.6.6.2
remote: Using countries 0.11.5
remote: Using haml 4.0.6
remote: Using ruby_parser 3.7.1
remote: Using prawn 1.1.0
remote: Using rails_12factor 0.0.3
remote: Using therubyracer 0.12.2
remote: Using sprockets 2.12.4
remote: Using sdoc 0.4.1
remote: Using activesupport 4.1.0
remote: Using fission 0.5.0
remote: Using mail 2.5.4
remote: Using fog-core 1.32.0
remote: Using html2haml 2.0.0
remote: Using actionview 4.1.0
remote: Using activemodel 4.1.0
remote: Using climate_control 0.0.3
remote: Using jbuilder 1.5.3
remote: Using phony_rails 0.12.9
remote: Using fog-xml 0.1.2
remote: Using fog-json 1.0.2
remote: Using fog-local 0.2.1
remote: Using actionpack 4.1.0
remote: Using activerecord 4.1.0
remote: Using carrierwave 0.10.0
remote: Using cocaine 0.5.7
remote: Using fog-vmfusion 0.1.0
remote: Using fog-brightbox 0.8.0
remote: Using fog-sakuracloud 1.0.1
remote: Using fog-serverlove 0.1.2
remote: Using fog-softlayer 0.4.7
remote: Using fog-storm_on_demand 0.1.1
remote: Using fog-atmos 0.1.0
remote: Using fog-aws 0.7.4
remote: Using fog-ecloud 0.1.1
remote: Using fog-google 0.0.7
remote: Using fog-powerdns 0.1.1
remote: Using fog-profitbricks 0.0.5
remote: Using fog-radosgw 0.0.4
remote: Using fog-riakcs 0.1.0
remote: Using fog-terremark 0.1.0
remote: Using fog-voxel 0.1.0
remote: Using actionmailer 4.1.0
remote: Using railties 4.1.0
remote: Using formtastic 2.2.1
remote: Using less-rails 2.7.0
remote: Using sprockets-rails 2.3.2
remote: Using paperclip 4.2.4
remote: Using fog 1.32.0
remote: Using coffee-rails 4.0.1
remote: Using responders 1.1.2
remote: Using haml-rails 0.9.0
remote: Using jquery-rails 3.1.3
remote: Using formtastic-bootstrap 3.0.0
remote: Using rails 4.1.0
remote: Using mail_form 1.5.0 from git://github.com/plataformatec/mail_form (at master)
remote: Using sass-rails 4.0.5
remote: Using less-rails-bootstrap 3.3.5.0
remote: Using turbolinks 2.5.3
remote: Using devise 3.5.1
remote: Using prawnto_2 0.2.6
remote: Using rails_autolink 1.1.6
remote:
remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote:
remote: /tmp/build_fefc826e1bdbba09c960a4c215f98122/vendor/ruby-2.1.5/bin/ruby extconf.rb
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote:
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_fefc826e1bdbba09c960a4c215f98122/vendor/ruby-2.1.5/bin/ruby
remote: extconf.rb:39:in `<main>': JAVA_HOME is not directory. (RuntimeError)
remote:
remote: extconf failed, exit code 1
remote:
remote: Gem files will remain installed in /tmp/build_fefc826e1bdbba09c960a4c215f98122/vendor/bundle/ruby/2.1.0/gems/rjb-1.5.3 for inspection.
remote: Results logged to /tmp/build_fefc826e1bdbba09c960a4c215f98122/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/rjb-1.5.3/gem_make.out
remote: An error occurred while installing rjb (1.5.3), and Bundler cannot continue.
remote: Make sure that `gem install rjb -v '1.5.3'` succeeds before bundling.
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy...
remote:
... 然后是通常的 "push rejected".
显然关键部分是
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote:
remote: /tmp/build_fefc826e1bdbba09c960a4c215f98122/vendor/ruby-2.1.5/bin/ruby extconf.rb
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
与 pg
或“rjb”相关。
在cedar 10版本上,我已经将rjb
锁定为v1.4.9
。然而,这在 cedar 14 上造成了同样的问题,将其升级到 v1.5.3
并没有帮助。
如果我只是完全删除 rjb
gem,该应用程序在开发中工作得很好,但是当上传到 Heroku 时完全中断("An error occurred with your application, please try again in a few minutes" 死亡屏幕)。
我看过 this similar question,但 heroku 似乎删除了 "labs" 添加项,这是建议的解决方案。我也在我的 Gemfile 中弄乱了 ENV['JAVA_HOME'] 没有结果。
我没主意了,我什至找不到任何关于如何检查 Heroku 上的 mkmf.log 文件以获取任何额外线索的信息。
gem install rjb -v '1.5.3'
本身工作正常,但当我尝试推送整个应用程序时没有任何改变。
如何检查 Heroku 上的 mkmf.log 文件?
有没有我可以尝试的 rjb 替代品(显然 Heroku 觉得它需要它来做某些事情,可能是用 prawn 生成 PDF)?我已经阅读了一些关于 Jruby 的内容,但显然很多其他 gem 不受支持,因此我的应用程序的其余部分可能无法正常工作。
是否还有其他明显或现有的解决方案是我遗漏的?
这是我的 Gemfile:
source 'https://rubygems.org'
ruby '2.1.5'
# Required to get rjb (and therefore PDF merger) working on Heroku
#
# This directory changed from Heroku "cedar" stack to "cedar 14" stack
# It may need to be updated if Heroku updates their stack again, and rjb/pg will not install
# Will throw an error like this
# Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
# remote:
# remote: /tmp/build_943bcf5ec8b7d2ff7b74f56f3b28db62/vendor/ruby-2.1.5/bin/ruby extconf.rb
# remote: *** extconf.rb failed ***
# remote: Could not create Makefile due to some reason, probably lack of necessary
# remote: libraries and/or headers. Check the mkmf.log file for more details. You may
# remote: need configuration options.
java_home = '/usr/lib/jvm/java-6-openjdk'
ENV['JAVA_HOME'] = java_home if Dir.exist?(java_home)
gem 'rjb'
gem 'rails', '4.1.0' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'pg' # Use postgresql as the database for Active Record
gem 'sass-rails', '~> 4.0.0' # Use SCSS for stylesheets
gem 'bootstrap-sass', '~> 3.1.1'
gem 'uglifier', '>= 1.3.0' # Use Uglifier as compressor for JavaScript assets
gem 'coffee-rails', '~> 4.0.0' # Use CoffeeScript for .js.coffee assets and views
gem 'jquery-rails' # Use jquery as the JavaScript library
gem 'turbolinks' # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'jbuilder', '~> 1.2' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', platforms: :ruby
gem 'less-rails-bootstrap'
gem 'devise'
gem 'cancancan', '~> 1.9'
gem 'formtastic', '2.2.1'
gem 'formtastic-bootstrap'
gem 'cocoon'
gem 'haml'
gem 'haml-rails'
gem 'rails_autolink'
gem 'validates_email_format_of'
gem 'figaro'
gem 'prawn', '1.1.0' # Updating this breaks the 'prawn/table functionality'
gem 'prawnto_2', '0.2.6', :require => "prawnto"
#gem 'prawn-templates'
gem 'paperclip', '~> 4.2.0'
gem 'tlsmail', require: false # See config/initializers/tlsmail.rb
gem 'carrierwave'
gem 'fog'
gem 'nested_form'
gem 'phony_rails'
gem 'pdf-merger'
gem 'mail_form', :git => 'git://github.com/plataformatec/mail_form'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
group :development, :test do
gem 'rspec-rails'
gem 'rspec-activemodel-mocks'
gem 'factory_girl_rails'
gem 'better_errors'
gem 'binding_of_caller'
end
group :test do
gem 'shoulda-matchers'
gem 'database_cleaner'
gem 'selenium-webdriver'
gem 'faker'
gem 'capybara'
gem 'launchy'
gem 'pdf-inspector', require: "pdf/inspector"
end
group :production do
gem 'rails_12factor' # Enable Heroku production
gem 'rack-cache' # Enable rack-caching for production environment and Prawn email attachment
end
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
在 cedar-14 上,您必须将 JAVA_HOME 设置为 /usr/lib/jvm/java-1.7.0-openjdk-amd64/
所以,就像一个优秀的程序员应该做的那样,我正在为即将到来的 Cedar-14 过渡准备一份申请。
程序在 Cedar 10 上运行良好。在 Cedar 14 上不起作用,RJB 存在某种问题。当我尝试在此处推送应用程序时出现错误:
Counting objects: 7, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 635 bytes | 0 bytes/s, done.
Total 7 (delta 5), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.1.5
remote: -----> Installing dependencies using 1.9.7
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Using rake 10.4.2
remote: Using i18n 0.7.0
remote: Using json 1.8.3
remote: Using minitest 5.8.0
remote: Using thread_safe 0.3.5
remote: Using builder 3.2.2
remote: Using erubis 2.7.0
remote: Using rack 1.5.5
remote: Using mime-types 1.25.1
remote: Using polyglot 0.3.5
remote: Using arel 5.0.1.20140414130214
remote: Using bcrypt 3.1.10
remote: Using sass 3.2.19
remote: Using cancancan 1.12.0
remote: Using cocoon 1.2.6
remote: Using coffee-script-source 1.9.1.1
remote: Using CFPropertyList 2.3.1
remote: Using execjs 2.5.2
remote: Using thor 0.19.1
remote: Using commonjs 0.2.7
remote: Using currencies 0.4.2
remote: Using i18n_data 0.7.0
remote: Using orm_adapter 0.5.0
remote: Using excon 0.45.4
remote: Using formatador 0.2.5
remote: Using net-ssh 2.9.2
remote: Using mini_portile 0.6.2
remote: Using multi_json 1.11.2
remote: Using ipaddress 0.8.0
remote: Using inflecto 0.0.2
remote: Using tilt 1.4.1
remote: Using sexp_processor 4.6.0
remote: Using hike 1.2.3
remote: Using libv8 3.16.14.11
remote: Using nested_form 0.3.2
remote: Using pdf-core 0.2.5
remote: Using pdf-merger 0.3.2
remote: Using pg 0.18.2
remote: Using phony 2.14.13
remote: Using ttfunk 1.2.2
remote: Using bundler 1.9.7
remote: Using rails_serve_static_assets 0.0.4
remote: Using rails_stdout_logging 0.0.3
remote: Using ref 2.0.0
remote: Using tlsmail 0.0.1
remote: Using rdoc 4.2.0
remote: Using tzinfo 1.2.2
remote: Using rack-test 0.6.3
remote: Using warden 1.2.3
remote: Using rack-cache 1.2
remote: Using treetop 1.4.15
remote: Using bootstrap-sass 3.1.1.1
remote: Using validates_email_format_of 1.6.3
remote: Using coffee-script 2.4.1
remote: Using uglifier 2.7.1
remote: Using figaro 1.1.1
remote: Using less 2.6.0
remote: Using net-scp 1.2.1
remote: Using nokogiri 1.6.6.2
remote: Using countries 0.11.5
remote: Using haml 4.0.6
remote: Using ruby_parser 3.7.1
remote: Using prawn 1.1.0
remote: Using rails_12factor 0.0.3
remote: Using therubyracer 0.12.2
remote: Using sprockets 2.12.4
remote: Using sdoc 0.4.1
remote: Using activesupport 4.1.0
remote: Using fission 0.5.0
remote: Using mail 2.5.4
remote: Using fog-core 1.32.0
remote: Using html2haml 2.0.0
remote: Using actionview 4.1.0
remote: Using activemodel 4.1.0
remote: Using climate_control 0.0.3
remote: Using jbuilder 1.5.3
remote: Using phony_rails 0.12.9
remote: Using fog-xml 0.1.2
remote: Using fog-json 1.0.2
remote: Using fog-local 0.2.1
remote: Using actionpack 4.1.0
remote: Using activerecord 4.1.0
remote: Using carrierwave 0.10.0
remote: Using cocaine 0.5.7
remote: Using fog-vmfusion 0.1.0
remote: Using fog-brightbox 0.8.0
remote: Using fog-sakuracloud 1.0.1
remote: Using fog-serverlove 0.1.2
remote: Using fog-softlayer 0.4.7
remote: Using fog-storm_on_demand 0.1.1
remote: Using fog-atmos 0.1.0
remote: Using fog-aws 0.7.4
remote: Using fog-ecloud 0.1.1
remote: Using fog-google 0.0.7
remote: Using fog-powerdns 0.1.1
remote: Using fog-profitbricks 0.0.5
remote: Using fog-radosgw 0.0.4
remote: Using fog-riakcs 0.1.0
remote: Using fog-terremark 0.1.0
remote: Using fog-voxel 0.1.0
remote: Using actionmailer 4.1.0
remote: Using railties 4.1.0
remote: Using formtastic 2.2.1
remote: Using less-rails 2.7.0
remote: Using sprockets-rails 2.3.2
remote: Using paperclip 4.2.4
remote: Using fog 1.32.0
remote: Using coffee-rails 4.0.1
remote: Using responders 1.1.2
remote: Using haml-rails 0.9.0
remote: Using jquery-rails 3.1.3
remote: Using formtastic-bootstrap 3.0.0
remote: Using rails 4.1.0
remote: Using mail_form 1.5.0 from git://github.com/plataformatec/mail_form (at master)
remote: Using sass-rails 4.0.5
remote: Using less-rails-bootstrap 3.3.5.0
remote: Using turbolinks 2.5.3
remote: Using devise 3.5.1
remote: Using prawnto_2 0.2.6
remote: Using rails_autolink 1.1.6
remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote: /tmp/build_fefc826e1bdbba09c960a4c215f98122/vendor/ruby-2.1.5/bin/ruby extconf.rb
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_fefc826e1bdbba09c960a4c215f98122/vendor/ruby-2.1.5/bin/ruby
remote: extconf.rb:39:in `<main>': JAVA_HOME is not directory. (RuntimeError)
remote: extconf failed, exit code 1
remote: Gem files will remain installed in /tmp/build_fefc826e1bdbba09c960a4c215f98122/vendor/bundle/ruby/2.1.0/gems/rjb-1.5.3 for inspection.
remote: Results logged to /tmp/build_fefc826e1bdbba09c960a4c215f98122/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/rjb-1.5.3/gem_make.out
remote: An error occurred while installing rjb (1.5.3), and Bundler cannot continue.
remote: Make sure that `gem install rjb -v '1.5.3'` succeeds before bundling.
remote: Bundler Output: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Using rake 10.4.2
remote: Using i18n 0.7.0
remote: Using json 1.8.3
remote: Using minitest 5.8.0
remote: Using thread_safe 0.3.5
remote: Using builder 3.2.2
remote: Using erubis 2.7.0
remote: Using rack 1.5.5
remote: Using mime-types 1.25.1
remote: Using polyglot 0.3.5
remote: Using arel 5.0.1.20140414130214
remote: Using bcrypt 3.1.10
remote: Using sass 3.2.19
remote: Using cancancan 1.12.0
remote: Using cocoon 1.2.6
remote: Using coffee-script-source 1.9.1.1
remote: Using CFPropertyList 2.3.1
remote: Using execjs 2.5.2
remote: Using thor 0.19.1
remote: Using commonjs 0.2.7
remote: Using currencies 0.4.2
remote: Using i18n_data 0.7.0
remote: Using orm_adapter 0.5.0
remote: Using excon 0.45.4
remote: Using formatador 0.2.5
remote: Using net-ssh 2.9.2
remote: Using mini_portile 0.6.2
remote: Using multi_json 1.11.2
remote: Using ipaddress 0.8.0
remote: Using inflecto 0.0.2
remote: Using tilt 1.4.1
remote: Using sexp_processor 4.6.0
remote: Using hike 1.2.3
remote: Using libv8 3.16.14.11
remote: Using nested_form 0.3.2
remote: Using pdf-core 0.2.5
remote: Using pdf-merger 0.3.2
remote: Using pg 0.18.2
remote: Using phony 2.14.13
remote: Using ttfunk 1.2.2
remote: Using bundler 1.9.7
remote: Using rails_serve_static_assets 0.0.4
remote: Using rails_stdout_logging 0.0.3
remote: Using ref 2.0.0
remote: Using tlsmail 0.0.1
remote: Using rdoc 4.2.0
remote: Using tzinfo 1.2.2
remote: Using rack-test 0.6.3
remote: Using warden 1.2.3
remote: Using rack-cache 1.2
remote: Using treetop 1.4.15
remote: Using bootstrap-sass 3.1.1.1
remote: Using validates_email_format_of 1.6.3
remote: Using coffee-script 2.4.1
remote: Using uglifier 2.7.1
remote: Using figaro 1.1.1
remote: Using less 2.6.0
remote: Using net-scp 1.2.1
remote: Using nokogiri 1.6.6.2
remote: Using countries 0.11.5
remote: Using haml 4.0.6
remote: Using ruby_parser 3.7.1
remote: Using prawn 1.1.0
remote: Using rails_12factor 0.0.3
remote: Using therubyracer 0.12.2
remote: Using sprockets 2.12.4
remote: Using sdoc 0.4.1
remote: Using activesupport 4.1.0
remote: Using fission 0.5.0
remote: Using mail 2.5.4
remote: Using fog-core 1.32.0
remote: Using html2haml 2.0.0
remote: Using actionview 4.1.0
remote: Using activemodel 4.1.0
remote: Using climate_control 0.0.3
remote: Using jbuilder 1.5.3
remote: Using phony_rails 0.12.9
remote: Using fog-xml 0.1.2
remote: Using fog-json 1.0.2
remote: Using fog-local 0.2.1
remote: Using actionpack 4.1.0
remote: Using activerecord 4.1.0
remote: Using carrierwave 0.10.0
remote: Using cocaine 0.5.7
remote: Using fog-vmfusion 0.1.0
remote: Using fog-brightbox 0.8.0
remote: Using fog-sakuracloud 1.0.1
remote: Using fog-serverlove 0.1.2
remote: Using fog-softlayer 0.4.7
remote: Using fog-storm_on_demand 0.1.1
remote: Using fog-atmos 0.1.0
remote: Using fog-aws 0.7.4
remote: Using fog-ecloud 0.1.1
remote: Using fog-google 0.0.7
remote: Using fog-powerdns 0.1.1
remote: Using fog-profitbricks 0.0.5
remote: Using fog-radosgw 0.0.4
remote: Using fog-riakcs 0.1.0
remote: Using fog-terremark 0.1.0
remote: Using fog-voxel 0.1.0
remote: Using actionmailer 4.1.0
remote: Using railties 4.1.0
remote: Using formtastic 2.2.1
remote: Using less-rails 2.7.0
remote: Using sprockets-rails 2.3.2
remote: Using paperclip 4.2.4
remote: Using fog 1.32.0
remote: Using coffee-rails 4.0.1
remote: Using responders 1.1.2
remote: Using haml-rails 0.9.0
remote: Using jquery-rails 3.1.3
remote: Using formtastic-bootstrap 3.0.0
remote: Using rails 4.1.0
remote: Using mail_form 1.5.0 from git://github.com/plataformatec/mail_form (at master)
remote: Using sass-rails 4.0.5
remote: Using less-rails-bootstrap 3.3.5.0
remote: Using turbolinks 2.5.3
remote: Using devise 3.5.1
remote: Using prawnto_2 0.2.6
remote: Using rails_autolink 1.1.6
remote:
remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote:
remote: /tmp/build_fefc826e1bdbba09c960a4c215f98122/vendor/ruby-2.1.5/bin/ruby extconf.rb
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote:
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_fefc826e1bdbba09c960a4c215f98122/vendor/ruby-2.1.5/bin/ruby
remote: extconf.rb:39:in `<main>': JAVA_HOME is not directory. (RuntimeError)
remote:
remote: extconf failed, exit code 1
remote:
remote: Gem files will remain installed in /tmp/build_fefc826e1bdbba09c960a4c215f98122/vendor/bundle/ruby/2.1.0/gems/rjb-1.5.3 for inspection.
remote: Results logged to /tmp/build_fefc826e1bdbba09c960a4c215f98122/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/rjb-1.5.3/gem_make.out
remote: An error occurred while installing rjb (1.5.3), and Bundler cannot continue.
remote: Make sure that `gem install rjb -v '1.5.3'` succeeds before bundling.
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy...
remote:
... 然后是通常的 "push rejected".
显然关键部分是
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote:
remote: /tmp/build_fefc826e1bdbba09c960a4c215f98122/vendor/ruby-2.1.5/bin/ruby extconf.rb
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
与 pg
或“rjb”相关。
在cedar 10版本上,我已经将rjb
锁定为v1.4.9
。然而,这在 cedar 14 上造成了同样的问题,将其升级到 v1.5.3
并没有帮助。
如果我只是完全删除 rjb
gem,该应用程序在开发中工作得很好,但是当上传到 Heroku 时完全中断("An error occurred with your application, please try again in a few minutes" 死亡屏幕)。
我看过 this similar question,但 heroku 似乎删除了 "labs" 添加项,这是建议的解决方案。我也在我的 Gemfile 中弄乱了 ENV['JAVA_HOME'] 没有结果。
我没主意了,我什至找不到任何关于如何检查 Heroku 上的 mkmf.log 文件以获取任何额外线索的信息。
gem install rjb -v '1.5.3'
本身工作正常,但当我尝试推送整个应用程序时没有任何改变。
如何检查 Heroku 上的 mkmf.log 文件?
有没有我可以尝试的 rjb 替代品(显然 Heroku 觉得它需要它来做某些事情,可能是用 prawn 生成 PDF)?我已经阅读了一些关于 Jruby 的内容,但显然很多其他 gem 不受支持,因此我的应用程序的其余部分可能无法正常工作。
是否还有其他明显或现有的解决方案是我遗漏的?
这是我的 Gemfile:
source 'https://rubygems.org'
ruby '2.1.5'
# Required to get rjb (and therefore PDF merger) working on Heroku
#
# This directory changed from Heroku "cedar" stack to "cedar 14" stack
# It may need to be updated if Heroku updates their stack again, and rjb/pg will not install
# Will throw an error like this
# Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
# remote:
# remote: /tmp/build_943bcf5ec8b7d2ff7b74f56f3b28db62/vendor/ruby-2.1.5/bin/ruby extconf.rb
# remote: *** extconf.rb failed ***
# remote: Could not create Makefile due to some reason, probably lack of necessary
# remote: libraries and/or headers. Check the mkmf.log file for more details. You may
# remote: need configuration options.
java_home = '/usr/lib/jvm/java-6-openjdk'
ENV['JAVA_HOME'] = java_home if Dir.exist?(java_home)
gem 'rjb'
gem 'rails', '4.1.0' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'pg' # Use postgresql as the database for Active Record
gem 'sass-rails', '~> 4.0.0' # Use SCSS for stylesheets
gem 'bootstrap-sass', '~> 3.1.1'
gem 'uglifier', '>= 1.3.0' # Use Uglifier as compressor for JavaScript assets
gem 'coffee-rails', '~> 4.0.0' # Use CoffeeScript for .js.coffee assets and views
gem 'jquery-rails' # Use jquery as the JavaScript library
gem 'turbolinks' # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'jbuilder', '~> 1.2' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', platforms: :ruby
gem 'less-rails-bootstrap'
gem 'devise'
gem 'cancancan', '~> 1.9'
gem 'formtastic', '2.2.1'
gem 'formtastic-bootstrap'
gem 'cocoon'
gem 'haml'
gem 'haml-rails'
gem 'rails_autolink'
gem 'validates_email_format_of'
gem 'figaro'
gem 'prawn', '1.1.0' # Updating this breaks the 'prawn/table functionality'
gem 'prawnto_2', '0.2.6', :require => "prawnto"
#gem 'prawn-templates'
gem 'paperclip', '~> 4.2.0'
gem 'tlsmail', require: false # See config/initializers/tlsmail.rb
gem 'carrierwave'
gem 'fog'
gem 'nested_form'
gem 'phony_rails'
gem 'pdf-merger'
gem 'mail_form', :git => 'git://github.com/plataformatec/mail_form'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
group :development, :test do
gem 'rspec-rails'
gem 'rspec-activemodel-mocks'
gem 'factory_girl_rails'
gem 'better_errors'
gem 'binding_of_caller'
end
group :test do
gem 'shoulda-matchers'
gem 'database_cleaner'
gem 'selenium-webdriver'
gem 'faker'
gem 'capybara'
gem 'launchy'
gem 'pdf-inspector', require: "pdf/inspector"
end
group :production do
gem 'rails_12factor' # Enable Heroku production
gem 'rack-cache' # Enable rack-caching for production environment and Prawn email attachment
end
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
在 cedar-14 上,您必须将 JAVA_HOME 设置为 /usr/lib/jvm/java-1.7.0-openjdk-amd64/