0

I'm trying to push my code to Heroku, but it's not precompiling. I'm fairly new to all of this, so it may be something simple. Tried bundle install, tried config.assets.initialize_on_precompile = false. I've tried most answers I've found, and they haven't worked or they just don't relate to my situation.

My log is;

Counting objects: 284, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (270/270), done.
Writing objects: 100% (284/284), 36.97 KiB | 1.03 MiB/s, done.
Total 284 (delta 173), 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.3.0
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.3). 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.2
remote:        Using concurrent-ruby 1.1.4
remote:        Using minitest 5.11.3
remote:        Using thread_safe 0.3.6
remote:        Using builder 3.2.3
remote:        Using erubis 2.7.0
remote:        Using mini_portile2 2.4.0
remote:        Using crass 1.0.4
remote:        Using rack 2.0.6
remote:        Using nio4r 1.2.1
remote:        Using websocket-extensions 0.1.3
remote:        Using mini_mime 1.0.1
remote:        Using arel 7.1.4
remote:        Using execjs 2.7.0
remote:        Fetching bcrypt 3.1.12
remote:        Using rb-fsevent 0.10.3
remote:        Using ffi 1.10.0
remote:        Using bundler 1.15.2
remote:        Using coffee-script-source 1.12.2
remote:        Using method_source 0.9.2
remote:        Using thor 0.20.3
remote:        Fetching orm_adapter 0.5.0
remote:        Fetching unf_ext 0.0.7.5
remote:        Installing orm_adapter 0.5.0
remote:        Installing bcrypt 3.1.12 with native extensions
remote:        Using hirb 0.7.3
remote:        Using multi_json 1.13.1
remote:        Fetching mime-types-data 3.2018.0812
remote:        Installing unf_ext 0.0.7.5 with native extensions
remote:        Installing mime-types-data 3.2018.0812
remote:        Fetching netrc 0.11.0
remote:        Installing netrc 0.11.0
remote:        Using pg 0.18.4
remote:        Using puma 3.4.0
remote:        Using tilt 2.0.9
remote:        Using turbolinks-source 5.2.0
remote:        Using i18n 0.9.5
remote:        Using nokogiri 1.10.1
remote:        Using tzinfo 1.2.5
remote:        Using websocket-driver 0.6.5
remote:        Using mail 2.7.1
remote:        Using rack-test 0.6.3
remote:        Fetching warden 1.2.8
remote:        Installing warden 1.2.8
remote:        Using sprockets 3.7.2
remote:        Using autoprefixer-rails 9.4.9
remote:        Using uglifier 3.0.0
remote:        Using rb-inotify 0.10.0
remote:        Using coffee-script 2.4.1
remote:        Fetching figaro 1.1.1
remote:        Installing figaro 1.1.1
remote:        Fetching mime-types 3.2.2
remote:        Installing mime-types 3.2.2
remote:        Using turbolinks 5.0.0
remote:        Using loofah 2.2.3
remote:        Using activesupport 5.0.0
remote:        Using sass-listen 4.0.0
remote:        Using rails-html-sanitizer 1.0.4
remote:        Using rails-dom-testing 2.0.3
remote:        Using globalid 0.4.2
remote:        Using activemodel 5.0.0
remote:        Using jbuilder 2.5.0
remote:        Using sass 3.7.3
remote:        Using actionview 5.0.0
remote:        Using activejob 5.0.0
remote:        Using activerecord 5.0.0
remote:        Using bootstrap-sass 3.3.7
remote:        Using font-awesome-sass 4.6.2
remote:        Using actionpack 5.0.0
remote:        Using actioncable 5.0.0
remote:        Using actionmailer 5.0.0
remote:        Using railties 5.0.0
remote:        Using sprockets-rails 3.2.1
remote:        Using coffee-rails 4.2.1
remote:        Fetching responders 2.4.1
remote:        Installing responders 2.4.1
remote:        Using jquery-rails 4.1.1
remote:        Using rails 5.0.0
remote:        Using sass-rails 5.0.6
remote:        Fetching devise 4.2.0
remote:        Installing devise 4.2.0
remote:        Fetching unf 0.1.4
remote:        Installing unf 0.1.4
remote:        Fetching domain_name 0.5.20180417
remote:        Installing domain_name 0.5.20180417
remote:        Fetching http-cookie 1.0.3
remote:        Installing http-cookie 1.0.3
remote:        Fetching rest-client 2.0.2
remote:        Installing rest-client 2.0.2
remote:        Fetching stripe 1.48.0
remote:        Installing stripe 1.48.0
remote:        Bundle complete! 22 Gemfile dependencies, 76 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 (7.98s)
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.3). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote:        The latest bundler is 2.0.1, but you are currently running 1.15.2.
remote:        To update, run `gem install bundler`
remote: -----> Installing node-v10.14.1-linux-x64
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        rake aborted!
remote:        ExecJS::ProgramError: Unexpected token: punc ()) (line: 14622, col: 3, pos: 443880
remote:        
remote:        Error
remote:            at new JS_Parse_Error (/tmp/execjs20190403-459-1fbs9c0js:3572:11870)
remote:            at js_error (/tmp/execjs20190403-459-1fbs9c0js:3572:12089)
remote:            at croak (/tmp/execjs20190403-459-1fbs9c0js:3572:20898)
remote:            at token_error (/tmp/execjs20190403-459-1fbs9c0js:3572:21035)
remote:            at unexpected (/tmp/execjs20190403-459-1fbs9c0js:3572:21123)
remote:            at /tmp/execjs20190403-459-1fbs9c0js:3572:22674
remote:            at /tmp/execjs20190403-459-1fbs9c0js:3572:21788
remote:            at block_ (/tmp/execjs20190403-459-1fbs9c0js:3572:26497)
remote:            at /tmp/execjs20190403-459-1fbs9c0js:3572:22557
remote:            at /tmp/execjs20190403-459-1fbs9c0js:3572:21788
remote:        new JS_Parse_Error ((execjs):3572:11870)
remote:        js_error ((execjs):3572:12089)
remote:        croak ((execjs):3572:20898)
remote:        token_error ((execjs):3572:21035)
remote:        unexpected ((execjs):3572:21123)
remote:        (execjs):3572:22674
remote:        (execjs):3572:21788
remote:        block_ ((execjs):3572:26497)
remote:        (execjs):3572:22557
remote:        (execjs):3572:21788
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:39:in `exec'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:21:in `eval'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:46:in `call'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/uglifier-3.0.0/lib/uglifier.rb:176:in `run_uglifyjs'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/uglifier-3.0.0/lib/uglifier.rb:139:in `compile'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/uglifier_compressor.rb:53:in `call'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/uglifier_compressor.rb:28:in `call'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:142:in `block in find'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `each'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `block in logical_paths'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `each'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `logical_paths'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:140:in `find'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in `compile'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in `with_logger'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
remote:        /tmp/build_90085426fc6bc34b3c3d145873dbf092/vendor/bundle/ruby/2.3.0/gems/rake-12.3.2/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...

A lot of people have been saying it's related to the gemfile, so my gemfile is;

source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '5.0.0'
# Use Puma as the app server
gem 'puma', '3.4.0'
# Use SCSS for stylesheets
gem 'sass-rails', '5.0.6'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '3.0.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '4.2.1'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails', '4.1.1'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '5.0.0'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '2.5.0'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '3.1.7'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Use Twitter Bootstrap Library for front-end UI and Layout
gem 'bootstrap-sass', '3.3.7'

# Use Font Awesome sass gem for adding icons
 gem 'font-awesome-sass', '4.6.2'

# Use Hirb for better database table display in console
gem 'hirb', '0.7.3'

# Use devise for user authentication
gem 'devise', '4.2.0'

# Use Stripe for payment processing
gem 'stripe', '1.48.0'

# Use Figaro for ENV variables
gem 'figaro', '1.1.1'

group :development, :test do
  # Use sqlite3 as the database for Active Record
  gem 'sqlite3', '1.3.13'
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platform: :mri
end

group :development do
  # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
  gem 'web-console'
  gem 'listen', '3.0.5'
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
  gem 'spring-watcher-listen', '2.0.0'
end

group :production do
  # Use the PostgreSQL gem for Heroku product production servers
  gem 'pg', '0.18.4'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
ruby '2.3.0'
````

Would appreciate any help given!
B.C
  • 31
  • 6
  • There might be something wrong with your assets. Have you tried this solution? https://stackoverflow.com/a/38605526/11303225 – JohnStep Apr 03 '19 at 04:14
  • @JohnStep Not yet. Now my rails console isn't opening. Going to have to fault find that first now! – B.C Apr 03 '19 at 09:07
  • @JohnStep just tried that. There was an error in my end tags, but fixed that, and the error is still persisting. Ran the assets code again, and it said my asset files were fine. – B.C Apr 03 '19 at 09:29

0 Answers0