ffouquet42
ffouquet42

Reputation: 134

Precompiling assets failed. on rails 6

Hi i try to deploy my app on heroku but i got this errors when i run : git push heroku HEAD:master

Enumerating objects: 206, done.
Counting objects: 100% (205/205), done.
Delta compression using up to 8 threads
Compressing objects: 100% (185/185), done.
Writing objects: 100% (189/189), 31.67 MiB | 10.88 MiB/s, done.
Total 189 (delta 32), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: heroku/ruby
remote: -----> Ruby app detected
remote: -----> Installing bundler 2.2.11
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.7.1
remote: -----> Installing dependencies using bundler 2.2.11
remote:        Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
remote:        Using rake 13.0.3
remote:        Using concurrent-ruby 1.1.8
remote:        Using i18n 1.8.9
remote:        Using minitest 5.14.4
remote:        Using tzinfo 2.0.4
remote:        Using zeitwerk 2.4.2
remote:        Using activesupport 6.1.3
remote:        Using builder 3.2.4
remote:        Using erubi 1.10.0
remote:        Using mini_portile2 2.5.0
remote:        Using racc 1.5.2
remote:        Using nokogiri 1.11.2 (x86_64-linux)
remote:        Using rails-dom-testing 2.0.3
remote:        Using crass 1.0.6
remote:        Using loofah 2.9.0
remote:        Using rails-html-sanitizer 1.3.0
remote:        Using actionview 6.1.3
remote:        Using rack 2.2.3
remote:        Using rack-test 1.1.0
remote:        Using actionpack 6.1.3
remote:        Using nio4r 2.5.7
remote:        Using websocket-extensions 0.1.5
remote:        Using websocket-driver 0.7.3
remote:        Using actioncable 6.1.3
remote:        Using globalid 0.4.2
remote:        Using activejob 6.1.3
remote:        Using activemodel 6.1.3
remote:        Using activerecord 6.1.3
remote:        Using mimemagic 0.3.5
remote:        Using marcel 0.3.3
remote:        Using activestorage 6.1.3
remote:        Using mini_mime 1.0.2
remote:        Using mail 2.7.1
remote:        Using actionmailbox 6.1.3
remote:        Using actionmailer 6.1.3
remote:        Using actiontext 6.1.3
remote:        Using bcrypt 3.1.16
remote:        Using msgpack 1.4.2
remote:        Using bootsnap 1.7.2
remote:        Using bundler 2.2.11
remote:        Using coderay 1.1.3
remote:        Using dotenv 2.7.6
remote:        Using method_source 1.0.0
remote:        Using thor 1.1.0
remote:        Using railties 6.1.3
remote:        Using dotenv-rails 2.7.6
remote:        Using faker 2.17.0
remote:        Using ffi 1.15.0
remote:        Using pg 1.2.3
remote:        Using pry 0.14.0
remote:        Using puma 5.2.2
remote:        Using rack-proxy 0.6.5
remote:        Using sprockets 4.0.2
remote:        Using sprockets-rails 3.2.2
remote:        Using rails 6.1.3
remote:        Using sassc 2.4.0
remote:        Using tilt 2.0.10
remote:        Using sassc-rails 2.1.2
remote:        Using sass-rails 6.0.0
remote:        Using semantic_range 3.0.0
remote:        Using table_print 1.5.7
remote:        Using webpacker 5.2.1
remote:        Bundle complete! 22 Gemfile dependencies, 62 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 (0.61s)
remote:        Cleaning up the bundler cache.
remote: -----> Installing node-v12.16.2-linux-x64
remote: -----> Installing yarn-v1.22.4
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        yarn install v1.22.4
remote:        [1/4] Resolving packages...
remote:        [2/4] Fetching packages...
remote:        info [email protected]: The platform "linux" is incompatible with this module.
remote:        info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
remote:        info [email protected]: The platform "linux" is incompatible with this module.
remote:        info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
remote:        [3/4] Linking dependencies...
remote:        warning " > [email protected]" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
remote:        warning "webpack-dev-server > [email protected]" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
remote:        [4/4] Building fresh packages...
remote:        Done in 27.06s.
remote:        rake aborted!
remote:        SassC::SyntaxError: Error: Invalid CSS after "... filter: progid": expected "}", was ": DXImageTransform."
remote:                on line 7641:13 of stdin
remote:        >>     filter: progid: DXImageTransform.Microsoft.BasicImage(rotation=1);
remote:
remote:           ------------^
remote:        stdin:7641
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc/engine.rb:50:in `render'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sassc-rails-2.1.2/lib/sassc/rails/compressor.rb:29:in `call'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/sass_compressor.rb:30:in `call'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:84:in `call_processor'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:66:in `block in call_processors'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:65:in `reverse_each'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:65:in `call_processors'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/loader.rb:182:in `load_from_unloaded'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/loader.rb:59:in `block in load'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/loader.rb:337:in `fetch_asset_from_dependency_cache'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/loader.rb:43:in `load'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/cached_environment.rb:44:in `load'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/bundle.rb:32:in `block in call'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/bundle.rb:31:in `call'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:84:in `call_processor'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:66:in `block in call_processors'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:65:in `reverse_each'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:65:in `call_processors'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/loader.rb:182:in `load_from_unloaded'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/loader.rb:59:in `block in load'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/loader.rb:337:in `fetch_asset_from_dependency_cache'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/loader.rb:43:in `load'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/cached_environment.rb:44:in `load'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/base.rb:81:in `find_asset'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/base.rb:88:in `find_all_linked_assets'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/sprockets-4.0.2/lib/sprockets/manifest.rb:125:in `block (2 levels) in find'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb:24:in `block in execute'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:41:in `block in synchronize'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:41:in `synchronize'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:41:in `synchronize'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb:19:in `execute'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/promise.rb:563:in `block in realize'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:363:in `run_task'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.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_2b912bde/vendor/bundle/ruby/2.7.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:335:in `loop'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.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_2b912bde/vendor/bundle/ruby/2.7.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:334:in `catch'
remote:        /tmp/build_2b912bde/vendor/bundle/ruby/2.7.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: Verifying deploy...
remote:
remote: !   Push rejected to sophro-hypnose.
remote:
To https://git.heroku.com/sophro-hypnose.git
 ! [remote rejected] HEAD -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/sophro-hypnose.git'

I've search on Stackoverflow or on other website and no one things worked for me. Maybe cause their question were too old.

I've already try to add this line in config/application.rb

config.assets.initialize_on_precompile = false

But if i run again : git push heroku HEAD:master

I just got a problem with rake impossible to solve too like : Could not detect rake tasks Nothing on the web worked for this error. I try to bundle rake update ect. but there nothing to do.

How fix the Precompiling assets failed. error? Can be cause rails or ruby version ?

Upvotes: 1

Views: 631

Answers (1)

razvans
razvans

Reputation: 3251

From the error is seems you have a space after progid

 filter: progid: DXImageTransform.Microsoft.BasicImage(rotation=1);

See if it works with:

 filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);

Upvotes: 1

Related Questions