3.2.13 breaks localized ActiveScaffold assets compilation

Hi,

I just tried upgrading to 3.2.13 a project that worked fine under
3.2.12,
but that broke our assets pipeline compilation. It looks like
compilation
now chokes on ActiveScaffold asset ‘date_picker_bridge.js.erb’.
(Full stack trace below).

The first line of that file is:

<%= ActiveScaffold::Bridges[:date_picker].localization %>

And we use Japanese locale.

How can we fix this?

Thank you,
Yves-Eric

$ rake --trace assets:precompile
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/Users/DEV/.rvm/rubies/ruby-1.9.3-p327-perf/bin/ruby ./bin/rake
assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Invoke assets:cache:clean (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)>’
** Execute environment
** Execute assets:cache:clean
** Execute assets:precompile:all
rake aborted!
invalid byte sequence in US-ASCII
(in
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/bundler/gems/active_scaffold-2053b21e43e6/app/assets/javascripts/jquery/date_picker_bridge.js.erb)
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/safety_colons.rb:20:in
evaluate' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/tilt-1.3.6/lib/tilt/template.rb:77:inrender’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/context.rb:193:in
block in evaluate' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:ineach’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in
evaluate' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/sprockets/unprocessed_asset.rb:14:ininitialize’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:16:in
new' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:16:inblock in build_asset’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:270:in
circular_call_protection' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:14:inbuild_asset’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in
block in build_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:incache_asset’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in
build_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:infind_asset’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/index.rb:14:in
find_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/sprockets/asset_with_dependencies.rb:91:inblock in build_required_assets’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/sprockets/asset_with_dependencies.rb:85:in
each' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/sprockets/asset_with_dependencies.rb:85:inbuild_required_assets’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/sprockets/unprocessed_asset.rb:27:in
initialize' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:16:innew’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:16:in
block in build_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:270:incircular_call_protection’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:14:in
build_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:inblock in build_asset’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:in
cache_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:inbuild_asset’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:in
find_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/index.rb:14:infind_asset’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/sprockets/asset_with_dependencies.rb:91:in
block in build_required_assets' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/sprockets/asset_with_dependencies.rb:85:ineach’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/sprockets/asset_with_dependencies.rb:85:in
build_required_assets' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/sprockets/unprocessed_asset.rb:27:ininitialize’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:16:in
new' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:16:inblock in build_asset’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:270:in
circular_call_protection' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:14:inbuild_asset’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in
block in build_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:incache_asset’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in
build_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:infind_asset’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/index.rb:14:in
find_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/bundled_asset.rb:12:ininitialize’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:22:in
new' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:22:inbuild_asset’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in
block in build_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:incache_asset’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in
build_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:infind_asset’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/index.rb:14:in
find_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/static_compiler.rb:32:inblock in compile’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:219:in
block in each_logical_path' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:206:inblock (2 levels) in each_file’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in
each' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:ineach_entry’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:204:in
block in each_file' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:ineach’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in
each_file' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:217:ineach_logical_path’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/static_compiler.rb:29:in
compile' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/tasks/assets.rake:102:ininternal_precompile’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/tasks/assets.rake:109:in
block (3 levels) in <top (required)>' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/task.rb:228:incall’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/task.rb:228:in
block in execute' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/task.rb:223:ineach’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/task.rb:223:in
execute' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/task.rb:166:inblock in invoke_with_call_chain’
/Users/DEV/.rvm/rubies/ruby-1.9.3-p327-perf/lib/ruby/1.9.1/monitor.rb:211:in
mon_synchronize' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/task.rb:159:ininvoke_with_call_chain’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/task.rb:152:in
invoke' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/application.rb:143:ininvoke_task’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/application.rb:101:in
block (2 levels) in top_level' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/application.rb:101:ineach’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/application.rb:101:in
block in top_level' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/application.rb:110:inrun_with_threads’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/application.rb:95:in
top_level' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/application.rb:73:inblock in run’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/application.rb:160:in
standard_exception_handling' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/application.rb:70:inrun’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/bin/rake:33:in
<top (required)>' ./bin/rake:16:inload’
./bin/rake:16:in <main>' Tasks: TOP => assets:precompile:all rake aborted! Command failed with status (1): [/Users/DEV/.rvm/rubies/ruby-1.9.3-p32...] /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/file_utils.rb:53:inblock in create_shell_runner’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/file_utils.rb:45:in
call' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/file_utils.rb:45:insh’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/file_utils_ext.rb:40:in
sh' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/file_utils.rb:80:inruby’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/file_utils_ext.rb:40:in
ruby' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/tasks/assets.rake:24:inruby_rake_task’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/tasks/assets.rake:33:in
invoke_or_reboot_rake_task' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/tasks/assets.rake:50:inblock (2 levels) in <top (required)>’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/task.rb:228:in
call' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/task.rb:228:inblock in execute’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/task.rb:223:in
each' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/task.rb:223:inexecute’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/task.rb:166:in
block in invoke_with_call_chain' /Users/DEV/.rvm/rubies/ruby-1.9.3-p327-perf/lib/ruby/1.9.1/monitor.rb:211:inmon_synchronize’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/task.rb:159:in
invoke_with_call_chain' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/task.rb:152:ininvoke’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/application.rb:143:in
invoke_task' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/application.rb:101:inblock (2 levels) in top_level’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/application.rb:101:in
each' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/application.rb:101:inblock in top_level’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/application.rb:110:in
run_with_threads' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/application.rb:95:intop_level’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/application.rb:73:in
block in run' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/application.rb:160:instandard_exception_handling’
/Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/lib/rake/application.rb:70:in
run' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf@global/gems/rake-10.0.3/bin/rake:33:in<top (required)>’
./bin/rake:16:in load' ./bin/rake:16:in
Tasks: TOP => assets:precompile

Hi Yves-Eric

Have you tried adding

|<%# encoding: utf-8 %>

|to the top of the .erb file?

Jeff

Actually after a bit of research it looks like this was fixed in the
below commit

to fix this issue

Cheers

Jeff

Hi Jeffrey,

Awesome, that fixed it, thanks!

For anyone facing this issue, the fix is not released yet, so “bundle
update active_scaffold” won’t do. You need this:

gem “active_scaffold”, :git =>
“git://github.com/activescaffold/active_scaffold.git”, :tag => “>=
v3.3.0.rc3”

Thanks again,
Yves-Eric

I managed to typo that line! For some weird reason it worked, but I
noticed
an error in a project that uses packaged gems… Of course there should
not
be a “>=” inside the tag! The correct declaration is:

gem “active_scaffold”, :git => “git://
GitHub - activescaffold/active_scaffold: Save time and headaches, and create a more easily maintainable set of pages, with ActiveScaffold. ActiveScaffold handles all your CRUD (create, read, update, delete) user interface needs, leaving you more time to focus on more challenging (and interesting!) problems.”, :tag => “v3.3.0.rc3”