Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rake assets:precompile issue. Invalid UTF-8 byte sequence

Rails 3.1. I'm trying to precompile assets.

$ rake assets:precompile RAILS_ENV=production
  rake aborted!
  /home/user/project/public/assets/jquery-ui.min-0e8a11c7e970b57b4bf5c449cb14480d.js.gz has a invalid UTF-8 byte sequence
  Tasks: TOP => assets:precompile

  (See full trace by running task with --trace)

Any ideas?

like image 427
Ivan Schneider Avatar asked Oct 03 '11 15:10

Ivan Schneider


2 Answers

This is an issue with Sprockets. You can fix this for now by removing the umlaut from "a" in the author's name in the comments. Old:

Copyright (c) 2010 - 2011 Johan Säll Larsson

New:

Copyright (c) 2010 - 2011 Johan Sall Larsson
like image 86
nateware Avatar answered Oct 21 '22 22:10

nateware


https://github.com/sstephenson/sprockets/issues/219

config.assets.precompile = %w( files )

instead of

config.assets.precompile += %w( files )

or

config.assets.precompile << %w( files )
like image 25
Davide Barison Avatar answered Oct 21 '22 22:10

Davide Barison