前提・実現したいこと
プログラミング初心者です。
(AWSのcloud9で作業してます。)
Ruby on Rails とJabaScriptでアプリケーションを作成し、
heroku を用いて デプロイ をしようと考えています。
しかし、
$ git push heroku master のコマンドで下記のようなエラー文(`require': cannot load such file -- bootsnap/setup (LoadError))が出てしまい、
どのようにしたら正常にpush出来るのかがわかりません
$ rails s では通常に動きます。
発生している問題・エラーメッセージ
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: ! /tmp/build_68e54361/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError) remote: ! from /tmp/build_68e54361/config/boot.rb:4:in `<top (required)>' remote: ! from /tmp/build_68e54361/bin/rake:7:in `require_relative' remote: ! from /tmp/build_68e54361/bin/rake:7:in `<main>' remote: !
該当のソースコード
terminal
1Kaneko:~/environment/mensetu (master) $ git add . 2Kaneko:~/environment/mensetu (master) $ git commit -m "gemfile-origin" 3[master 75662b7] gemfile-origin 4 2 files changed, 5 insertions(+), 32 deletions(-) 5Kaneko:~/environment/mensetu (master) $ git push heroku master
Gemfile
1source 'https://rubygems.org' 2git_source(:github) { |repo| "https://github.com/#{repo}.git" } 3 4ruby '2.5.1' 5 6# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 7gem 'rails', '~> 5.2.1' 8# Use mysql as the database for Active Record 9gem 'mysql2', '0.5.2' 10# Use Puma as the app server 11gem 'puma', '~> 3.11' 12# Use SCSS for stylesheets 13gem 'sass-rails', '~> 5.0.7' 14# Use Uglifier as compressor for JavaScript assets 15gem 'uglifier', '>= 1.3.0' 16# See https://github.com/rails/execjs#readme for more supported runtimes 17# gem 'mini_racer', platforms: :ruby 18 19# Use CoffeeScript for .coffee assets and views 20gem 'coffee-rails', '~> 4.2' 21# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks 22gem 'turbolinks', '~> 5' 23# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 24gem 'jbuilder', '~> 2.5' 25# Use Redis adapter to run Action Cable in production 26# gem 'redis', '~> 4.0' 27# Use ActiveModel has_secure_password 28# gem 'bcrypt', '~> 3.1.7' 29 30# Use ActiveStorage variant 31# gem 'mini_magick', '~> 4.8' 32 33# Use Capistrano for deployment 34# gem 'capistrano-rails', group: :development 35 36# Reduces boot times through caching; required in config/boot.rb 37gem 'bootsnap', '>= 1.1.0', require: false 38 39group :development, :test do 40 # Call 'byebug' anywhere in the code to stop execution and get a debugger console 41 gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] 42end 43 44group :development do 45 # Access an interactive console on exception pages or by calling 'console' anywhere in the code. 46 gem 'web-console', '>= 3.3.0' 47 gem 'listen', '>= 3.0.5', '< 3.2' 48 # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring 49 gem 'spring' 50 gem 'spring-watcher-listen', '~> 2.0.0' 51end 52 53group :test do 54 # Adds support for Capybara system testing and selenium driver 55 gem 'capybara', '>= 2.15' 56 gem 'selenium-webdriver' 57 # Easy installation and use of chromedriver to run system tests with Chrome 58 gem 'chromedriver-helper' 59end 60 61# Windows does not include zoneinfo files, so bundle the tzinfo-data gem 62gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] 63 64gem 'pry-rails' 65gem 'jquery-rails' 66 67group :production do 68 gem 'rails_12factor' 69end
Gemfilelock
1 remote: https://rubygems.org/ 2 specs: 3 actioncable (5.2.4.4) 4 actionpack (= 5.2.4.4) 5 nio4r (~> 2.0) 6 websocket-driver (>= 0.6.1) 7 actionmailer (5.2.4.4) 8 actionpack (= 5.2.4.4) 9 actionview (= 5.2.4.4) 10 activejob (= 5.2.4.4) 11 mail (~> 2.5, >= 2.5.4) 12 rails-dom-testing (~> 2.0) 13 actionpack (5.2.4.4) 14 actionview (= 5.2.4.4) 15 activesupport (= 5.2.4.4) 16 rack (~> 2.0, >= 2.0.8) 17 rack-test (>= 0.6.3) 18 rails-dom-testing (~> 2.0) 19 rails-html-sanitizer (~> 1.0, >= 1.0.2) 20 actionview (5.2.4.4) 21 activesupport (= 5.2.4.4) 22 builder (~> 3.1) 23 erubi (~> 1.4) 24 rails-dom-testing (~> 2.0) 25 rails-html-sanitizer (~> 1.0, >= 1.0.3) 26 activejob (5.2.4.4) 27 activesupport (= 5.2.4.4) 28 globalid (>= 0.3.6) 29 activemodel (5.2.4.4) 30 activesupport (= 5.2.4.4) 31 activerecord (5.2.4.4) 32 activemodel (= 5.2.4.4) 33 activesupport (= 5.2.4.4) 34 arel (>= 9.0) 35 activestorage (5.2.4.4) 36 actionpack (= 5.2.4.4) 37 activerecord (= 5.2.4.4) 38 marcel (~> 0.3.1) 39 activesupport (5.2.4.4) 40 concurrent-ruby (~> 1.0, >= 1.0.2) 41 i18n (>= 0.7, < 2) 42 minitest (~> 5.1) 43 tzinfo (~> 1.1) 44 addressable (2.7.0) 45 public_suffix (>= 2.0.2, < 5.0) 46 archive-zip (0.12.0) 47 io-like (~> 0.3.0) 48 arel (9.0.0) 49 bindex (0.8.1) 50 builder (3.2.4) 51 byebug (11.1.3) 52 capybara (3.34.0) 53 addressable 54 mini_mime (>= 0.1.3) 55 nokogiri (~> 1.8) 56 rack (>= 1.6.0) 57 rack-test (>= 0.6.3) 58 regexp_parser (~> 1.5) 59 xpath (~> 3.2) 60 childprocess (3.0.0) 61 chromedriver-helper (2.1.1) 62 archive-zip (~> 0.10) 63 nokogiri (~> 1.8) 64 coderay (1.1.3) 65 coffee-rails (4.2.2) 66 coffee-script (>= 2.2.0) 67 railties (>= 4.0.0) 68 coffee-script (2.4.1) 69 coffee-script-source 70 execjs 71 coffee-script-source (1.12.2) 72 concurrent-ruby (1.1.8) 73 crass (1.0.6) 74 erubi (1.10.0) 75 execjs (2.7.0) 76 ffi (1.14.2) 77 globalid (0.4.2) 78 activesupport (>= 4.2.0) 79 i18n (1.8.7) 80 concurrent-ruby (~> 1.0) 81 io-like (0.3.1) 82 jbuilder (2.10.1) 83 activesupport (>= 5.0.0) 84 jquery-rails (4.4.0) 85 rails-dom-testing (>= 1, < 3) 86 railties (>= 4.2.0) 87 thor (>= 0.14, < 2.0) 88 listen (3.1.5) 89 rb-fsevent (~> 0.9, >= 0.9.4) 90 rb-inotify (~> 0.9, >= 0.9.7) 91 ruby_dep (~> 1.2) 92 loofah (2.9.0) 93 crass (~> 1.0.2) 94 nokogiri (>= 1.5.9) 95 mail (2.7.1) 96 mini_mime (>= 0.1.1) 97 marcel (0.3.3) 98 mimemagic (~> 0.3.2) 99 method_source (1.0.0) 100 mimemagic (0.3.5) 101 mini_mime (1.0.2) 102 minitest (5.14.3) 103 mysql2 (0.5.2) 104 nio4r (2.5.4) 105 nokogiri (1.11.1-x86_64-linux) 106 racc (~> 1.4) 107 pry (0.13.1) 108 coderay (~> 1.1) 109 method_source (~> 1.0) 110 pry-rails (0.3.9) 111 pry (>= 0.10.4) 112 public_suffix (4.0.6) 113 puma (3.12.6) 114 racc (1.5.2) 115 rack (2.2.3) 116 rack-test (1.1.0) 117 rack (>= 1.0, < 3) 118 rails (5.2.4.4) 119 actioncable (= 5.2.4.4) 120 actionmailer (= 5.2.4.4) 121 actionpack (= 5.2.4.4) 122 actionview (= 5.2.4.4) 123 activejob (= 5.2.4.4) 124 activemodel (= 5.2.4.4) 125 activerecord (= 5.2.4.4) 126 activestorage (= 5.2.4.4) 127 activesupport (= 5.2.4.4) 128 bundler (>= 1.3.0) 129 railties (= 5.2.4.4) 130 sprockets-rails (>= 2.0.0) 131 rails-dom-testing (2.0.3) 132 activesupport (>= 4.2.0) 133 nokogiri (>= 1.6) 134 rails-html-sanitizer (1.3.0) 135 loofah (~> 2.3) 136 rails_12factor (0.0.3) 137 rails_serve_static_assets 138 rails_stdout_logging 139 rails_serve_static_assets (0.0.5) 140 rails_stdout_logging (0.0.5) 141 railties (5.2.4.4) 142 actionpack (= 5.2.4.4) 143 activesupport (= 5.2.4.4) 144 method_source 145 rake (>= 0.8.7) 146 thor (>= 0.19.0, < 2.0) 147 rake (13.0.3) 148 rb-fsevent (0.10.4) 149 rb-inotify (0.10.1) 150 ffi (~> 1.0) 151 regexp_parser (1.8.2) 152 ruby_dep (1.5.0) 153 rubyzip (2.3.0) 154 sass (3.7.4) 155 sass-listen (~> 4.0.0) 156 sass-listen (4.0.0) 157 rb-fsevent (~> 0.9, >= 0.9.4) 158 rb-inotify (~> 0.9, >= 0.9.7) 159 sass-rails (5.0.8) 160 railties (>= 5.2.0) 161 sass (~> 3.1) 162 sprockets (>= 2.8, < 4.0) 163 sprockets-rails (>= 2.0, < 4.0) 164 tilt (>= 1.1, < 3) 165 selenium-webdriver (3.142.7) 166 childprocess (>= 0.5, < 4.0) 167 rubyzip (>= 1.2.2) 168 spring (2.1.1) 169 spring-watcher-listen (2.0.1) 170 listen (>= 2.7, < 4.0) 171 spring (>= 1.2, < 3.0) 172 sprockets (3.7.2) 173 concurrent-ruby (~> 1.0) 174 rack (> 1, < 3) 175 sprockets-rails (3.2.2) 176 actionpack (>= 4.0) 177 activesupport (>= 4.0) 178 sprockets (>= 3.0.0) 179 thor (1.1.0) 180 thread_safe (0.3.6) 181 tilt (2.0.10) 182 turbolinks (5.2.1) 183 turbolinks-source (~> 5.2) 184 turbolinks-source (5.2.0) 185 tzinfo (1.2.9) 186 thread_safe (~> 0.1) 187 uglifier (4.2.0) 188 execjs (>= 0.3.0, < 3) 189 web-console (3.7.0) 190 actionview (>= 5.0) 191 activemodel (>= 5.0) 192 bindex (>= 0.4.0) 193 railties (>= 5.0) 194 websocket-driver (0.7.3) 195 websocket-extensions (>= 0.1.0) 196 websocket-extensions (0.1.5) 197 xpath (3.2.0) 198 nokogiri (~> 1.8) 199 200PLATFORMS 201 x86_64-linux 202 203DEPENDENCIES 204 byebug 205 capybara (>= 2.15) 206 chromedriver-helper 207 coffee-rails (~> 4.2) 208 jbuilder (~> 2.5) 209 jquery-rails 210 listen (>= 3.0.5, < 3.2) 211 mysql2 (= 0.5.2) 212 pry-rails 213 puma (~> 3.11) 214 rails (~> 5.2.1) 215 rails_12factor 216 sass-rails (~> 5.0.7) 217 selenium-webdriver 218 spring 219 spring-watcher-listen (~> 2.0.0) 220 turbolinks (~> 5) 221 tzinfo-data 222 uglifier (>= 1.3.0) 223 web-console (>= 3.3.0) 224 225RUBY VERSION 226 ruby 2.5.1p57 227 228BUNDLED WITH 229 2.2.6 230
bootrb
1ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 2 3require 'bundler/setup' # Set up gems listed in the Gemfile. 4require 'bootsnap/setup' # Speed up boot time by caching expensive operations. 5
試したこと
・gem 'bootsnap' の削除
→ $ bundle install したが新たなエラーが出たため元に戻しました
補足情報(FW/ツールのバージョンなど
version
Ruby : ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
あなたの回答
tips
プレビュー