When commiting to heroku in my first rails app precompiling assets failure


#1

Hi there, so Im getting this error when i push to heroku

Counting objects: 118, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (103/103), done.
Writing objects: 100% (118/118), 27.10 KiB | 693.00 KiB/s, done.
Total 118 (delta 7), 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.5.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.6). 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:        Fetching rake 12.3.1
remote:        Fetching concurrent-ruby 1.0.5
remote:        Fetching minitest 5.11.3
remote:        Installing rake 12.3.1
remote:        Installing minitest 5.11.3
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:        Fetching mini_portile2 2.3.0
remote:        Installing erubi 1.7.1
remote:        Installing mini_portile2 2.3.0
remote:        Fetching crass 1.0.4
remote:        Fetching rack 2.0.5
remote:        Installing crass 1.0.4
remote:        Installing rack 2.0.5
remote:        Fetching nio4r 2.3.1
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.1
remote:        Installing mini_mime 1.0.1
remote:        Fetching arel 9.0.0
remote:        Installing arel 9.0.0
remote:        Fetching mimemagic 0.3.2
remote:        Fetching msgpack 1.2.4
remote:        Installing msgpack 1.2.4 with native extensions
remote:        Installing mimemagic 0.3.2
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 ffi 1.9.25
remote:        Installing ffi 1.9.25 with native extensions
remote:        Fetching multi_json 1.13.1
remote:        Installing multi_json 1.13.1
remote:        Fetching pg 1.1.3
remote:        Installing pg 1.1.3 with native extensions
remote:        Fetching puma 3.12.0
remote:        Installing puma 3.12.0 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.2.0
remote:        Installing turbolinks-source 5.2.0
remote:        Fetching tzinfo 1.2.5
remote:        Installing tzinfo 1.2.5
remote:        Fetching i18n 1.1.0
remote:        Installing i18n 1.1.0
remote:        Fetching nokogiri 1.8.5
remote:        Installing nokogiri 1.8.5 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.1.0
remote:        Installing rack-test 1.1.0
remote:        Fetching sprockets 3.7.2
remote:        Installing sprockets 3.7.2
remote:        Fetching marcel 0.3.3
remote:        Installing marcel 0.3.3
remote:        Fetching coffee-script 2.4.1
remote:        Installing coffee-script 2.4.1
remote:        Fetching uglifier 4.1.19
remote:        Installing uglifier 4.1.19
remote:        Fetching bootsnap 1.3.2
remote:        Installing bootsnap 1.3.2 with native extensions
remote:        Fetching rb-inotify 0.9.10
remote:        Installing rb-inotify 0.9.10
remote:        Fetching turbolinks 5.2.0
remote:        Installing turbolinks 5.2.0
remote:        Fetching activesupport 5.2.1
remote:        Installing activesupport 5.2.1
remote:        Fetching loofah 2.2.2
remote:        Installing loofah 2.2.2
remote:        Fetching sass-listen 4.0.0
remote:        Installing sass-listen 4.0.0
remote:        Fetching rails-dom-testing 2.0.3
remote:        Installing rails-dom-testing 2.0.3
remote:        Fetching globalid 0.4.1
remote:        Fetching activemodel 5.2.1
remote:        Installing globalid 0.4.1
remote:        Installing activemodel 5.2.1
remote:        Fetching jbuilder 2.7.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.6.0
remote:        Fetching activejob 5.2.1
remote:        Installing activejob 5.2.1
remote:        Installing sass 3.6.0
remote:        Fetching activerecord 5.2.1
remote:        Installing activerecord 5.2.1
remote:        Fetching actionview 5.2.1
remote:        Installing actionview 5.2.1
remote:        Fetching actionpack 5.2.1
remote:        Installing actionpack 5.2.1
remote:        Fetching actioncable 5.2.1
remote:        Fetching actionmailer 5.2.1
remote:        Fetching activestorage 5.2.1
remote:        Installing actionmailer 5.2.1
remote:        Installing actioncable 5.2.1
remote:        Installing activestorage 5.2.1
remote:        Fetching railties 5.2.1
remote:        Installing railties 5.2.1
remote:        Fetching sprockets-rails 3.2.1
remote:        Installing sprockets-rails 3.2.1
remote:        Fetching rails 5.2.1
remote:        Fetching coffee-rails 4.2.2
remote:        Fetching sass-rails 5.0.7
remote:        Installing rails 5.2.1
remote:        Installing sass-rails 5.0.7
remote:        Installing coffee-rails 4.2.2
remote:        Bundle complete! 19 Gemfile dependencies, 61 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 (45.87s)
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.6). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote:        The latest bundler is 1.17.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:        rake aborted!
remote:        NoMethodError: undefined method `routes' for #<ActionDispatch::Routing::Mapper:0x0000562aaa7f3318>
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/config/routes.rb:2:in `block in <main>'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:432:in `instance_exec'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:432:in `eval_block'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:414:in `draw'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/config/routes.rb:1:in `<main>'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:281:in `block in load'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:281:in `load'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application/routes_reloader.rb:41:in `block in load_paths'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application/routes_reloader.rb:41:in `each'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application/routes_reloader.rb:41:in `load_paths'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application/routes_reloader.rb:20:in `reload!'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application/routes_reloader.rb:30:in `block in updater'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/file_update_checker.rb:83:in `execute'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application/routes_reloader.rb:10:in `execute'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application/finisher.rb:130:in `block in <module:Finisher>'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:32:in `instance_exec'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:32:in `run'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:60:in `run_initializers'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application.rb:361:in `initialize!'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/config/environment.rb:5:in `<main>'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application.rb:337:in `require_environment!'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application.rb:520:in `block in run_tasks_blocks'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
remote:        /tmp/build_730930d047e44104610d0b723bed9c53/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
remote:        Tasks: TOP => environment
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 murmuring-sea-53275.
remote: 
To https://git.heroku.com/murmuring-sea-53275.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/murmuring-sea-53275.git'


#2

Looks like an issue in your routes.rb file. Can you post the contents of that here. Its in the config directory.


#3

Did anyone solve this problem?


#4

The issue was with the route.rb file in the config directory but they never came back to let us know if they fixed it @Anthony_Francis


#5

Hi yes it was fixed