Ceci est mon premier message sur ce sujet, alors s'il vous plaît soyez gentil, mais je reçois un Keyerror lors de l'exécution de mon rakefile app. Des idées?Ruby App installer sur Heroku: rake abandonné. KeyError: clé non trouvée
MacBook-Pro:proleaderboard aidenhowes$ git push heroku master
Counting objects: 757, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (293/293), done.
Writing objects: 100% (757/757), 334.41 KiB | 0 bytes/s, done.
Total 757 (delta 419), reused 739 (delta 409)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.4
remote: -----> Installing dependencies using bundler 1.11.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: Fetching source index from https://rubygems.org/
remote: Fetching source index from https://rails-assets.org/
remote: Fetching git://github.com/thoughtbot/paperclip.git
remote: Fetching gem metadata from https://rails-assets.org/...
remote: Fetching version metadata from https://rails-assets.org/..
remote: Fetching git://github.com/mislav/will_paginate.git
remote: Fetching git://github.com/bootstrap-ruby/will_paginate- bootstrap.git
remote: Installing rake 11.1.2
remote: Installing concurrent-ruby 1.0.2
remote: Installing i18n 0.7.0
remote: Installing minitest 5.8.4
remote: Installing thread_safe 0.3.5
remote: Installing builder 3.2.2
remote: Installing erubis 2.7.0
remote: Installing mini_portile2 2.0.0
remote: Installing json 1.8.3 with native extensions
remote: Installing nio4r 1.2.1 with native extensions
remote: Installing websocket-extensions 0.1.2
remote: Installing mime-types-data 3.2016.0221
remote: Installing arel 7.0.0
remote: Installing execjs 2.6.0
remote: Installing json_pure 1.8.3
remote: Installing bcrypt 3.1.11 with native extensions
remote: Installing sass 3.4.22
remote: Installing callsite 0.0.11
remote: Installing chartkick 1.5.2
remote: Installing coffee-script-source 1.10.0
remote: Installing method_source 0.8.2
remote: Installing thor 0.19.1
remote: Installing orm_adapter 0.5.0
remote: Installing multi_xml 0.5.5
remote: Installing multi_json 1.12.0
remote: Installing turbolinks-source 5.0.0.beta4
remote: Installing mimemagic 0.3.1
remote: Using bundler 1.11.2
remote: Installing puma 3.4.0 with native extensions
remote: Installing rails-assets-tether 1.3.2
remote: Installing pg 0.18.4 with native extensions
remote: Installing rails_serve_static_assets 0.0.5
remote: Installing rails_stdout_logging 0.0.5
remote: Using will_paginate 3.1.0 from git://github.com/mislav/will_paginate.git (at [email protected])
remote: Installing tilt 2.0.2
remote: Installing yard 0.8.7.6
remote: Installing faker 1.6.3
remote: Installing tzinfo 1.2.2
remote: Installing nokogiri 1.6.7.2 with native extensions
remote: Installing websocket-driver 0.6.3 with native extensions
remote: Installing mime-types 3.0
remote: Installing autoprefixer-rails 6.3.6
remote: Installing uglifier 3.0.0
remote: Installing jmespath 1.2.4
remote: Installing coffee-script 2.4.1
remote: Installing rack 2.0.0.rc1
remote: Installing httparty 0.13.7
remote: Installing turbolinks 5.0.0.beta2
remote: Installing rails_12factor 0.0.3
remote: Installing activesupport 5.0.0.rc1
remote: Using will_paginate-bootstrap 1.0.1 from git://github.com/bootstrap-ruby/will_paginate-bootstrap.git (at [email protected])
remote: Installing bootstrap 4.0.0.alpha3
remote: Installing mail 2.6.4
remote: Installing aws-sdk-core 2.3.4
remote: Installing warden 1.2.6
remote: Installing rack-test 0.6.3
remote: Installing rack-contrib 1.2.0
remote: Installing rails-deprecated_sanitizer 1.0.3
remote: Installing sprockets 3.6.0
remote: Installing globalid 0.3.6
remote: Installing activemodel 5.0.0.rc1
remote: Installing climate_control 0.0.3
remote: Installing groupdate 2.5.3
remote: Installing jbuilder 2.4.1
remote: Installing loofah 2.0.3
remote: Installing aws-sdk-resources 2.3.4
remote: Installing rails-dom-testing 1.0.7
remote: Installing activejob 5.0.0.rc1
remote: Installing activerecord 5.0.0.rc1
remote: Installing cocaine 0.5.8
remote: Using paperclip 5.0.0.beta2 from git://github.com/thoughtbot/paperclip.git (at [email protected])
remote: Installing rails-html-sanitizer 1.0.3
remote: Installing aws-sdk 2.3.4
remote: Installing actionview 5.0.0.rc1
remote: Installing actionpack 5.0.0.rc1
remote: Installing actionmailer 5.0.0.rc1
remote: Installing actioncable 5.0.0.rc1
remote: Installing railties 5.0.0.rc1
remote: Installing sprockets-rails 3.0.4
remote: Installing responders 2.2.0
remote: Installing coffee-rails 4.1.1
remote: Installing font-awesome-rails 4.6.2.0
remote: Installing jquery-turbolinks 2.1.0
remote: Installing jquery-rails 4.1.1
remote: Installing meta_request 0.4.0
remote: Installing jquery-ui-rails 5.0.5
remote: Installing rails 5.0.0.rc1
remote: Installing sass-rails 5.0.4
remote: Installing devise 4.0.2
remote: Bundle complete! 38 Gemfile dependencies, 89 gems now installed.
remote: Gems in the groups development and test were not installed.
remote: Bundled gems are installed into ./vendor/bundle.
remote: Post-install message from httparty:
remote: When you HTTParty, you must party hard!
remote: Post-install message from paperclip:
remote: ##################################################
remote: # NOTE FOR UPGRADING FROM 4.3.0 OR EARLIER #
remote: ##################################################
remote: Paperclip is now compatible with aws-sdk >= 2.0.0.
remote: If you are using S3 storage, aws-sdk >= 2.0.0 requires you to make a few small
remote: changes:
remote: * You must set the `s3_region`
remote: * If you are explicitly setting permissions anywhere, such as in an initializer,
remote: note that the format of the permissions changed from using an underscore to
remote: using a hyphen. For example, `:public_read` needs to be changed to
remote: `public-read`.
remote: For a walkthrough of upgrading from 4 to 5 and aws-sdk >= 2.0 you can watch
remote: http://rubythursday.com/episodes/ruby-snack-27-upgrade-paperclip-and-aws-sdk-in-prep-for-rails-5
remote: Bundle completed (54.79s)
remote: Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: rake aborted!
remote: KeyError: key not found: "S3_BUCKET_NAME"
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/config/environments/production.rb:92:in `fetch'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/config/environments/production.rb:92:in `block in <top (required)>'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.rc1/lib/rails/railtie.rb:209:in `instance_eval'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.rc1/lib/rails/railtie.rb:209:in `configure'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/config/environments/production.rb:1:in `<top (required)>'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.rc1/lib/active_support/dependencies.rb:293:in `require'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.rc1/lib/active_support/dependencies.rb:293:in `block in require'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.rc1/lib/active_support/dependencies.rb:259:in `load_dependency'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.rc1/lib/active_support/dependencies.rb:293:in `require'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.rc1/lib/rails/engine.rb:600:in `block (2 levels) in <class:Engine>'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.rc1/lib/rails/engine.rb:599:in `each'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.rc1/lib/rails/engine.rb:599:in `block in <class:Engine>'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.rc1/lib/rails/initializable.rb:30:in `instance_exec'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.rc1/lib/rails/initializable.rb:30:in `run'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.rc1/lib/rails/initializable.rb:55:in `block in run_initializers'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.rc1/lib/rails/initializable.rb:44:in `each'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.rc1/lib/rails/initializable.rb:44:in `tsort_each_child'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.rc1/lib/rails/initializable.rb:54:in `run_initializers'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.rc1/lib/rails/application.rb:352:in `initialize!'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/config/environment.rb:5:in `<top (required)>'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.rc1/lib/active_support/dependencies.rb:293:in `require'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.rc1/lib/active_support/dependencies.rb:293:in `block in require'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.rc1/lib/active_support/dependencies.rb:259:in `load_dependency'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.rc1/lib/active_support/dependencies.rb:293:in `require'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.rc1/lib/rails/application.rb:328:in `require_environment!'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/railties-5.0.0.rc1/lib/rails/application.rb:448:in `block in run_tasks_blocks'
remote: /tmp/build_ede61efdc5705c0b3b467412e52dba8a/vendor/bundle/ruby/2.2.0/gems/sprockets-rails-3.0.4/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
remote: Tasks: TOP => environment
remote: (See full trace by running task with --trace)
remote: !
remote: ! Precompiling assets failed.
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy....
remote:
remote: ! Push rejected to proleaderboard.
remote:
To https://git.heroku.com/proleaderboard.git
! [remote rejected] master -> master (pre-receive hook declined)
Bienvenue dans Stackoverflow et soyez plus précis sur votre question. Évitez de poster un tas de journaux d'erreurs. Recherchez un peu, puis publiez les journaux qui décrivent votre problème pour obtenir une réponse plus rapide. –
On dirait que le problème est dans votre configuration pour votre compartiment S3 ('KeyError: clé non trouvée:" S3_BUCKET_NAME "'). Avez-vous obtenu le nom de votre seau à partir de votre compte aws et l'avez-vous inclus lors de la configuration? – gonzalo2000
Ceci est la référence à la S3 dans le fichier production.rb. Est-ce là où les détails doivent être codés en dur? '# Amazon Web Services config.paperclip_defaults = { stockage:: s3, s3_credentials: { seau: ENV.fetch ('S3-SEAU-NOM), access_key_id: ENV.fetch (AWS-ACCESS -KEY-ID '), secret_access_key: ENV.fetch (' AWS-SECRET-ACCESS-/KEY '), s3_region: ENV.fetch (' AWS-REGION '), ' – Aiden