前提・実現したいこと
Railsチュートリアル1章でHerokuへデプロイ出来ずつまっています。
発生している問題・エラーメッセージ
$ git push heroku master した時以下のエラーメッセージが出ます。
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: ! ActiveRecord::DatabaseConfigurations::InvalidConfigurationError: '{ default => }' is not a valid configuration. Expected '' to be a URL string or a Hash. remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3/lib/active_record/database_configurations.rb:152:in `build_db_config_from_raw_config' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3/lib/active_record/database_configurations.rb:126:in `block in build_configs' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3/lib/active_record/database_configurations.rb:122:in `each' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3/lib/active_record/database_configurations.rb:122:in `flat_map' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3/lib/active_record/database_configurations.rb:122:in `build_configs' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3/lib/active_record/database_configurations.rb:18:in `initialize' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3/lib/active_record/tasks/database_tasks.rb:159:in `new' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3/lib/active_record/tasks/database_tasks.rb:159:in `for_each' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3/lib/active_record/railties/databases.rake:28:in `block (2 levels) in <main>' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task_manager.rb:225:in `in_namespace' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/dsl_definition.rb:141:in `namespace' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3/lib/active_record/railties/databases.rake:23:in `block in <main>' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task_manager.rb:225:in `in_namespace' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/dsl_definition.rb:141:in `namespace' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3/lib/active_record/railties/databases.rake:7:in `<main>' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:69:in `load' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:69:in `rescue in load' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:52:in `load' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3/lib/active_support/dependencies.rb:318:in `block in load' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3/lib/active_support/dependencies.rb:291:in `load_dependency' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3/lib/active_support/dependencies.rb:318:in `load' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3/lib/active_record/railtie.rb:49:in `block in <class:Railtie>' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/railtie.rb:245:in `instance_exec' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/railtie.rb:245:in `block in run_tasks_blocks' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/railtie.rb:253:in `each' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/railtie.rb:253:in `each_registered_block' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/railtie.rb:245:in `run_tasks_blocks' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/application.rb:517:in `block in run_tasks_blocks' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/engine/railties.rb:15:in `each' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/engine/railties.rb:15:in `each' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/application.rb:517:in `run_tasks_blocks' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3/lib/rails/engine.rb:459:in `load_tasks' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/Rakefile:6:in `<top (required)>' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/rake_module.rb:29:in `load' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/rake_module.rb:29:in `load_rakefile' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:703:in `raw_load_rakefile' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:104:in `block in load_rakefile' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:186:in `standard_exception_handling' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:103:in `load_rakefile' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:82:in `block in run' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:186:in `standard_exception_handling' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:80:in `run' remote: ! /tmp/build_00af613d29d2adf087b6031ec55215d8/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>' remote: ! ./vendor/bundle/bin/rake:29:in `load' remote: ! ./vendor/bundle/bin/rake:29:in `<main>' remote: ! remote: ! Caused by: remote: ! Bootsnap::LoadPathCache::FallbackScan: remote: ! remote: /app/tmp/buildpacks/b7af5642714be ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/enigmatic-falls-64866.git'
また、$ heroku run rails consoleで確認すると以下のようになります。
Running rails console on ⬢ enigmatic-falls-64866... up, run.1013 (Free) bash: rails: command not found
Gemfile
source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } gem 'rails', '6.0.3' gem 'puma', '4.3.4' gem 'sass-rails', '5.1.0' gem 'webpacker', '4.0.7' gem 'turbolinks', '5.2.0' gem 'jbuilder', '2.9.1' gem 'bootsnap', '1.4.5', require: false group :development, :test do gem 'sqlite3', '1.4.1' gem 'byebug', '11.0.1', platforms: [:mri, :mingw, :x64_mingw] end group :development do gem 'web-console', '4.0.1' gem 'listen', '3.1.5' gem 'spring', '2.1.0' gem 'spring-watcher-listen', '2.0.1' end group :test do gem 'capybara', '3.28.0' gem 'selenium-webdriver', '3.142.4' gem 'webdrivers', '4.1.2' end group :production do gem 'pg', '1.1.4' end
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。