前提・実現したいこと
Ruby on railsで作成したアプリケーションをHerokuにデプロイしたいです。
発生している問題
GithubとHerokuを接続して手動展開しようとするとエラーが発生する。
エラーメッセージ
-----> 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 Using minitest 5.14.1 Using thread_safe 0.3.6 Fetching zeitwerk 2.3.0 Using builder 3.2.4 Using erubi 1.9.0 Using mini_portile2 2.4.0 Using crass 1.0.6 Using rack 2.2.2 Using nio4r 2.5.2 Using websocket-extensions 0.1.4 Using mimemagic 0.3.5 Using mini_mime 1.0.2 Fetching public_suffix 4.0.5 Using execjs 2.7.0 Using bcrypt 3.1.13 Fetching bindex 0.8.1 Installing zeitwerk 2.3.0 Installing bindex 0.8.1 with native extensions Installing public_suffix 4.0.5 Fetching popper_js 1.16.0 Installing popper_js 1.16.0 Using rb-fsevent 0.10.4 Using ffi 1.12.2 Using bundler 2.0.2 Fetching regexp_parser 1.7.0 Installing regexp_parser 1.7.0 Fetching childprocess 3.0.0 Installing childprocess 3.0.0 Using coffee-script-source 1.12.2 Using method_source 1.0.0 Using thor 1.0.1 Using duktape 2.3.0.0 Using pg 1.2.3 Fetching puma 3.12.6 Installing puma 3.12.6 with native extensions Fetching rubyzip 2.3.0 Installing rubyzip 2.3.0 Using tilt 2.0.10 Using turbolinks-source 5.2.0 Using i18n 1.8.2 Using tzinfo 1.2.7 Using nokogiri 1.10.9 Using rack-test 1.1.0 Fetching websocket-driver 0.7.2 Installing websocket-driver 0.7.2 with native extensions Using sprockets 3.7.2 Using marcel 0.3.3 Using mail 2.7.1 Fetching autoprefixer-rails 9.7.6 Installing autoprefixer-rails 9.7.6 Using uglifier 4.2.0 Using rb-inotify 0.10.1 Fetching addressable 2.7.0 Installing addressable 2.7.0 Using coffee-script 2.4.1 Fetching selenium-webdriver 3.142.7 Installing selenium-webdriver 3.142.7 Using turbolinks 5.2.1 Fetching activesupport 6.0.3.1 Installing activesupport 6.0.3.1 Fetching tzinfo-data 1.2020.1 Installing tzinfo-data 1.2020.1 Using loofah 2.5.0 Fetching xpath 3.2.0 Installing xpath 3.2.0 Using sass-listen 4.0.0 Fetching webdrivers 4.3.0 Installing webdrivers 4.3.0 Using rails-dom-testing 2.0.3 Using globalid 0.4.2 Fetching activemodel 6.0.3.1 Installing activemodel 6.0.3.1 Using jbuilder 2.10.0 Using rails-html-sanitizer 1.3.0 Fetching capybara 3.32.2 Installing capybara 3.32.2 Using sass 3.7.4 Fetching activejob 6.0.3.1 Installing activejob 6.0.3.1 Fetching activerecord 6.0.3.1 Fetching actionview 6.0.3.1 Installing activerecord 6.0.3.1 Installing actionview 6.0.3.1 Fetching bootstrap 4.1.3 Installing bootstrap 4.1.3 Fetching actionpack 6.0.3.1 Installing actionpack 6.0.3.1 Fetching actioncable 6.0.3.1 Fetching activestorage 6.0.3.1 Fetching actionmailer 6.0.3.1 Installing actionmailer 6.0.3.1 Installing actioncable 6.0.3.1 Installing activestorage 6.0.3.1 Fetching railties 6.0.3.1 Using sprockets-rails 3.2.1 Fetching actiontext 6.0.3.1 Fetching actionmailbox 6.0.3.1 Installing railties 6.0.3.1 Installing actiontext 6.0.3.1 Installing actionmailbox 6.0.3.1 Fetching coffee-rails 5.0.0 Using jquery-rails 4.4.0 Using jquery-ui-rails 6.0.1 Fetching rails 6.0.3.1 Fetching rails-i18n 6.0.0 Installing coffee-rails 5.0.0 Installing rails 6.0.3.1 Using sass-rails 5.1.0 Fetching web-console 4.0.2 Installing rails-i18n 6.0.0 Installing web-console 4.0.2 Bundle complete! 20 Gemfile dependencies, 80 gems now installed. Gems in the groups development and test were not installed. Bundled gems are installed into `./vendor/bundle` Removing arel (9.0.0) Removing bootsnap (1.4.6) Removing request_store (1.5.0) Removing activemodel (5.2.4.2) Removing activerecord (5.2.4.2) Removing multi_json (1.14.1) Removing gon (6.3.2) Removing activejob (5.2.4.2) Removing actioncable (5.2.4.2) Removing websocket-driver (0.7.1) Removing actionpack (5.2.4.2) Removing rails-i18n (5.1.3) Removing actionview (5.2.4.2) Removing railties (5.2.4.2) Removing actionmailer (5.2.4.2) Removing rails (5.2.4.2) Removing msgpack (1.3.3) Removing puma (3.12.4) Removing activesupport (5.2.4.2) Removing activestorage (5.2.4.2) Removing coffee-rails (4.2.2) Bundle completed (11.41s) Cleaning up the bundler cache. -----> Installing node-v10.15.3-linux-x64 -----> Detecting rake tasks -----> Preparing app for Rails asset pipeline Running: rake assets:precompile Web Console is activated in the production environment. This is usually a mistake. To ensure it's only activated in development mode, move it to the development group of your Gemfile: gem 'web-console', group: :development If you still want to run it in the production environment (and know what you are doing), put this in your Rails application configuration: config.web_console.development_only = false ! ! Precompiling assets failed. ! ! Push rejected, failed to compile Ruby app. ! Push failed
試したこと
Gemfile.lockを削除してみる。結果は下のエラーメッセージが表示された。
-----> Ruby app detected -----> Compiling Ruby/NoLockfile ! ! Gemfile.lock required. Please check it in. ! ! Push rejected, failed to compile Ruby app. ! Push failed
Windows環境でのエラーのようなのでGemfile.lockの中の下の一文を削除すると
PLATFORMS x64-mingw32
以下のようなエラーメッセージが表示されます。
-----> 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 -----> Installing dependencies using bundler 2.0.2 Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment Your bundle only supports platforms [] but your local platforms are ["ruby", "x86_64-linux"], and there's no compatible match between those two lists. Bundler Output: Your bundle only supports platforms [] but your local platforms are ["ruby", "x86_64-linux"], and there's no compatible match between those two lists. ! ! Failed to install gems via Bundler. ! ! Push rejected, failed to compile Ruby app. ! Push failed
なので先ほど消した
PLATFORMS x64-mingw32
を元に戻しておきました。
補足情報
Windows 10 home 64ビット
ruby 2.6.6
Ruby on rails 6.0.3.1
PostgreSQL 13beta1
テキストエディタ Atom
失礼な点があるかもしれませんがどうぞ宜しくおねがい致します。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。