Rails Deployment to Heroku: NoMethodError: undefined method `+' for nil:NilClass - ruby-on-rails

I'm new to Rails but have been working on an app the last few weeks that has been working great in development and in production when I deploy to Heroku.
Today I made some minor changes to my application.css file and now I am getting a "Precompiling assets failed" error when I try to deploy to Heroku. With a NoMethodError: undefined method `+' for nil:NilClass. Running ruby 2.6.5, Rails 6.0.3.1, PG 1.2.3
I've attached the logs below which may or may not be helpful. I obviously don't have the knowledge of how to debug this properly so advice on what might be causing the error is great but failing that, how should I be trying to replicate this error locally and figuring it out?
I've already tried, with no success:
Changing the application.css file to .scss
Adding config.assets.initialize_on_precompile = false to the application.rb file
Reverting to my last successful commit
Thank you!
Enumerating objects: 78, done.
Counting objects: 100% (78/78), done.
Delta compression using up to 8 threads
Compressing objects: 100% (61/61), done.
Writing objects: 100% (61/61), 5.07 KiB | 519.00 KiB/s, done.
Total 61 (delta 46), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Installing bundler 1.17.3
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.6.5
remote:
remote: ###### WARNING:
remote:
remote: Removing `Gemfile.lock` because it was generated on Windows.
remote: Bundler will do a full resolve so native gems are handled properly.
remote: This may result in unexpected gem versions being used in your app.
remote: In rare occasions Bundler may not be able to resolve your dependencies at all.
remote: https://devcenter.heroku.com/articles/bundler-windows-gemfile
remote:
remote: -----> Installing dependencies using bundler 1.17.3
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4
remote: The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64
-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
remote: Fetching gem metadata from https://rubygems.org/.............
remote: Fetching gem metadata from https://rubygems.org/.
remote: Resolving dependencies.....
remote: Using rake 13.0.1
remote: Using concurrent-ruby 1.1.6
remote: Using minitest 5.14.1
remote: Using thread_safe 0.3.6
remote: Using zeitwerk 2.3.0
remote: Using builder 3.2.4
remote: Using erubi 1.9.0
remote: Using mini_portile2 2.4.0
remote: Using crass 1.0.6
remote: Using rack 2.2.2
remote: Using nio4r 2.5.2
remote: Fetching websocket-extensions 0.1.5
remote: Using mimemagic 0.3.5
remote: Using mini_mime 1.0.2
remote: Using formtastic_i18n 0.6.0
remote: Using method_source 1.0.0
remote: Using thor 1.0.1
remote: Using kaminari-core 1.2.1
remote: Fetching ffi 1.13.0
remote: Using tilt 2.0.10
remote: Using bcrypt 3.1.13
remote: Using msgpack 1.3.3
remote: Using bundler 1.17.3
remote: Using orm_adapter 0.5.0
remote: Using hashids 1.0.5
remote: Using pg 1.2.3
remote: Using turbolinks-source 5.2.0
remote: Fetching i18n 1.8.3
remote: Installing websocket-extensions 0.1.5
remote: Installing i18n 1.8.3
remote: Using tzinfo 1.2.7
remote: Using nokogiri 1.10.9
remote: Using puma 4.3.5
remote: Using rack-test 1.1.0
remote: Fetching sprockets 4.0.1
remote: Installing sprockets 4.0.1
remote: Installing ffi 1.13.0 with native extensions
remote: Using warden 1.2.8
remote: Using rack-proxy 0.6.5
remote: Using marcel 0.3.3
remote: Using mail 2.7.1
remote: Using bootsnap 1.4.6
remote: Using turbolinks 5.2.1
remote: Using loofah 2.5.0
remote: Using websocket-driver 0.7.2
remote: Using activesupport 6.0.3.1
remote: Using rails-dom-testing 2.0.3
remote: Using rails-html-sanitizer 1.3.0
remote: Using globalid 0.4.2
remote: Using activemodel 6.0.3.1
remote: Using arbre 1.2.1
remote: Using jbuilder 2.10.0
remote: Using actionview 6.0.3.1
remote: Using activejob 6.0.3.1
remote: Using activerecord 6.0.3.1
remote: Using actionpack 6.0.3.1
remote: Using kaminari-actionview 1.2.1
remote: Using kaminari-activerecord 1.2.1
remote: Using polyamorous 2.3.2
remote: Using hashid-rails 1.4.0
remote: Using actioncable 6.0.3.1
remote: Using activestorage 6.0.3.1
remote: Using actionmailer 6.0.3.1
remote: Using formtastic 3.1.5
remote: Using has_scope 0.7.2
remote: Using railties 6.0.3.1
remote: Using kaminari 1.2.1
remote: Using ransack 2.3.2
remote: Using actionmailbox 6.0.3.1
remote: Using actiontext 6.0.3.1
remote: Using responders 3.0.1
remote: Using jquery-rails 4.4.0
remote: Using webpacker 4.2.2
remote: Using inherited_resources 1.11.0
remote: Using devise 4.7.1
remote: Using sprockets-rails 3.2.1
remote: Using rails 6.0.3.1
remote: Fetching sassc 2.4.0
remote: Installing sassc 2.4.0 with native extensions
remote: Using sassc-rails 2.1.2
remote: Using activeadmin 2.7.0
remote: Using sass-rails 6.0.0
remote: Bundle complete! 18 Gemfile dependencies, 77 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 i18n:
remote:
remote: HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
remote: But that may break your application.
remote:
remote: If you are upgrading your Rails application from an older version of Rails:
remote:
remote: Please check your Rails app for 'config.i18n.fallbacks = true'.
remote: If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
remote: 'config.i18n.fallbacks = [I18n.default_locale]'.
remote: If not, fallbacks will be broken in your app by I18n 1.1.x.
remote:
remote: If you are starting a NEW Rails application, you can ignore this notice.
remote:
remote: For more info see:
remote: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
remote:
remote: Removing i18n (1.8.2)
remote: Removing sprockets (4.0.0)
remote: Removing websocket-extensions (0.1.4)
remote: Removing ffi (1.12.2)
remote: Removing sassc (2.3.0)
remote: Bundle completed (186.51s)
remote: Cleaning up the bundler cache.
remote: The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64
-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
remote: -----> Installing node-v10.15.3-linux-x64
remote: -----> Installing yarn-v1.16.0
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: yarn install v1.16.0
remote: [1/4] Resolving packages...
remote: [2/4] Fetching packages...
remote: info fsevents#1.2.13: The platform "linux" is incompatible with this module.
remote: info "fsevents#1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
remote: [3/4] Linking dependencies...
remote: warning " > webpack-dev-server#3.11.0" has unmet peer dependency "webpack#^4.0.0 || ^5.0.0".
remote: warning "webpack-dev-server > webpack-dev-middleware#3.7.2" has unmet peer dependency "webpack#^4.0.0".
remote: [4/4] Building fresh packages...
remote: Done in 23.47s.
remote: yarn install v1.16.0
remote: [1/4] Resolving packages...
remote: [2/4] Fetching packages...
remote: info fsevents#1.2.13: The platform "linux" is incompatible with this module.
remote: info "fsevents#1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
remote: [3/4] Linking dependencies...
remote: warning " > webpack-dev-server#3.11.0" has unmet peer dependency "webpack#^4.0.0 || ^5.0.0".
remote: warning "webpack-dev-server > webpack-dev-middleware#3.7.2" has unmet peer dependency "webpack#^4.0.0".
remote: [4/4] Building fresh packages...
remote: Done in 5.05s.
remote: I, [2020-06-05T05:23:48.123557 #791] INFO -- : Writing /tmp/build_89a8346fedd1ed19bb5329c741888493/public/assets/active_admin-312e30985f3b0561c5db85eaba9b50b1d2c6fcbcff0e0cd5ae0862f13ef86223
796473.css
remote: I, [2020-06-05T05:23:48.123844 #791] INFO -- : Writing /tmp/build_89a8346fedd1ed19bb5329c741888493/public/assets/active_admin-312e30985f3b0561c5db85eaba9b50b1d2c6fcbcff0e0cd5ae0862f13ef86223
796473.css.gz
remote: I, [2020-06-05T05:23:48.124090 #791] INFO -- : Writing /tmp/build_89a8346fedd1ed19bb5329c741888493/public/assets/active_admin/print-312e30cf99cbf27fb92065a9eacd28e6fad48fa72cadaf6e0918790e8d
35b11d8f99f6.css
remote: I, [2020-06-05T05:23:48.124270 #791] INFO -- : Writing /tmp/build_89a8346fedd1ed19bb5329c741888493/public/assets/active_admin/print-312e30cf99cbf27fb92065a9eacd28e6fad48fa72cadaf6e0918790e8d
35b11d8f99f6.css.gz
remote: I, [2020-06-05T05:23:48.124504 #791] INFO -- : Writing /tmp/build_89a8346fedd1ed19bb5329c741888493/public/assets/manifest-312e3075a11da44c802486bc6f65640aa48a730f0f684c5c07a42ba3cd1735eb3fb0
70.js
remote: I, [2020-06-05T05:23:48.124686 #791] INFO -- : Writing /tmp/build_89a8346fedd1ed19bb5329c741888493/public/assets/manifest-312e3075a11da44c802486bc6f65640aa48a730f0f684c5c07a42ba3cd1735eb3fb0
70.js.gz
remote: rake aborted!
remote: NoMethodError: undefined method `+' for nil:NilClass
remote: /tmp/build_89a8346fedd1ed19bb5329c741888493/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.1/lib/sprockets/asset.rb:138:in `etag'
remote: /tmp/build_89a8346fedd1ed19bb5329c741888493/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.1/lib/sprockets/asset.rb:67:in `block in digest_path'
remote: /tmp/build_89a8346fedd1ed19bb5329c741888493/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.1/lib/sprockets/asset.rb:67:in `sub'
remote: /tmp/build_89a8346fedd1ed19bb5329c741888493/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.1/lib/sprockets/asset.rb:67:in `digest_path'
remote: /tmp/build_89a8346fedd1ed19bb5329c741888493/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.1/lib/sprockets/manifest.rb:175:in `block in compile'
remote: /tmp/build_89a8346fedd1ed19bb5329c741888493/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.1/lib/sprockets/manifest.rb:173:in `each'
remote: /tmp/build_89a8346fedd1ed19bb5329c741888493/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.1/lib/sprockets/manifest.rb:173:in `compile'
remote: /tmp/build_89a8346fedd1ed19bb5329c741888493/vendor/bundle/ruby/2.6.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
remote: /tmp/build_89a8346fedd1ed19bb5329c741888493/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.1/lib/rake/sprocketstask.rb:148:in `with_logger'
remote: /tmp/build_89a8346fedd1ed19bb5329c741888493/vendor/bundle/ruby/2.6.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
remote: /tmp/build_89a8346fedd1ed19bb5329c741888493/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
remote: Tasks: TOP => assets:precompile
remote: (See full trace by running task with --trace)
remote:
remote: !
remote: ! Precompiling assets failed.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to ...
remote:

Here is possible solution: not tried yet, but you should take a look.
https://github.com/rails/sprockets/issues/683
Basically in config/initializers/assets.rb, you need to update the Rails.application.config.assets.version value as well. I dont know how this affects deployment (how to know when to change this value? do we rely on deployment to fail first, then change this?)

Related

Ruby on Rails App rails fails to push to heroku; webpacker error

I am unable to push my Ruby on rails app to Heroku. I encounter errors using the heoku-20 stack.
project versions:
Ruby: ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux]
Rails: 6.1.3
Webpacker: 5.2.1
Node: v10.24.0
Yarn: 1.22.5
#rails/webpacker:
ipos#0.1.0 /home/ubuntu/environment/ipos
└── #rails/webpacker#5.2.1
Is bin/webpack present?: true
Is bin/webpack-dev-server present?: true
Is bin/yarn present?: true
I get errors listed below when attempting to deploy:
ubuntu:~/environment/ipos (main) $ git push heroku main
Counting objects: 31772, done.
Compressing objects: 100% (15426/15426), done.
Writing objects: 100% (31772/31772), 36.47 MiB | 34.45 MiB/s, done.
Total 31772 (delta 15360), reused 31767 (delta 15359)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpacks:
remote: 1. https://github.com/heroku/heroku-buildpack-ruby#v217
remote: 2. heroku/nodejs
remote: 3. heroku/ruby
remote: -----> Ruby app detected
remote: -----> Installing bundler 1.17.3
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.6.6
remote: -----> Installing dependencies using bundler 1.17.3
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Your Gemfile lists the gem pg (>= 0) more than once.
remote: You should probably keep only one of them.
remote: Remove any duplicate entries and specify the gem only once (per group).
remote: While it's not a problem now, it could cause errors if you change the version of one of them later.
remote: The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
remote: Fetching gem metadata from https://rubygems.org/............
remote: Fetching rake 13.0.3
remote: Installing rake 13.0.3
remote: Fetching concurrent-ruby 1.1.8
remote: Fetching minitest 5.14.4
remote: Fetching zeitwerk 2.4.2
remote: Installing zeitwerk 2.4.2
remote: Installing minitest 5.14.4
remote: Installing concurrent-ruby 1.1.8
remote: Fetching builder 3.2.4
remote: Installing builder 3.2.4
remote: Fetching erubi 1.10.0
remote: Installing erubi 1.10.0
remote: Fetching mini_portile2 2.5.0
remote: Fetching racc 1.5.2
remote: Installing mini_portile2 2.5.0
remote: Installing racc 1.5.2 with native extensions
remote: Fetching crass 1.0.6
remote: Installing crass 1.0.6
remote: Fetching rack 2.2.3
remote: Installing rack 2.2.3
remote: Fetching nio4r 2.5.5
remote: Installing nio4r 2.5.5 with native extensions
remote: Fetching websocket-extensions 0.1.5
remote: Installing websocket-extensions 0.1.5
remote: Fetching mimemagic 0.3.5
remote: Installing mimemagic 0.3.5
remote: Fetching mini_mime 1.0.2
remote: Installing mini_mime 1.0.2
remote: Fetching bcrypt 3.1.16
remote: Installing bcrypt 3.1.16 with native extensions
remote: Fetching msgpack 1.4.2
remote: Installing msgpack 1.4.2 with native extensions
remote: Using bundler 1.17.3
remote: Fetching cancan 1.6.10
remote: Installing cancan 1.6.10
remote: Fetching method_source 1.0.0
remote: Installing method_source 1.0.0
remote: Fetching thor 1.1.0
remote: Installing thor 1.1.0
remote: Fetching ffi 1.14.2
remote: Installing ffi 1.14.2 with native extensions
remote: Fetching pg 1.2.3
remote: Installing pg 1.2.3 with native extensions
remote: Fetching tilt 2.0.10
remote: Installing tilt 2.0.10
remote: Fetching semantic_range 2.3.1
remote: Installing semantic_range 2.3.1
remote: Fetching turbolinks-source 5.2.0
remote: Installing turbolinks-source 5.2.0
remote: Fetching i18n 1.8.9
remote: Installing i18n 1.8.9
remote: Fetching tzinfo 2.0.4
remote: Installing tzinfo 2.0.4
remote: Fetching rack-test 1.1.0
remote: Installing rack-test 1.1.0
remote: Fetching sprockets 4.0.2
remote: Installing sprockets 4.0.2
remote: Fetching rack-proxy 0.6.5
remote: Installing rack-proxy 0.6.5
remote: Fetching websocket-driver 0.7.3
remote: Installing websocket-driver 0.7.3 with native extensions
remote: Fetching marcel 0.3.3
remote: Installing marcel 0.3.3
remote: Fetching mail 2.7.1
remote: Installing mail 2.7.1
remote: Fetching nokogiri 1.11.1 (x86_64-linux)
remote: Installing nokogiri 1.11.1 (x86_64-linux)
remote: Fetching puma 5.2.1
remote: Installing puma 5.2.1 with native extensions
remote: Fetching figaro 1.2.0
remote: Installing figaro 1.2.0
remote: Fetching bootsnap 1.7.2
remote: Installing bootsnap 1.7.2 with native extensions
remote: Fetching turbolinks 5.2.1
remote: Installing turbolinks 5.2.1
remote: Fetching activesupport 6.1.3
remote: Installing activesupport 6.1.3
remote: Fetching sassc 2.4.0
remote: Installing sassc 2.4.0 with native extensions
remote: Fetching loofah 2.9.0
remote: Installing loofah 2.9.0
remote: Fetching rails-dom-testing 2.0.3
remote: Installing rails-dom-testing 2.0.3
remote: Fetching globalid 0.4.2
remote: Installing globalid 0.4.2
remote: Fetching activemodel 6.1.3
remote: Installing activemodel 6.1.3
remote: Fetching jbuilder 2.11.2
remote: Installing jbuilder 2.11.2
remote: Fetching rails-html-sanitizer 1.3.0
remote: Installing rails-html-sanitizer 1.3.0
remote: Fetching activejob 6.1.3
remote: Installing activejob 6.1.3
remote: Fetching activerecord 6.1.3
remote: Installing activerecord 6.1.3
remote: Fetching email_validator 1.6.0
remote: Installing email_validator 1.6.0
remote: Fetching actionview 6.1.3
remote: Installing actionview 6.1.3
remote: Fetching actionpack 6.1.3
remote: Installing actionpack 6.1.3
remote: Fetching activestorage 6.1.3
remote: Fetching actioncable 6.1.3
remote: Installing activestorage 6.1.3
remote: Installing actioncable 6.1.3
remote: Fetching actionmailer 6.1.3
remote: Installing actionmailer 6.1.3
remote: Fetching railties 6.1.3
remote: Installing railties 6.1.3
remote: Fetching sprockets-rails 3.2.2
remote: Installing sprockets-rails 3.2.2
remote: Fetching actionmailbox 6.1.3
remote: Installing actionmailbox 6.1.3
remote: Fetching actiontext 6.1.3
remote: Installing actiontext 6.1.3
remote: Fetching rails 6.1.3
remote: Fetching webpacker 5.2.1
remote: Installing rails 6.1.3
remote: Installing webpacker 5.2.1
remote: Fetching clearance 1.15.1
remote: Installing clearance 1.15.1
remote: Fetching sassc-rails 2.1.2
remote: Installing sassc-rails 2.1.2
remote: Fetching sass-rails 6.0.0
remote: Installing sass-rails 6.0.0
remote: Bundle complete! 27 Gemfile dependencies, 63 gems now installed.
remote: Gems in the groups development and test were not installed.
remote: Bundled gems are installed into `./vendor/bundle`
remote: Bundle completed (260.60s)
remote: Cleaning up the bundler cache.
remote: Your Gemfile lists the gem pg (>= 0) more than once.
remote: You should probably keep only one of them.
remote: Remove any duplicate entries and specify the gem only once (per group).
remote: While it's not a problem now, it could cause errors if you change the version of one of them later.
remote: The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
remote: -----> Installing node-v10.15.3-linux-x64
remote: -----> Installing yarn-v1.16.0
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: yarn install v1.16.0
remote: [1/4] Resolving packages...
remote: [2/4] Fetching packages...
remote: error #rails/webpacker#5.2.1: The engine "node" is incompatible with this module. Expected version ">=10.17.0". Got "10.15.3"
remote: error Found incompatible module.
remote: info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
remote: rake aborted!
remote: Sprockets::FileNotFound: couldn't find file 'trix/dist/trix' with type 'text/css'
remote: Checked in these paths:
remote: /tmp/build_8fc01f26/app/assets/config
remote: /tmp/build_8fc01f26/app/assets/images
remote: /tmp/build_8fc01f26/app/assets/stylesheets
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/actioncable-6.1.3/app/assets/javascripts
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/activestorage-6.1.3/app/assets/javascripts
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/actionview-6.1.3/lib/assets/compiled
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/turbolinks-source-5.2.0/lib/assets/javascripts
remote: /tmp/build_8fc01f26/node_modules
remote: /tmp/build_8fc01f26/app/assets/stylesheets/actiontext.scss:6
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/resolve.rb:62:in `resolve!'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/directive_processor.rb:409:in `resolve'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/directive_processor.rb:216:in `process_require_directive'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/directive_processor.rb:189:in `block in process_directives'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/directive_processor.rb:187:in `each'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/directive_processor.rb:187:in `process_directives'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/directive_processor.rb:84:in `_call'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/directive_processor.rb:65:in `call'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:84:in `call_processor'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:66:in `block in call_processors'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:65:in `reverse_each'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:65:in `call_processors'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/loader.rb:182:in `load_from_unloaded'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/loader.rb:59:in `block in load'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/loader.rb:337:in `fetch_asset_from_dependency_cache'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/loader.rb:43:in `load'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/cached_environment.rb:44:in `load'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/bundle.rb:27:in `call'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:84:in `call_processor'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:66:in `block in call_processors'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:65:in `reverse_each'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:65:in `call_processors'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/loader.rb:182:in `load_from_unloaded'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/loader.rb:59:in `block in load'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/loader.rb:337:in `fetch_asset_from_dependency_cache'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/loader.rb:43:in `load'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/cached_environment.rb:44:in `load'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/bundle.rb:32:in `block in call'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/bundle.rb:31:in `call'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:84:in `call_processor'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:66:in `block in call_processors'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:65:in `reverse_each'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:65:in `call_processors'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/loader.rb:182:in `load_from_unloaded'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/loader.rb:59:in `block in load'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/loader.rb:337:in `fetch_asset_from_dependency_cache'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/loader.rb:43:in `load'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/cached_environment.rb:44:in `load'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/base.rb:81:in `find_asset'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/base.rb:88:in `find_all_linked_assets'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/manifest.rb:125:in `block (2 levels) in find'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb:24:in `block in execute'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:41:in `block in synchronize'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:41:in `synchronize'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:41:in `synchronize'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb:19:in `execute'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/promise.rb:563:in `block in realize'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:363:in `run_task'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:352:in `block (3 levels) in create_worker'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:335:in `loop'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:335:in `block (2 levels) in create_worker'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:334:in `catch'
remote: /tmp/build_8fc01f26/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:334:in `block in create_worker'
remote: Tasks: TOP => assets:precompile
remote: (See full trace by running task with --trace)
remote:
remote: !
remote: ! Precompiling assets failed.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: !
remote: ! ## Warning - The same version of this code has already been built: 85e3e5a7b8fe7283987f26d235ba4fb37c08cd70
remote: !
remote: ! We have detected that you have triggered a build from source code with version 85e3e5a7b8fe7283987f26d235ba4fb37c08cd70
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote: !
remote: ! If you are developing on a branch and deploying via git you must run:
remote: !
remote: ! git push heroku <branchname>:main
remote: !
remote: ! This article goes into details on the behavior:
remote: ! https://devcenter.heroku.com/articles/duplicate-build-version
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to nameless-bastion-29082.
remote:
To https://git.heroku.com/nameless-bastion-29082.git
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/nameless-bastion-29082.git'
Things I have tried (that did not work)
heroku buildpacks:clear
heroku buildpacks:set heroku/nodejs
heroku buildpacks:add heroku/ruby
yarn install -ignore--engines
I am a student who is still learning ruby/rails. I would appreciate any and all help, thank you so much!
If you scroll down the deploy errors from Heroku it says.. (In development you’re going to have to read a lot of errors so get used to searching up terms and getting a complete understanding of what the errors are saying)
So it says
Running bundle install..
Your Gemfile lists the gem pg.. more than once.
So your Gemfile file is composed of the things that are used to install modules/gems when your app runs.
You accidentally listed one of the modules twice (pg/postgres) just remove one of them and it should work.
It also says
#rails/webpacker#5.2.1: The engine "node" is incompatible.
Expected version ">=10.17.0". Got "10.15.3"
Found incompatible module.
So try to change the webpack/webpacker version in Gemfile as well.

Heroku not updating, getting error "Yarn executable was not detected in system"

I am working on a web application for a Udemy course and even though everything works fine on my preview, I have noticed at some point heroku was not receiving the updates. Here is what happens when I try git push heroku master:
Counting objects: 219, done.
Compressing objects: 100% (216/216), done.
Writing objects: 100% (219/219), 607.44 KiB | 6.20 MiB/s, done.
Total 219 (delta 44), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.4.1
remote: -----> Installing dependencies using bundler 1.15.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.17.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: Fetching gem metadata from https://rubygems.org/.........
remote: Fetching version metadata from https://rubygems.org/..
remote: Fetching dependency metadata from https://rubygems.org/.
remote: Using rake 12.3.1
remote: Fetching concurrent-ruby 1.1.2
remote: Using minitest 5.11.3
remote: Using thread_safe 0.3.6
remote: Using builder 3.2.3
remote: Using erubi 1.7.1
remote: Using mini_portile2 2.3.0
remote: Using crass 1.0.4
remote: Fetching rack 2.0.6
remote: Using nio4r 2.3.1
remote: Using websocket-extensions 0.1.3
remote: Using mini_mime 1.0.1
remote: Using arel 9.0.0
remote: Using mimemagic 0.3.2
remote: Using execjs 2.7.0
remote: Using msgpack 1.2.4
remote: Using rb-fsevent 0.10.3
remote: Using ffi 1.9.25
remote: Using bundler 1.15.2
remote: Using coffee-script-source 1.12.2
remote: Fetching method_source 0.9.1
remote: Installing method_source 0.9.1
remote: Using thor 0.20.0
remote: Using multi_json 1.13.1
remote: Using pg 1.1.3
remote: Using puma 3.12.0
remote: Using rails_serve_static_assets 0.0.5
remote: Using rails_stdout_logging 0.0.5
remote: Using tilt 2.0.8
remote: Using turbolinks-source 5.2.0
remote: Using tzinfo 1.2.5
remote: Using nokogiri 1.8.5
remote: Using websocket-driver 0.7.0
remote: Using mail 2.7.1
remote: Using marcel 0.3.3
remote: Using autoprefixer-rails 9.3.1
remote: Using uglifier 4.1.19
remote: Using bootsnap 1.3.2
remote: Using rb-inotify 0.9.10
remote: Using coffee-script 2.4.1
remote: Using rails_12factor 0.0.3
remote: Using turbolinks 5.2.0
remote: Using loofah 2.2.3
remote: Using sass-listen 4.0.0
remote: Using rails-html-sanitizer 1.0.4
remote: Fetching sass 3.7.0
remote: Installing concurrent-ruby 1.1.2
remote: Installing rack 2.0.6
remote: Installing sass 3.7.0
remote: Using i18n 1.1.1
remote: Using activesupport 5.2.1
remote: Using rails-dom-testing 2.0.3
remote: Using globalid 0.4.1
remote: Using activemodel 5.2.1
remote: Fetching jbuilder 2.8.0
remote: Using actionview 5.2.1
remote: Using activejob 5.2.1
remote: Using activerecord 5.2.1
remote: Using rack-test 1.1.0
remote: Using sprockets 3.7.2
remote: Using actionpack 5.2.1
remote: Using bootstrap-sass 3.3.7
remote: Using actioncable 5.2.1
remote: Using actionmailer 5.2.1
remote: Using activestorage 5.2.1
remote: Using railties 5.2.1
remote: Using sprockets-rails 3.2.1
remote: Using coffee-rails 4.2.2
remote: Fetching font-awesome-rails 4.7.0.4
remote: Installing jbuilder 2.8.0
remote: Fetching jquery-rails 4.3.3
remote: Using rails 5.2.1
remote: Using sass-rails 5.0.7
remote: Installing jquery-rails 4.3.3
remote: Installing font-awesome-rails 4.7.0.4
remote: Bundle complete! 23 Gemfile dependencies, 68 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 sass:
remote:
remote: Ruby Sass is deprecated and will be unmaintained as of 26 March 2019.
remote:
remote: * If you use Sass as a command-line tool, we recommend using Dart Sass, the new
remote: primary implementation: https://sass-lang.com/install
remote:
remote: * If you use Sass as a plug-in for a Ruby web framework, we recommend using the
remote: sassc gem: https://github.com/sass/sassc-ruby#readme
remote:
remote: * For more details, please refer to the Sass blog:
remote: http://sass.logdown.com/posts/7081811
remote:
remote: Bundle completed (3.60s)
remote: Cleaning up the bundler cache.
remote: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.17.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: Removing jbuilder (2.7.0)
remote: Removing method_source (0.9.0)
remote: Removing rack (2.0.5)
remote: Removing concurrent-ruby (1.0.5)
remote: Removing sass (3.6.0)
remote: The latest bundler is 2.0.0.pre.1, but you are currently running 1.15.2.
remote: To update, run `gem install bundler --pre`
remote: -----> Installing node-v8.10.0-linux-x64
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: Yarn executable was not detected in the system.
remote: Download Yarn at https://yarnpkg.com/en/docs/install
remote: I, [2018-11-10T02:53:43.116047 #407] INFO -- : Writing /tmp/build_6086175200f5550c5b9817387635ee22/public/assets/application-50b71e7b0b661292fd6fba40f84e1a84bfbb82bd7cccf29f36f75e6851fc30f1.js
remote: I, [2018-11-10T02:53:43.116490 #407] INFO -- : Writing /tmp/build_6086175200f5550c5b9817387635ee22/public/assets/application-50b71e7b0b661292fd6fba40f84e1a84bfbb82bd7cccf29f36f75e6851fc30f1.js.gz
remote: rake aborted!
remote: Sass::SyntaxError: Invalid CSS after "...top: 4px solid ": expected ";", was "\ ;"
remote: (sass):4014
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:1305:in `expected'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:1235:in `expected'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:1230:in `tok!'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:815:in `block in try_declaration'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:1281:in `rethrow'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:820:in `try_declaration'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:743:in `declaration_or_ruleset'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:708:in `block_child'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:700:in `block_contents'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:689:in `block'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:681:in `ruleset'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:707:in `block_child'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:700:in `block_contents'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:137:in `stylesheet'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/scss/parser.rb:41:in `parse'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/engine.rb:414:in `_to_tree'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sass-3.7.0/lib/sass/engine.rb:290:in `render'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/sass_compressor.rb:48:in `call'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/sass_compressor.rb:28:in `call'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:142:in `block in find'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `each'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `block in logical_paths'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `each'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `logical_paths'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:140:in `find'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in `compile'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in `with_logger'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
remote: /tmp/build_6086175200f5550c5b9817387635ee22/vendor/bundle/ruby/2.4.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
remote: Tasks: TOP => assets:precompile
remote: (See full trace by running task with --trace)
remote:
remote: !
remote: ! Precompiling assets failed.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to haunted-pumpkin-39985.
remote:
To https://git.heroku.com/haunted-pumpkin-39985.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/haunted-pumpkin-39985.git'
I notice the error "Yarn executable was not detected in system". I have searched everywhere and followed the instructions on installing yarn and the directions in this question : Rails precompile assets Yarn executable was not detected
Still didn't help. I am not sure if that is even the problem to why heroku won't update. I also notice the remark to run
gem install bundler --pre
Which I did and everything seemed to install fine in the terminal, but even after pushing I continue to get the same errors when trying to push to heroku. Any help is much appreciated, I have a feeling I am not seeing something here.
Edit: What got rid of this error for me was running
gem install sassc
I now have a totally different error, but that's for a different thread if I don't figure it out. Thanks for the help, everyone!
For this particular issue, my problem was with Sass. Running
gem install sassc
resolved this issue for me. I still cannot deploy to heroku to do Bundler issues, but there is no longer an issue about precompiling assets.

What do I do? Heroku blocked my push even after updating Sprockets

Does anyone have any inkling as to what I did wrong or what I should do? I tried pushing after updating Sprockets in my gemfile, but it didn't seem to do anything. Do I need to update sprockets-rails as well too? Even after updating the gemfile the console error didn't seem to change at all. This is the error I get, even after updating sprockets to the recommended version, I even tried to delete and re-bundle the gems.
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.4.1
remote: -----> Installing dependencies using bundler 1.15.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.2). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: Fetching gem metadata from https://rails-assets.org/..
remote: Fetching gem metadata from https://rubygems.org/.........
remote: Fetching version metadata from https://rails-assets.org/..
remote: Fetching version metadata from https://rubygems.org/..
remote: Fetching dependency metadata from https://rails-assets.org/..
remote: Fetching dependency metadata from https://rubygems.org/.
remote: Fetching gem metadata from https://rails-assets.org/..
remote: Fetching version metadata from https://rails-assets.org/.
remote: Using rake 12.3.1
remote: Using concurrent-ruby 1.0.5
remote: Using minitest 5.11.3
remote: Using thread_safe 0.3.6
remote: Using builder 3.2.3
remote: Using erubi 1.7.1
remote: Using mini_portile2 2.3.0
remote: Using crass 1.0.4
remote: Using rack 2.0.5
remote: Using nio4r 2.3.1
remote: Using websocket-extensions 0.1.3
remote: Using mini_mime 1.0.0
remote: Using arel 9.0.0
remote: Using mimemagic 0.3.2
remote: Using execjs 2.7.0
remote: Using msgpack 1.2.4
remote: Using rb-fsevent 0.10.3
remote: Using ffi 1.9.25
remote: Using bundler 1.15.2
remote: Using coffee-script-source 1.12.2
remote: Using method_source 0.9.0
remote: Using thor 0.20.0
remote: Using multi_json 1.13.1
remote: Using pg 0.20.0
remote: Using puma 3.11.4
remote: Using rails-assets-particles.js 2.0.0
remote: Using tilt 2.0.8
remote: Using turbolinks-source 5.1.0
remote: Using i18n 1.0.1
remote: Using tzinfo 1.2.5
remote: Using nokogiri 1.8.2
remote: Using rack-test 1.0.0
remote: Using sprockets 3.7.1
remote: Using websocket-driver 0.7.0
remote: Using mail 2.7.0
remote: Using marcel 0.3.2
remote: Using autoprefixer-rails 8.6.2
remote: Using uglifier 4.1.11
remote: Using bootsnap 1.3.0
remote: Using rb-inotify 0.9.10
remote: Using coffee-script 2.4.1
remote: Using turbolinks 5.1.1
remote: Using activesupport 5.2.0
remote: Using loofah 2.2.2
remote: Using rails-dom-testing 2.0.3
remote: Using globalid 0.4.1
remote: Using activemodel 5.2.0
remote: Using jbuilder 2.7.0
remote: Using sass-listen 4.0.0
remote: Using activerecord 5.2.0
remote: Using rails-html-sanitizer 1.0.4
remote: Using sass 3.5.6
remote: Using actionview 5.2.0
remote: Using activejob 5.2.0
remote: Using actionpack 5.2.0
remote: Using bootstrap-sass 3.3.7
remote: Using actioncable 5.2.0
remote: Using actionmailer 5.2.0
remote: Using activestorage 5.2.0
remote: Using railties 5.2.0
remote: Using sprockets-rails 3.2.1
remote: Using coffee-rails 4.2.2
remote: Using jquery-rails 4.3.1
remote: Using jquery-ui-rails 6.0.1
remote: Using rails 5.2.0
remote: Using rails-ujs 0.1.0
remote: Using sass-rails 5.0.7
remote: Bundle complete! 25 Gemfile dependencies, 67 gems now installed.
remote: Gems in the groups development and test were not installed.
remote: Bundled gems are installed into ./vendor/bundle.
remote: Bundle completed (5.93s)
remote: Cleaning up the bundler cache.
remote: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.2). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: The latest bundler is 1.16.2, but you are currently running 1.15.2.
remote: To update, run `gem install bundler`
remote: -----> Installing node-v8.10.0-linux-x64
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: Yarn executable was not detected in the system.
remote: Download Yarn at https://yarnpkg.com/en/docs/install
remote: I, [2018-07-01T05:03:06.512433 #474] INFO -- : Writing /tmp/build_8a91e4f1227e923975e3a79b263ebd6a/public/assets/homepage-6506ef98672650880a9829198532c3ca352e86c99fe090e6ab680341ebabb7a0.css
remote: I, [2018-07-01T05:03:06.512936 #474] INFO -- : Writing /tmp/build_8a91e4f1227e923975e3a79b263ebd6a/public/assets/homepage-6506ef98672650880a9829198532c3ca352e86c99fe090e6ab680341ebabb7a0.css.gz
remote: I, [2018-07-01T05:03:14.402376 #474] INFO -- : Writing /tmp/build_8a91e4f1227e923975e3a79b263ebd6a/public/assets/application-257151e69df1b673bb56ffceccaab1209f0d77eb0251792415b789094e1c1214.css
remote: I, [2018-07-01T05:03:14.403083 #474] INFO -- : Writing /tmp/build_8a91e4f1227e923975e3a79b263ebd6a/public/assets/application-257151e69df1b673bb56ffceccaab1209f0d77eb0251792415b789094e1c1214.css.gz
remote: Asset precompilation completed (10.25s)
remote: Cleaning assets
remote: Running: rake assets:clean
remote: -----> Detecting rails configuration
remote: !
remote: ! A security vulnerability has been detected in your application.
remote: ! To protect your application you must take action. Your application
remote: ! is currently exposing its credentials via an easy to exploit directory
remote: ! traversal.
remote: !
remote: ! To protect your application you must either upgrade to Sprockets version "3.7.2"
remote: ! or disable dynamic compilation at runtime by setting:
remote: !
remote: ! ```
remote: ! config.assets.compile = false # Disables security vulnerability
remote: ! ```
remote: !
remote: ! To read more about this security vulnerability please refer to this blog post:
remote: ! https://blog.heroku.com/rails-asset-pipeline-vulnerability
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...

Uglifier::Error: invalid regexp character Error on launching Rails app in heroku

I am trying to launch my rails app in heroku but i am getting some errors
this this the log
I can successfully launch this app in my windows machine with out any problem the problem arises only with Heroku
D:\Ruby\Assignment2>git push heroku master
Counting objects: 390, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (369/369), done.
Writing objects: 100% (390/390), 136.69 KiB | 748.00 KiB/s, done.
Total 390 (delta 174), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
remote: Detected buildpacks: Ruby,Node.js
remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.4.4
remote: ###### WARNING:
remote: Removing `Gemfile.lock` because it was generated on Windows.
remote: Bundler will do a full resolve so native gems are handled properly.
remote: This may result in unexpected gem versions being used in your app.
remote: In rare occasions Bundler may not be able to resolve your dependencies at all.
remote: https://devcenter.heroku.com/articles/bundler-windows-gemfile
remote:
remote: -----> Installing dependencies using bundler 1.15.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4
remote: Fetching https://github.com/codahale/bcrypt-ruby.git
remote: The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32,
java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
remote: Fetching gem metadata from https://rubygems.org/..........
remote: Fetching version metadata from https://rubygems.org/..
remote: Fetching dependency metadata from https://rubygems.org/.
remote: Resolving dependencies...
remote: Fetching rake 12.3.1
remote: Fetching concurrent-ruby 1.0.5
remote: Fetching minitest 5.11.3
remote: Installing minitest 5.11.3
remote: Installing rake 12.3.1
remote: Installing concurrent-ruby 1.0.5
remote: Fetching thread_safe 0.3.6
remote: Installing thread_safe 0.3.6
remote: Fetching builder 3.2.3
remote: Installing builder 3.2.3
remote: Fetching erubi 1.7.1
remote: Installing erubi 1.7.1
remote: Fetching mini_portile2 2.3.0
remote: Fetching crass 1.0.4
remote: Installing mini_portile2 2.3.0
remote: Fetching rack 2.0.5
remote: Installing crass 1.0.4
remote: Fetching nio4r 2.3.1
remote: Installing rack 2.0.5
remote: Installing nio4r 2.3.1 with native extensions
remote: Fetching websocket-extensions 0.1.3
remote: Installing websocket-extensions 0.1.3
remote: Fetching mini_mime 1.0.0
remote: Installing mini_mime 1.0.0
remote: Fetching arel 9.0.0
remote: Installing arel 9.0.0
remote: Fetching mimemagic 0.3.2
remote: Using bcrypt 3.1.11 from https://github.com/codahale/bcrypt-ruby.git (at master#5c2d2d3)
remote: Installing mimemagic 0.3.2
remote: Fetching msgpack 1.2.4
remote: Installing msgpack 1.2.4 with native extensions
remote: Using bundler 1.15.2
remote: Fetching coffee-script-source 1.12.2
remote: Installing coffee-script-source 1.12.2
remote: Fetching execjs 2.7.0
remote: Installing execjs 2.7.0
remote: Fetching method_source 0.9.0
remote: Installing method_source 0.9.0
remote: Fetching thor 0.20.0
remote: Installing thor 0.20.0
remote: Fetching duktape 1.6.1.0
remote: Installing duktape 1.6.1.0 with native extensions
remote: Fetching ffi 1.9.23
remote: Installing ffi 1.9.23 with native extensions
remote: Fetching multi_json 1.13.1
remote: Installing multi_json 1.13.1
remote: Fetching pg 1.0.0
remote: Installing pg 1.0.0 with native extensions
remote: Fetching puma 3.11.4
remote: Installing puma 3.11.4 with native extensions
remote: Fetching rb-fsevent 0.10.3
remote: Installing rb-fsevent 0.10.3
remote: Fetching tilt 2.0.8
remote: Installing tilt 2.0.8
remote: Fetching turbolinks-source 5.1.0
remote: Installing turbolinks-source 5.1.0
remote: Fetching tzinfo 1.2.5
remote: Installing tzinfo 1.2.5
remote: Fetching i18n 1.0.1
remote: Installing i18n 1.0.1
remote: Fetching nokogiri 1.8.2
remote: Installing nokogiri 1.8.2 with native extensions
remote: Fetching websocket-driver 0.7.0
remote: Installing websocket-driver 0.7.0 with native extensions
remote: Fetching mail 2.7.0
remote: Installing mail 2.7.0
remote: Fetching rack-test 1.0.0
remote: Installing rack-test 1.0.0
remote: Fetching sprockets 3.7.1
remote: Installing sprockets 3.7.1
remote: Fetching marcel 0.3.2
remote: Installing marcel 0.3.2
remote: Fetching coffee-script 2.4.1
remote: Installing coffee-script 2.4.1
remote: Fetching uglifier 4.1.10
remote: Installing uglifier 4.1.10
remote: Fetching bootsnap 1.3.0
remote: Installing bootsnap 1.3.0 with native extensions
remote: Fetching rb-inotify 0.9.10
remote: Installing rb-inotify 0.9.10
remote: Fetching turbolinks 5.1.1
remote: Installing turbolinks 5.1.1
remote: Fetching activesupport 5.2.0
remote: Installing activesupport 5.2.0
remote: Fetching loofah 2.2.2
remote: Installing loofah 2.2.2
remote: Fetching sass-listen 4.0.0
remote: Fetching rails-dom-testing 2.0.3
remote: Installing rails-dom-testing 2.0.3
remote: Installing sass-listen 4.0.0
remote: Fetching globalid 0.4.1
remote: Installing globalid 0.4.1
remote: Fetching activemodel 5.2.0
remote: Fetching jbuilder 2.7.0
remote: Installing activemodel 5.2.0
remote: Installing jbuilder 2.7.0
remote: Fetching rails-html-sanitizer 1.0.4
remote: Installing rails-html-sanitizer 1.0.4
remote: Fetching sass 3.5.6
remote: Fetching activejob 5.2.0
remote: Installing activejob 5.2.0
remote: Fetching activerecord 5.2.0
remote: Installing sass 3.5.6
remote: Fetching actionview 5.2.0
remote: Installing activerecord 5.2.0
remote: Installing actionview 5.2.0
remote: Fetching actionpack 5.2.0
remote: Installing actionpack 5.2.0
remote: Fetching actioncable 5.2.0
remote: Fetching actionmailer 5.2.0
remote: Fetching activestorage 5.2.0
remote: Installing actionmailer 5.2.0
remote: Installing activestorage 5.2.0
remote: Installing actioncable 5.2.0
remote: Fetching railties 5.2.0
remote: Fetching sprockets-rails 3.2.1
remote: Installing railties 5.2.0
remote: Installing sprockets-rails 3.2.1
remote: Fetching jquery-rails 4.3.3
remote: Fetching rails 5.2.0
remote: Fetching coffee-rails 4.2.2
remote: Installing rails 5.2.0
remote: Installing coffee-rails 4.2.2
remote: Fetching sass-rails 5.0.7
remote: Installing sass-rails 5.0.7
remote: Installing jquery-rails 4.3.3
remote: Bundle complete! 20 Gemfile dependencies, 64 gems now installed.
remote: Gems in the groups development and test were not installed.
remote: Bundled gems are installed into ./vendor/bundle.
remote: Bundle completed (46.58s)
remote: Cleaning up the bundler cache.
remote: The latest bundler is 1.16.1, but you are currently running 1.15.2.
remote: To update, run `gem install bundler`
remote: -----> Installing node-v8.10.0-linux-x64
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: Yarn executable was not detected in the system.
remote: Download Yarn at https://yarnpkg.com/en/docs/install
remote: I, [2018-05-14T09:58:09.678891 #1526] INFO -- : Writing /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/public/assets/bootstrap/bootstrap.min-41d69a549b928e8604da63024bd4c6fdc296140a12d98fc0598ebf25417ec
dc7.js
remote: I, [2018-05-14T09:58:09.679477 #1526] INFO -- : Writing /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/public/assets/bootstrap/bootstrap.min-41d69a549b928e8604da63024bd4c6fdc296140a12d98fc0598ebf25417ec
dc7.js.gz
remote: I, [2018-05-14T09:58:14.425693 #1526] INFO -- : Writing /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/public/assets/bootstrap/popper.min-a825c07c7e993c902b4523b21ac31ee3818600cc5c82538e61f5401fd516b8a0
.js
remote: I, [2018-05-14T09:58:14.425883 #1526] INFO -- : Writing /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/public/assets/bootstrap/popper.min-a825c07c7e993c902b4523b21ac31ee3818600cc5c82538e61f5401fd516b8a0
.js.gz
remote: I, [2018-05-14T09:59:23.617617 #1526] INFO -- : Writing /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/public/assets/bootstrap/mdb.min-628e2e9674c6df4e4bcd41fa2b7b88aa070a227955b83bb6da8fc8118fb4e9e5.js
remote: I, [2018-05-14T09:59:23.617808 #1526] INFO -- : Writing /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/public/assets/bootstrap/mdb.min-628e2e9674c6df4e4bcd41fa2b7b88aa070a227955b83bb6da8fc8118fb4e9e5.js
.gz
remote: rake aborted!
remote: Uglifier::Error: invalid regexp character
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/uglifier-4.1.10/lib/uglifier.rb:234:in `parse_result'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/uglifier-4.1.10/lib/uglifier.rb:216:in `run_uglifyjs'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/uglifier-4.1.10/lib/uglifier.rb:168:in `compile'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/uglifier_compressor.rb:53:in `call'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/uglifier_compressor.rb:28:in `call'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:in `call_processor'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `reverse_each'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `call_processors'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:134:in `load_from_unloaded'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:60:in `block in load'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:44:in `load'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:20:in `block in initialize'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:in `load'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:66:in `find_asset'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:73:in `find_all_linked_assets'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:142:in `block in find'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `each'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `stat_directory'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:227:in `stat_tree'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:105:in `each'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:105:in `block in logical_paths'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:104:in `each'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:104:in `logical_paths'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:140:in `find'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:185:in `compile'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/rake/sprocketstask.rb:147:in `with_logger'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
remote: /tmp/build_c6b86f16f166c2e8a833fb45a48cab86/vendor/bundle/ruby/2.4.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
remote: Tasks: TOP => assets:precompile
remote: (See full trace by running task with --trace)
remote: !
remote: ! Precompiling assets failed.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to fathomless-falls-15474.
remote:
To https://git.heroku.com/fathomless-falls-15474.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/fathomless-falls-15474.git'
When i run rake assets:precompile in my machine i am getting no errors but when i try to push it and run it to heroku it throws me some errors how to resolve it
This is my repo https://nijeeshjoshy#bitbucket.org/nijeeshjoshy/assignment2.git
Apparently what happens to you is that you have a js file with a spelling error, when uglifier tries to compress the files it breaks, look at this answer I think it would serve you
Rails 3.1 Possible Bug in Asset Pipeline and Uglifier

NameError: uninitialized constant Sprockets::Rails::VERSION on pushing to heroku

I have an app which runs on local machine.
Rails 4.2.0
Ruby 2.2.3
I am getting the following error on pushing to heroku. The app runs on local machine.
rake aborts with the error NameError: uninitialized constant Sprockets::Rails::VERSION
Counting objects: 1965, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (608/608), done.
Writing objects: 100% (1965/1965), 229.38 KiB | 0 bytes/s, done.
Total 1965 (delta 1275), reused 1958 (delta 1272)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.3
remote: ###### WARNING:
remote: Removing `Gemfile.lock` because it was generated on Windows.
remote: Bundler will do a full resolve so native gems are handled properly.
remote: This may result in unexpected gem versions being used in your app.
remote: In rare occasions Bundler may not be able to resolve your dependencies at all.
remote: https://devcenter.heroku.com/articles/bundler-windows-gemfile
remote:
remote: -----> Installing dependencies using bundler 1.11.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4
remote: Fetching git://github.com/derekprior/momentjs-rails.git
remote: Fetching git://github.com/zpaulovics/datetimepicker-rails.git
remote: Cloning into 'bootstrap-datetimepicker'...
remote: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Resolving dependencies..........................................
remote: Installing json 1.8.3 with native extensions
remote: Installing rake 11.1.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 rack 1.6.4
remote: Installing mime-types 2.99.1
remote: Installing arel 6.0.3
remote: Installing execjs 2.6.0
remote: Installing bcrypt 3.1.11 with native extensions
remote: Installing bootstrap_form 2.3.0
remote: Installing sass 3.4.22
remote: Using bundler 1.11.2
remote: Installing thor 0.19.1
remote: Installing hike 1.2.3
remote: Installing multi_json 1.11.3
remote: Installing tilt 1.4.1
remote: Installing coffee-script-source 1.10.0
remote: Installing daemons 1.2.3
remote: Installing orm_adapter 0.5.0
remote: Installing eventmachine 1.0.9.1 with native extensions
remote: Installing unf_ext 0.0.7.2 with native extensions
remote: Installing fabrication 2.15.0
remote: Installing google_visualr 2.5.1
remote: Installing sexp_processor 4.7.0
remote: Installing hashie 3.4.3
remote: Installing json_pure 1.8.3
remote: Installing libv8 3.16.14.13
remote: Installing nested_form 0.3.2
remote: Installing netrc 0.11.0
remote: Installing pg 0.18.4 with native extensions
remote: Installing phony 2.15.21
remote: Installing rails_serve_static_assets 0.0.5
remote: Installing rails_stdout_logging 0.0.5
remote: Installing remotipart 1.2.1
remote: Installing safe_yaml 1.0.4
remote: Installing ref 2.0.0
remote: Installing faker 1.6.3
remote: Installing validates_email_format_of 1.6.3
remote: Installing tzinfo 1.2.2
remote: Installing nokogiri 1.6.7.2 with native extensions
remote: Installing rack-test 0.6.3
remote: Installing rack-protection 1.5.3
remote: Installing warden 1.2.6
remote: Installing mail 2.6.4
remote: Installing rdoc 4.2.2
remote: Installing autoprefixer-rails 6.3.6
remote: Installing uglifier 3.0.0
remote: Installing figaro 1.1.1
remote: Installing sprockets 2.12.4
remote: Installing haml 4.0.7
remote: Installing coffee-script 2.4.1
remote: Installing ruby_parser 3.8.1
remote: Installing unf 0.1.4
remote: Installing tropo-webapi-ruby 0.1.13
remote: Installing therubyracer 0.12.2 with native extensions
remote: Installing rails_12factor 0.0.3
remote: Installing activesupport 4.2.0
remote: Installing sinatra 1.4.7
remote: Installing sdoc 0.4.1
remote: Installing bootstrap-sass 3.3.6
remote: Installing domain_name 0.5.20160310
remote: Installing rails-deprecated_sanitizer 1.0.3
remote: Installing globalid 0.3.6
remote: Installing activemodel 4.2.0
remote: Installing clockwork 2.0.0
remote: Installing delayed_job 4.1.1
remote: Installing jbuilder 1.5.3
remote: Installing phony_rails 0.14.0
remote: Installing http-cookie 1.0.2
remote: Installing rails-dom-testing 1.0.7
remote: Installing loofah 2.0.3
remote: Installing html2haml 2.0.0
remote: Installing rack-pjax 0.8.0
remote: Installing activejob 4.2.0
remote: Installing activerecord 4.2.0
remote: Installing rest-client 1.8.0
remote: Installing rails-html-sanitizer 1.0.3
remote: Installing delayed_job_active_record 4.1.0
remote: Installing delayed_job_web 1.2.10
remote: Installing has_secure_token 1.0.0
remote: Installing actionview 4.2.0
remote: Installing actionpack 4.2.0
remote: Installing railties 4.2.0
remote: Installing actionmailer 4.2.0
remote: Installing sprockets-rails 2.0.1
remote: Installing kaminari 0.16.3
remote: Installing simple_form 3.1.1
remote: Installing jquery-rails 4.1.1
remote: Using momentjs-rails 2.11.1 from git://github.com/derekprior/momentjs-rails.git (at master#41e30d4)
remote: Installing coffee-rails 4.0.1
remote: Installing responders 2.1.2
remote: Installing font-awesome-rails 4.6.1.0
remote: Installing jquery-ui-rails 5.0.5
remote: Installing haml-rails 0.9.0
remote: Installing rails 4.2.0
remote: Installing turbolinks 2.5.3
remote: Using datetimepicker-rails 4.7.16 from git://github.com/zpaulovics/datetimepicker-rails.git (at master#36d21ce)
remote: Installing sass-rails 4.0.1
remote: Installing devise 4.0.1
remote: Installing browser-timezone-rails 0.0.8
remote: Installing fullcalendar-rails 2.6.1.0
remote: Installing dateslices 0.0.4
remote: Installing jquery-turbolinks 2.1.0
remote: Installing jquery-datatables-rails 3.3.0
remote: Installing rails_admin 0.8.1
remote: Bundle complete! 52 Gemfile dependencies, 109 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 rdoc:
remote: Depending on your version of ruby, you may need to install ruby rdoc/ri data:
remote: <= 1.8.6 : unsupported
remote: = 1.8.7 : gem install rdoc-data; rdoc-data --install
remote: = 1.9.1 : gem install rdoc-data; rdoc-data --install
remote: >= 1.9.2 : nothing to do! Yay!
remote: Post-install message from haml:
remote: HEADS UP! Haml 4.0 has many improvements, but also has changes that may break
remote: your application:
remote: * Support for Ruby 1.8.6 dropped
remote: * Support for Rails 2 dropped
remote: * Sass filter now always outputs <style> tags
remote: * Data attributes are now hyphenated, not underscored
remote: * html2haml utility moved to the html2haml gem
remote: * Textile and Maruku filters moved to the haml-contrib gem
remote: For more info see:
remote: http://rubydoc.info/github/haml/haml/file/CHANGELOG.md
remote: Post-install message from phony_rails:
remote: It now adds a '+' to the normalized number when it starts with a country number!
remote: Bundle completed (61.53s)
remote: Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: rake aborted!
remote: NameError: uninitialized constant Sprockets::Rails::VERSION
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/bootstrap-sass-3.3.6/lib/bootstrap-sass/engine.rb:11:in `block in <class:Engine>'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/railtie.rb:194:in `public_send'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/railtie.rb:194:in `method_missing'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/config/environment.rb:5:in `<top (required)>'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application.rb:328:in `require_environment!'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application.rb:443:in `block in run_tasks_blocks'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:54: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 fathom-reef-94288.
remote:
To https://git.heroku.com/fathomless-reef-94288.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/fathom-reef-94288.git'
I get the following error on performing rake assets:precompile on my local machine. This is the same error I get on heroku push.
rake assets:precompile
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
rake aborted!
NameError: uninitialized constant Sprockets::Rails::VERSION
/Users/azs/ror/maintr/config/environment.rb:5:in `<top (required)>'
Tasks: TOP => environment
(See full trace by running task with --trace)
It looks like you have an old version of sprockets-rails gem being installed. With Rails 4.2 you should be getting version 3 or later. But, in your case the bundler is installing version 2.0.1. Some version of the gem had this exact problem.
I guess the easiest way would be to generate a Gemfile.lock file on linux machine and force Heroku to use new version of the sprockets-rails gem.

Resources