前提・実現したいこと
Ruby on Railsで作ったアプリケーションをHerokuでデプロイしたいです。
発生している問題
Githubを接続した状態で手動でデプロイとするとデプロイに失敗する。
ビルドログ
-----> Ruby app detected -----> Installing bundler 2.0.2 -----> Removing BUNDLED WITH version in the Gemfile.lock -----> Compiling Ruby/Rails -----> Using Ruby version: ruby-2.6.6 ###### WARNING: Removing `Gemfile.lock` because it was generated on Windows. Bundler will do a full resolve so native gems are handled properly. This may result in unexpected gem versions being used in your app. In rare occasions Bundler may not be able to resolve your dependencies at all. https://devcenter.heroku.com/articles/bundler-windows-gemfile -----> Installing dependencies using bundler 2.0.2 Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 Fetching gem metadata from https://rubygems.org/............. Fetching gem metadata from https://rubygems.org/. Resolving dependencies.... Using rake 13.0.1 Using concurrent-ruby 1.1.6 省略 Removing xpath (3.2.0) Bundle completed (182.74s) Cleaning up the bundler cache. -----> Installing node-v10.15.3-linux-x64 -----> Installing yarn-v1.16.0 -----> Detecting rake tasks -----> Preparing app for Rails asset pipeline Running: rake assets:precompile rake aborted! NameError: uninitialized constant Devise /tmp/build_8ed2983011898a8242ee89f49ca85dae/config/initializers/devise.rb:1:in `<top (required)>' /tmp/build_8ed2983011898a8242ee89f49ca85dae/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.1/lib/rails/engine.rb:666:in `block in load_config_initializer' /tmp/build_8ed2983011898a8242ee89f49ca85dae/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/notifications.rb:182:in `instrument' /tmp/build_8ed2983011898a8242ee89f49ca85dae/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.1/lib/rails/engine.rb:665:in `load_config_initializer' /tmp/build_8ed2983011898a8242ee89f49ca85dae/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.1/lib/rails/engine.rb:625:in `block (2 levels) in <class:Engine>' /tmp/build_8ed2983011898a8242ee89f49ca85dae/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.1/lib/rails/engine.rb:624:in `each' /tmp/build_8ed2983011898a8242ee89f49ca85dae/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.1/lib/rails/engine.rb:624:in `block in <class:Engine>' /tmp/build_8ed2983011898a8242ee89f49ca85dae/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.1/lib/rails/initializable.rb:32:in `instance_exec' /tmp/build_8ed2983011898a8242ee89f49ca85dae/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.1/lib/rails/initializable.rb:32:in `run' /tmp/build_8ed2983011898a8242ee89f49ca85dae/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.1/lib/rails/initializable.rb:61:in `block in run_initializers' /tmp/build_8ed2983011898a8242ee89f49ca85dae/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.1/lib/rails/initializable.rb:50:in `each' /tmp/build_8ed2983011898a8242ee89f49ca85dae/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.1/lib/rails/initializable.rb:50:in `tsort_each_child' /tmp/build_8ed2983011898a8242ee89f49ca85dae/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.1/lib/rails/initializable.rb:60:in `run_initializers' /tmp/build_8ed2983011898a8242ee89f49ca85dae/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.1/lib/rails/application.rb:363:in `initialize!' /tmp/build_8ed2983011898a8242ee89f49ca85dae/config/environment.rb:2:in `<top (required)>' /tmp/build_8ed2983011898a8242ee89f49ca85dae/vendor/bundle/ruby/2.6.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require' /tmp/build_8ed2983011898a8242ee89f49ca85dae/vendor/bundle/ruby/2.6.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require' /tmp/build_8ed2983011898a8242ee89f49ca85dae/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.1/lib/rails/application.rb:339:in `require_environment!' /tmp/build_8ed2983011898a8242ee89f49ca85dae/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.1/lib/rails/application.rb:523:in `block in run_tasks_blocks' /tmp/build_8ed2983011898a8242ee89f49ca85dae/vendor/bundle/ruby/2.6.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define' /tmp/build_8ed2983011898a8242ee89f49ca85dae/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>' Tasks: TOP => environment (See full trace by running task with --trace) ! ! Precompiling assets failed. ! ! Push rejected, failed to compile Ruby app. ! Push failed
ソースコード
pacage.json
{ "name": "butube", "private": true, "dependencies": { "@rails/actioncable": "^6.0.0", "@rails/activestorage": "^6.0.0", "@rails/ujs": "^6.0.0", "@rails/webpacker": "4.2.2", "turbolinks": "^5.2.0" }, "version": "0.1.0", "devDependencies": { "webpack-dev-server": "^3.11.0" }, "dependencies": {} }
config/environments/production.rb
Rails.application.configure do config.cache_classes = true config.eager_load = true config.consider_all_requests_local = false config.action_controller.perform_caching = true config.assets.compile = true config.public_file_server.enabled = true config.active_storage.service = :local config.log_level = :debug config.log_tags = [ :request_id ] config.action_mailer.perform_caching = false config.i18n.fallbacks = true config.active_support.deprecation = :notify config.log_formatter = ::Logger::Formatter.new if ENV["RAILS_LOG_TO_STDOUT"].present? logger = ActiveSupport::Logger.new(STDOUT) logger.formatter = config.log_formatter config.logger = ActiveSupport::TaggedLogging.new(logger) end config.active_record.dump_schema_after_migration = false end
試したこと(覚えている範囲)
バンドらーのバージョンを2.0.2に変更。
補足情報
Windows 10 home 64ビット
ruby 2.6.6
Ruby on rails 6.0.3.1
PostgreSQL 13beta1
テキストエディタ Atom
失礼な点があるかもしれませんがどうぞ宜しくおねがい致します。
回答1件
あなたの回答
tips
プレビュー