mwlang / gentelella-rails

Injects the gentelella theme and javascript files into Rails assets pipeline
MIT License
155 stars 50 forks source link

Error on assets precompile after upgrading from 0.1.5 to 0.1.6 #10

Closed sakozz closed 7 years ago

sakozz commented 7 years ago

Assets precompile fails after i updated the gem from 0.1.5 to 0.1.6 i.e: RAILS_ENV=production bundle exec rake assets:precompile

rake aborted!
ExecJS::RuntimeError: SyntaxError: Unexpected token: punc ({)
JS_Parse_Error.get ((execjs):3538:621)
(execjs):4060:47
(execjs):1:102
Object.<anonymous> ((execjs):1:120)
Module._compile (module.js:570:32)
Object.Module._extensions..js (module.js:579:10)
Module.load (module.js:487:32)
tryModuleLoad (module.js:446:12)
Function.Module._load (module.js:438:3)
Module.runMain (module.js:604:10)
mwlang commented 7 years ago

@sunil-shrestha may I see your Gemfile and output of bundle list?

sakozz commented 7 years ago

@mwlang , Sure here are Gemfile and bundle list

Gemfile


source 'https://rubygems.org'

git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
  "https://github.com/#{repo_name}.git"
end

gem 'rails', '~> 5.1.1'
gem 'pg'
gem 'puma', '~> 3.7'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'turbolinks', '~> 5'
gem 'coffee-script'
gem 'casein', '~>5.3.0'
gem 'gentelella-rails', '0.1.6'
gem "cocoon" 
gem 'simple_form' 
gem 'dalli' 

group :development, :test do
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
  gem 'capybara', '~> 2.13'
  gem 'selenium-webdriver'
  gem 'rspec'
  gem 'rspec-rails'
  gem "factory_girl_rails", "~> 4.0"
  gem 'rspec_api_documentation'
  gem 'shoulda'
  gem 'shoulda-matchers', git: 'https://github.com/thoughtbot/shoulda-matchers.git', branch: 'rails-5'
  gem 'json_spec'
  gem 'database_cleaner'
  gem 'ffaker'
end

group :test do
  gem 'sqlite3'
end

group :development do
  gem 'web-console', '>= 3.3.0'
  gem 'listen', '>= 3.0.5', '< 3.2'
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
  gem "awesome_print"  
end

gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gem 'capistrano', '~> 3.5'
gem 'capistrano-rails'
gem 'capistrano-bundler'
gem 'capistrano-passenger'
gem 'figaro'

gem 'rbnacl', '< 5.0'
gem 'rbnacl-libsodium'
gem 'bcrypt_pbkdf', '>= 1.0'

Bundle list

Using rake 12.0.0
Using concurrent-ruby 1.0.5
Using i18n 0.8.6
Using minitest 5.10.3
Using thread_safe 0.3.6
Using builder 3.2.3
Using erubi 1.6.1
Using mini_portile2 2.2.0
Using rack 2.0.3
Using nio4r 2.1.0
Using websocket-extensions 0.1.2
Using mime-types-data 3.2016.0521
Using arel 8.0.0
Using public_suffix 2.0.5
Using net-ssh 4.1.0
Using request_store 1.3.2
Using ffi 1.9.18
Using execjs 2.7.0
Using awesome_print 1.7.0
Using bcrypt_pbkdf 1.0.0
Using bindex 0.5.0
Using method_source 0.8.2
Using thor 0.19.4
Using rb-fsevent 0.9.8
Using byebug 9.0.6
Using tilt 2.0.8
Using will_paginate 3.1.6
Using cocoon 1.2.10
Using coffee-script-source 1.12.2
Using dalli 2.7.6
Using database_cleaner 1.6.1
Using diff-lcs 1.3
Using fastclick-rails 1.0.1
Using ffaker 2.6.0
Using bundler 1.14.6
Using nprogress-rails 0.2.0.2
Using multi_json 1.12.1
Using rspec-support 3.5.0
Using ruby_dep 1.5.0
Using mustache 1.0.5
Using pg 0.21.0
Using puma 3.9.1
Using rubyzip 1.2.1
Using shoulda 2.11.3
Using sqlite3 1.3.13
Using turbolinks-source 5.0.3
Using tzinfo 1.2.3
Using nokogiri 1.8.0
Using rack-test 0.6.3
Using sprockets 3.7.1
Using websocket-driver 0.6.5
Using mime-types 3.1
Using addressable 2.5.1
Using net-scp 1.2.1
Using ffi-compiler 1.0.1
Using rb-inotify 0.9.10
Using childprocess 0.7.1
Using rbnacl 4.0.2
Using autoprefixer-rails 7.1.2.3
Using uglifier 3.2.0
Using figaro 1.1.1
Using select2-rails 4.0.3
Using coffee-script 2.4.1
Using rspec-core 3.5.4
Using rspec-expectations 3.5.0
Using rspec-mocks 3.5.0
Using turbolinks 5.0.1
Using activesupport 5.1.2
Using loofah 2.0.3
Using xpath 2.1.0
Using mail 2.6.6
Using sshkit 1.14.0
Using scrypt 1.2.1
Using sass-listen 4.0.0
Using listen 3.1.5
Using selenium-webdriver 3.4.3
Using rbnacl-libsodium 1.0.11
Using rspec 3.5.0
Using rails-dom-testing 2.0.3
Using globalid 0.4.0
Using activemodel 5.1.2
Using factory_girl 4.8.0
Using shoulda-matchers 3.1.2 from https://github.com/thoughtbot/shoulda-matchers.git (at rails-5@f800d62)
Using spring 2.0.2
Using rails-html-sanitizer 1.0.3
Using capybara 2.14.3
Using airbrussh 1.3.0
Using sass 3.5.1
Using json_spec 1.1.5
Using rspec_api_documentation 5.0.0
Using activejob 5.1.2
Using activerecord 5.1.2
Using spring-watcher-listen 2.0.1
Using actionview 5.1.2
Using capistrano 3.8.2
Using bootstrap-sass 3.3.7
Using font-awesome-sass 4.7.0
Using authlogic 3.6.0
Using actionpack 5.1.2
Using capistrano-bundler 1.2.0
Using capistrano-passenger 0.2.0
Using actioncable 5.1.2
Using actionmailer 5.1.2
Using railties 5.1.2
Using sprockets-rails 3.2.0
Using simple_form 3.5.0
Using capistrano-rails 1.3.0
Using bootstrap-daterangepicker-rails 0.0.8
Using jquery-rails 4.3.1
Using chart-js-rails 0.1.3
Using factory_girl_rails 4.8.0
Using momentjs-rails 2.17.1
Using parsley-rails 2.7.0.0
Using switchery-rails 0.8.1.1
Using rspec-rails 3.5.2
Using web-console 3.5.1
Using sass-rails 5.0.6
Using rails 5.1.2
Using flot-rails 0.0.7
Using casein 5.3.0.0
Using icheck-rails 1.0.2.2
Using gentelella-rails 0.1.6
mwlang commented 7 years ago

You're on uglifier 1.3.0...the current version of that is 3.2.0. I would highly recommend upgrading unless there's some specific reason to stay on 1.3.0.

sakozz commented 7 years ago

@mwlang , Unfortunately, problem still exists with uglifier 3.2.0. Here are my bundle list and error message.

Using rake 12.0.0
Using concurrent-ruby 1.0.5
Using i18n 0.8.6
Using minitest 5.10.3
Using thread_safe 0.3.6
Using builder 3.2.3
Using erubi 1.6.1
Using mini_portile2 2.2.0
Using rack 2.0.3
Using nio4r 2.1.0
Using websocket-extensions 0.1.2
Using mime-types-data 3.2016.0521
Using arel 8.0.0
Using public_suffix 2.0.5
Using net-ssh 4.1.0
Using request_store 1.3.2
Using ffi 1.9.18
Using execjs 2.7.0
Using awesome_print 1.7.0
Using bcrypt_pbkdf 1.0.0
Using bindex 0.5.0
Using method_source 0.8.2
Using thor 0.19.4
Using rb-fsevent 0.9.8
Using byebug 9.0.6
Using tilt 2.0.8
Using will_paginate 3.1.6
Using cocoon 1.2.10
Using coffee-script-source 1.12.2
Using dalli 2.7.6
Using database_cleaner 1.6.1
Using diff-lcs 1.3
Using fastclick-rails 1.0.1
Using ffaker 2.6.0
Using bundler 1.14.6
Using nprogress-rails 0.2.0.2
Using multi_json 1.12.1
Using rspec-support 3.5.0
Using ruby_dep 1.5.0
Using mustache 1.0.5
Using pg 0.21.0
Using puma 3.9.1
Using rubyzip 1.2.1
Using shoulda 2.11.3
Using sqlite3 1.3.13
Using turbolinks-source 5.0.3
Using tzinfo 1.2.3
Using nokogiri 1.8.0
Using rack-test 0.6.3
Using sprockets 3.7.1
Using websocket-driver 0.6.5
Using mime-types 3.1
Using addressable 2.5.1
Using net-scp 1.2.1
Using ffi-compiler 1.0.1
Using rb-inotify 0.9.10
Using childprocess 0.7.1
Using rbnacl 4.0.2
Using autoprefixer-rails 7.1.2.3
Using uglifier 3.2.0
Using figaro 1.1.1
Using select2-rails 4.0.3
Using coffee-script 2.4.1
Using rspec-core 3.5.4
Using rspec-expectations 3.5.0
Using rspec-mocks 3.5.0
Using turbolinks 5.0.1
Using activesupport 5.1.2
Using loofah 2.0.3
Using xpath 2.1.0
Using mail 2.6.6
Using sshkit 1.14.0
Using scrypt 1.2.1
Using sass-listen 4.0.0
Using listen 3.1.5
Using selenium-webdriver 3.4.3
Using rbnacl-libsodium 1.0.11
Using rspec 3.5.0
Using rails-dom-testing 2.0.3
Using globalid 0.4.0
Using activemodel 5.1.2
Using factory_girl 4.8.0
Using shoulda-matchers 3.1.2 from https://github.com/thoughtbot/shoulda-matchers.git (at rails-5@f800d62)
Using spring 2.0.2
Using rails-html-sanitizer 1.0.3
Using capybara 2.14.3
Using airbrussh 1.3.0
Using sass 3.5.1
Using json_spec 1.1.5
Using rspec_api_documentation 5.0.0
Using activejob 5.1.2
Using activerecord 5.1.2
Using spring-watcher-listen 2.0.1
Using actionview 5.1.2
Using capistrano 3.8.2
Using bootstrap-sass 3.3.7
Using font-awesome-sass 4.7.0
Using authlogic 3.6.0
Using actionpack 5.1.2
Using capistrano-bundler 1.2.0
Using capistrano-passenger 0.2.0
Using actioncable 5.1.2
Using actionmailer 5.1.2
Using railties 5.1.2
Using sprockets-rails 3.2.0
Using simple_form 3.5.0
Using capistrano-rails 1.3.0
Using bootstrap-daterangepicker-rails 0.0.8
Using jquery-rails 4.3.1
Using chart-js-rails 0.1.3
Using factory_girl_rails 4.8.0
Using momentjs-rails 2.17.1
Using parsley-rails 2.7.0.0
Using switchery-rails 0.8.1.1
Using rspec-rails 3.5.2
Using web-console 3.5.1
Using sass-rails 5.0.6
Using rails 5.1.2
Using flot-rails 0.0.7
Using casein 5.3.0.0
Using icheck-rails 1.0.2.2
Using gentelella-rails 0.1.6

Here are traced errors output


$ RAILS_ENV=production bundle exec rake assets:precompile --trace
....
....
rake aborted!
ExecJS::RuntimeError: SyntaxError: Unexpected token: punc ({)
JS_Parse_Error.get ((execjs):3538:621)
(execjs):4060:47
(execjs):1:102
Object.<anonymous> ((execjs):1:120)
Module._compile (module.js:570:32)
Object.Module._extensions..js (module.js:579:10)
Module.load (module.js:487:32)
tryModuleLoad (module.js:446:12)
Function.Module._load (module.js:438:3)
Module.runMain (module.js:604:10)
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:39:in `exec'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:21:in `eval'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:46:in `call'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/uglifier-3.2.0/lib/uglifier.rb:195:in `run_uglifyjs'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/uglifier-3.2.0/lib/uglifier.rb:157:in `compile'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/uglifier_compressor.rb:53:in `call'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/uglifier_compressor.rb:28:in `call'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:in `call_processor'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `reverse_each'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `call_processors'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:134:in `load_from_unloaded'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:60:in `block in load'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:44:in `load'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:20:in `block in initialize'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:in `load'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:66:in `find_asset'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:73:in `find_all_linked_assets'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:142:in `block in find'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `each'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `stat_directory'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:227:in `stat_tree'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:231:in `block in stat_tree'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `each'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `stat_directory'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:227:in `stat_tree'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:231:in `block in stat_tree'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `each'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `stat_directory'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:227:in `stat_tree'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:105:in `each'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:105:in `block in logical_paths'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:104:in `each'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:104:in `logical_paths'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:140:in `find'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:185:in `compile'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/rake/sprocketstask.rb:147:in `with_logger'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `block in execute'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `each'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `execute'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
~/.rbenv/versions/2.3.0/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:180:in `invoke'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:152:in `invoke_task'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `each'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block in top_level'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:117:in `run_with_threads'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:102:in `top_level'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:80:in `block in run'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
~/.rbenv/versions/2.3.0/bin/rake:23:in `load'
~/.rbenv/versions/2.3.0/bin/rake:23:in `<top (required)>'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/cli/exec.rb:74:in `load'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/cli/exec.rb:74:in `kernel_load'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/cli/exec.rb:27:in `run'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/cli.rb:335:in `exec'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/cli.rb:20:in `dispatch'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/cli.rb:11:in `start'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/exe/bundle:32:in `block in <top (required)>'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/exe/bundle:24:in `<top (required)>'
~/.rbenv/versions/2.3.0/bin/bundle:23:in `load'
~/.rbenv/versions/2.3.0/bin/bundle:23:in `<main>'
Tasks: TOP => assets:precompile
mwlang commented 7 years ago

If I'm reading the trace call stack correctly, it's failing on ExecJS library. Is that your interpretation as well?

The same works in the demo project and using the example Rails 5.1.x project there, so I cannot reproduce locally. Further, the demo includes execjs same as your project.

06:08:09:rails.5.1.x >> RAILS_ENV=production bundle exec rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke yarn:install (first_time)
** Execute yarn:install
yarn install v0.27.5
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.11s.
** Execute assets:precompile
I, [2017-07-27T06:08:21.884388 #53105]  INFO -- : Writing /Users/mwlang/projects/themes/gentelella-demo/examples/rails.5.1.x/public/assets/font-awesome/fontawesome-webfont-7bfcab6db99d5cfbf1705ca0536ddc78585432cc5fa41bbd7ad0f009033b2979.eot
I, [2017-07-27T06:08:21.895404 #53105]  INFO -- : Writing /Users/mwlang/projects/themes/gentelella-demo/examples/rails.5.1.x/public/assets/font-awesome/fontawesome-webfont-7bfcab6db99d5cfbf1705ca0536ddc78585432cc5fa41bbd7ad0f009033b2979.eot.gz
I, [2017-07-27T06:08:21.901317 #53105]  INFO -- : Writing /Users/mwlang/projects/themes/gentelella-demo/examples/rails.5.1.x/public/assets/font-awesome/fontawesome-webfont-ad6157926c1622ba4e1d03d478f1541368524bfc46f51e42fe0d945f7ef323e4.svg
I, [2017-07-27T06:08:21.902851 #53105]  INFO -- : Writing /Users/mwlang/projects/themes/gentelella-demo/examples/rails.5.1.x/public/assets/font-awesome/fontawesome-webfont-ad6157926c1622ba4e1d03d478f1541368524bfc46f51e42fe0d945f7ef323e4.svg.gz
I, [2017-07-27T06:08:21.908166 #53105]  INFO -- : Writing /Users/mwlang/projects/themes/gentelella-demo/examples/rails.5.1.x/public/assets/font-awesome/fontawesome-webfont-aa58f33f239a0fb02f5c7a6c45c043d7a9ac9a093335806694ecd6d4edc0d6a8.ttf
I, [2017-07-27T06:08:21.909334 #53105]  INFO -- : Writing /Users/mwlang/projects/themes/gentelella-demo/examples/rails.5.1.x/public/assets/font-awesome/fontawesome-webfont-aa58f33f239a0fb02f5c7a6c45c043d7a9ac9a093335806694ecd6d4edc0d6a8.ttf.gz
I, [2017-07-27T06:08:21.915499 #53105]  INFO -- : Writing /Users/mwlang/projects/themes/gentelella-demo/examples/rails.5.1.x/public/assets/font-awesome/fontawesome-webfont-ba0c59deb5450f5cb41b3f93609ee2d0d995415877ddfa223e8a8a7533474f07.woff
[ ... ]
I, [2017-07-27T06:16:10.255345 #53105]  INFO -- : Writing /Users/mwlang/projects/themes/gentelella-demo/examples/rails.5.1.x/public/assets/starrr-8d4b796ce6b895dde9a180fcb92461c4c1a952bba98802c66a051f524c3b1e75.js.gz
I, [2017-07-27T06:16:10.925412 #53105]  INFO -- : Writing /Users/mwlang/projects/themes/gentelella-demo/examples/rails.5.1.x/public/assets/vfs_fonts-8c7a8678194864aa59c7434a84d1326966e95600b6fb0bf6579eba6a94862183.js
I, [2017-07-27T06:16:10.925787 #53105]  INFO -- : Writing /Users/mwlang/projects/themes/gentelella-demo/examples/rails.5.1.x/public/assets/vfs_fonts-8c7a8678194864aa59c7434a84d1326966e95600b6fb0bf6579eba6a94862183.js.gz

Can you try same with the demo project and reproduce? If so, I would say it's something in your environment unrelated to either projects (yours or the demo). Perhaps your local execjs gem was modified?

On the other hand, if precompile works for you in the demo project, then it's code in your specific project. If you've placed .js and .css in your initializer's precompile path in your project, then that's most likely the culprit as that'll pull in .js resources of all the JS-related gems of your Gemfile and I know for a fact that breaks things quickly. In my case, it caused errors when encountering bootstrap-sass's resources. The principle change from 0.1.5 to 0.1.6 was to fix precompile issues in production environments by including all the .js and *.css resources of the gem.

Also, you may be able to get more specific info on what's failing following the command line suggestion on this Stack Overflow Q/A

sakozz commented 7 years ago

Sorry for writing late. Anyways, here is what i have come to realise. I was trying use this gem along with Uppy.io. The demo project seems to compile quite fine unless i use this plugin.

For some reason, the assets precompile fails while using them together. So i ended up taking couple of CSS and JS files from this gem which seems to get the work done after all.

Anyways, Thanks a lot for your efforts.

mwlang commented 7 years ago

Awesome news that you got it working.