web-dev-qa-db-fra.com

erreur "méthode non définie" load_defaults "" lors de la tentative de déploiement de l'application sur Heroku

Je suis nouveau dans la programmation Ruby et Rails, donc j'ai suivi le livre en ligne railstutorial.org, et je suis tombé sur un obstacle que je n'ai pas ') t été en mesure de résoudre pendant quelques heures:

Après avoir exécuté "git Push heroku master" dans Bash, j'obtiens ce qui suit:

Counting objects: 90, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (76/76), done.
Writing objects: 100% (90/90), 21.30 KiB | 0 bytes/s, done.
Total 90 (delta 5), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote:  !     Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
remote:             Detected buildpacks: Ruby,Node.js
remote:             See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: Ruby-2.3.4
remote: -----> Installing dependencies using bundler 1.13.7
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:        Warning: the running version of Bundler (1.13.7) is older than the version that created the lockfile (1.14.6). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
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:        Installing i18n 0.8.1
remote:        Installing rake 12.0.0
remote:        Installing concurrent-Ruby 1.0.5
remote:        Installing minitest 5.10.1
remote:        Installing thread_safe 0.3.6
remote:        Installing builder 3.2.3
remote:        Installing erubis 2.7.0
remote:        Installing mini_portile2 2.1.0
remote:        Installing rack 2.0.1
remote:        Installing nio4r 1.2.1 with native extensions
remote:        Installing websocket-extensions 0.1.2
remote:        Installing mime-types-data 3.2016.0521
remote:        Installing arel 7.1.4
remote:        Installing coffee-script-source 1.12.2
remote:        Installing execjs 2.7.0
remote:        Installing method_source 0.8.2
remote:        Installing thor 0.19.4
remote:        Installing multi_json 1.12.1
remote:        Installing pg 0.18.4 with native extensions
remote:        Installing puma 3.4.0 with native extensions
remote:        Using bundler 1.13.7
remote:        Installing sass 3.4.23
remote:        Installing tilt 2.0.7
remote:        Installing turbolinks-source 5.0.3
remote:        Installing tzinfo 1.2.3
remote:        Installing nokogiri 1.7.1 with native extensions
remote:        Installing rack-test 0.6.3
remote:        Installing sprockets 3.7.1
remote:        Installing websocket-driver 0.6.5 with native extensions
remote:        Installing mime-types 3.1
remote:        Installing coffee-script 2.4.1
remote:        Installing uglifier 3.0.0
remote:        Installing turbolinks 5.0.1
remote:        Installing activesupport 5.0.1
remote:        Installing mail 2.6.5
remote:        Installing globalid 0.4.0
remote:        Installing activemodel 5.0.1
remote:        Installing jbuilder 2.4.1
remote:        Installing activejob 5.0.1
remote:        Installing activerecord 5.0.1
remote:        Installing Rails-dom-testing 2.0.2
remote:        Installing loofah 2.0.3
remote:        Installing Rails-html-sanitizer 1.0.3
remote:        Installing actionview 5.0.1
remote:        Installing actionpack 5.0.1
remote:        Installing actionmailer 5.0.1
remote:        Installing actioncable 5.0.1
remote:        Installing railties 5.0.1
remote:        Installing sprockets-Rails 3.2.0
remote:        Installing Rails 5.0.1
remote:        Installing coffee-Rails 4.2.1
remote:        Installing jquery-Rails 4.1.1
remote:        Installing sass-Rails 5.0.6
remote:        Bundle complete! 16 Gemfile dependencies, 53 gems now installed.
remote:        Gems in the groups development and test were not installed.
remote:        Bundled gems are installed into ./vendor/bundle.
remote:        Bundle completed (25.85s)
remote:        Cleaning up the bundler cache.
remote: -----> Installing node-v6.10.0-linux-x64
remote: -----> Detecting rake tasks
remote: sh: 2: Syntax error: Unterminated quoted string
remote: sh: 2: Syntax error: Unterminated quoted string
remote:  !
remote:  !     Could not detect rake tasks
remote:  !     ensure you can run `$ bundle exec rake -P` against your app
remote:  !     and using the production group of your Gemfile.
remote:  !     rake aborted!
remote:  !     NoMethodError: undefined method `load_defaults' for #<Rails::Application::Configuration:0x007fe95df68030>
remote:  !     /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/railties-5.0.1/lib/Rails/railtie/configuration.rb:95:in `method_missing'
remote:  !     /tmp/build_9d66aec07e51cd554443c45d6ce07bca/config/application.rb:12:in `<class:Application>'
remote:  !     /tmp/build_9d66aec07e51cd554443c45d6ce07bca/config/application.rb:10:in `<module:HelloApp>'
remote:  !     /tmp/build_9d66aec07e51cd554443c45d6ce07bca/config/application.rb:9:in `<top (required)>'
remote:  !     /tmp/build_9d66aec07e51cd554443c45d6ce07bca/Rakefile:4:in `require_relative'
remote:  !     /tmp/build_9d66aec07e51cd554443c45d6ce07bca/Rakefile:4:in `<top (required)>'
remote:  !     /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load'
remote:  !     /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load_rakefile'
remote:  !     /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:687:in `raw_load_rakefile'
remote:  !     /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:96:in `block in load_rakefile'
remote:  !     /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
remote:  !     /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:95:in `load_rakefile'
remote:  !     /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:79:in `block in run'
remote:  !     /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
remote:  !     /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
remote:  !     /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
remote:  !     vendor/bundle/bin/rake:17:in `load'
remote:  !     vendor/bundle/bin/rake:17:in `<main>'
remote:  !
remote: /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/helpers/rake_runner.rb:102:in `load_rake_tasks!': Could not detect rake tasks (LanguagePack::Helpers::RakeRunner::CannotLoadRakefileError)
remote: ensure you can run `$ bundle exec rake -P` against your app
remote: and using the production group of your Gemfile.
remote: rake aborted!
remote: NoMethodError: undefined method `load_defaults' for #<Rails::Application::Configuration:0x007fe95df68030>
remote: /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/railties-5.0.1/lib/Rails/railtie/configuration.rb:95:in `method_missing'
remote: /tmp/build_9d66aec07e51cd554443c45d6ce07bca/config/application.rb:12:in `<class:Application>'
remote: /tmp/build_9d66aec07e51cd554443c45d6ce07bca/config/application.rb:10:in `<module:HelloApp>'
remote: /tmp/build_9d66aec07e51cd554443c45d6ce07bca/config/application.rb:9:in `<top (required)>'
remote: /tmp/build_9d66aec07e51cd554443c45d6ce07bca/Rakefile:4:in `require_relative'
remote: /tmp/build_9d66aec07e51cd554443c45d6ce07bca/Rakefile:4:in `<top (required)>'
remote: /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load'
remote: /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load_rakefile'
remote: /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:687:in `raw_load_rakefile'
remote: /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:96:in `block in load_rakefile'
remote: /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
remote: /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:95:in `load_rakefile'
remote: /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:79:in `block in run'
remote: /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
remote: /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
remote: /tmp/build_9d66aec07e51cd554443c45d6ce07bca/vendor/bundle/Ruby/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
remote: vendor/bundle/bin/rake:17:in `load'
remote: vendor/bundle/bin/rake:17:in `<main>'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/Ruby.rb:757:in `rake'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/Rails4.rb:77:in `block (2 levels) in run_assets_precompile_rake_task'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:132:in `log'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/Rails4.rb:71:in `block in run_assets_precompile_rake_task'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:17:in `block in instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/Ruby/cedar-14/lib/Ruby/2.3.0/benchmark.rb:308:in `realtime'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:16:in `instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:49:in `instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:45:in `instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/Rails4.rb:70:in `run_assets_precompile_rake_task'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/Ruby.rb:109:in `block (2 levels) in compile'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/Ruby.rb:778:in `allow_git'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/Ruby.rb:103:in `block in compile'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:17:in `block in instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/Ruby/cedar-14/lib/Ruby/2.3.0/benchmark.rb:308:in `realtime'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:16:in `instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:49:in `instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:45:in `instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/Ruby.rb:92:in `compile'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/Rails2.rb:57:in `block in compile'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:17:in `block in instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/Ruby/cedar-14/lib/Ruby/2.3.0/benchmark.rb:308:in `realtime'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:16:in `instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:49:in `instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:45:in `instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/Rails2.rb:55:in `compile'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/Rails3.rb:42:in `block in compile'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:17:in `block in instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/Ruby/cedar-14/lib/Ruby/2.3.0/benchmark.rb:308:in `realtime'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:16:in `instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:49:in `instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:45:in `instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/Rails3.rb:41:in `compile'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/Rails4.rb:41:in `block in compile'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:17:in `block in instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/Ruby/cedar-14/lib/Ruby/2.3.0/benchmark.rb:308:in `realtime'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:16:in `instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:49:in `instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:45:in `instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/Rails4.rb:40:in `compile'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/bin/support/Ruby_compile:20:in `block (2 levels) in <main>'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:132:in `log'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/bin/support/Ruby_compile:19:in `block in <main>'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:35:in `block in trace'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:17:in `block in instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/Ruby/cedar-14/lib/Ruby/2.3.0/benchmark.rb:308:in `realtime'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:16:in `instrument'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:35:in `trace'
remote:     from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/bin/support/Ruby_compile:15:in `<main>'
remote:  !     Push rejected, failed to compile Ruby app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to cryptic-bastion-24389.
remote: 
To https://git.heroku.com/cryptic-bastion-24389.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to Push some refs to 'https://git.heroku.com/cryptic-bastion-24389.git'

Notant le message:

remote: -----> Installing node-v6.10.0-linux-x64
remote: -----> Detecting rake tasks
remote: sh: 2: Syntax error: Unterminated quoted string
remote: sh: 2: Syntax error: Unterminated quoted string
remote:  !
remote:  !     Could not detect rake tasks
remote:  !     ensure you can run `$ bundle exec rake -P` against your app
remote:  !     and using the production group of your Gemfile.
remote:  !     rake aborted!
remote:  !     NoMethodError: undefined method `load_defaults' for #<Rails::Application::Configuration:0x007fe95df68030>

J'ai recherché du code dans mes fichiers pour voir où "load_defaults" était appelé et il semble provenir du fichier application.rb dans le répertoire de mon application> config

require_relative 'boot'

require 'Rails/all'

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)

module HelloApp
  class Application < Rails::Application
    # Initialize configuration defaults for originally generated Rails version.
    config.load_defaults 5.1

    # Settings in config/environments/* take precedence over those specified here.
    # Application configuration should go into files in config/initializers
    # -- all .rb files in that directory are automatically loaded.
  end
end

Cependant, j'ai essayé de rechercher le même message d'erreur et d'exécuter tous les messages suggérés et je n'ai toujours pas pu pousser mon application sur Heroku, obtenant toujours la même erreur exacte. Je ne sais toujours pas ce que signifie "remote: sh: 2: Erreur de syntaxe: chaîne entre guillemets non terminée".

Je suppose que tout le problème est lié à mes gemmes alors voici le contenu de mon fichier Gemfile:

source 'https://rubygems.org'

gem 'Rails',        '5.0.1'
gem 'puma',         '3.4.0'
gem 'sass-Rails',   '5.0.6'
gem 'uglifier',     '3.0.0'
gem 'coffee-Rails', '4.2.1'
gem 'jquery-Rails', '4.1.1'
gem 'turbolinks',   '5.0.1'
gem 'jbuilder',     '2.4.1'

group :development, :test do
  gem 'sqlite3', '1.3.12'
  gem 'byebug',  '9.0.0', platform: :mri
end

group :development do
  gem 'web-console',           '3.1.1'
  gem 'listen',                '3.0.8'
  gem 'spring',                '1.7.2'
  gem 'spring-watcher-listen', '2.0.0'
end

group :production do
  gem 'pg', '0.18.4'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

Oui, j'ai exécuté l'installation du bundle - sans production avant tout. Pas de chance depuis le début. AFAIK J'ai suivi toutes les étapes du premier chapitre du livre railstutorial.

Sortie de "bundle exec install"

install: missing file operand 

et "bundle exec install?",

sh: 1: install?: not found
12
Gerry Hernandez

Eh bien, je vais d'abord m'excuser d'être allé jusqu'à devoir poser une question et trouver la solution par moi-même 20 minutes plus tard.

Bien que je ne sois pas sûr que quoi fonctionnait mal, je l'ai restreint aux différentes versions de Rails et autres gemmes, car j'utilisais d'anciennes versions spécifiques qui disaient book, railstutorial.org/book, m'a indiqué d'utiliser.

Ce que j'ai fait, c'est utiliser toutes les gemmes par défaut fournies par la commande Rails new pour mon Gemfile, sans spécifier de versions ou autre chose que le groupe de production pour la gem pg.

Code Gemfile qui l'a corrigé:

source 'https://rubygems.org'

git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
  "https://github.com/#{repo_name}.git"
end


# Bundle Edge Rails instead: gem 'Rails', github: 'Rails/rails'
gem 'Rails', '~> 5.1.0'

# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
gem 'sass-Rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/Rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :Ruby

# Use CoffeeScript for .coffee assets and views
gem 'coffee-Rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/Rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Capistrano for deployment
# gem 'capistrano-Rails', group: :development
group :production do
  gem 'pg'
end


group :development, :test do
  # Use sqlite3 as the database for Active Record
  gem 'sqlite3'
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
  # Adds support for Capybara system testing and Selenium driver
  gem 'capybara', '~> 2.13.0'
  gem 'Selenium-webdriver'
end

group :development do
  # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
  gem 'web-console', '>= 3.3.0'
  gem 'listen', '>= 3.0.5', '< 3.2'
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/Rails/spring
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
5
Gerry Hernandez

Aller à config/application.rb puis commentez ce code config.load_defaults 5.1 comme ceci: #config.load_defaults 5.1 (insérez un "#") ou vous pouvez simplement supprimer ce code, mais au cas où vous en auriez besoin plus tard, il est préférable de simplement le commenter.

J'ai eu le même problème, je l'ai commenté et cela a bien fonctionné.

16
bishal

OK, essayez simplement le bundle et rapportez les résultats. S'il signale qu'il vous manque un bundler, alors lancez gem install bundler

1
Tom Connolly

Il essaie d'utiliser /usr/lib dossier gemmes. Vous pouvez voir les dossiers de gemmes l'utilisant:

bundle show --paths

Quand j'avais installé toutes les gemmes sur ./vendor/bundle sur mon dossier de projet, cela a bien fonctionné.

bundle install --path vendor/bundle

1
Marylly Silva