metaskills/less-rails — Issue #19: Helpers not available
Author: adamburmister
Created: 2012-01-19 16:03:50+00:00
State: open

I have found that I am getting an error when running `asset:precompile` stating the helpers are not available.

Everything runs fine in development mode with dynamic compilation of stylesheets, but not on precompile. Any suggestions as to why they are not available?

```
rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/Users/adam/.rvm/rubies/ruby-1.9.2-p290/bin/ruby /Users/adam/.rvm/gems/ruby-1.9.2-p290/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
error evaluating function `image-url`
(in /Users/adam/Development/backchat-marketing/app/assets/stylesheets/homepage.css.less)
at /Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/less-2.0.8/lib/less/js/lib/less/parser.js:336:38
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/less-2.0.8/lib/less/parser.rb:88:in `block in to_css'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/less-2.0.8/lib/less/parser.rb:13:in `block in calljs'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/less-2.0.8/lib/less/parser.rb:27:in `block in lock'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/less-2.0.8/lib/less/parser.rb:25:in `lock'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/less-2.0.8/lib/less/parser.rb:12:in `calljs'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/less-2.0.8/lib/less/parser.rb:87:in `to_css'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/less-rails-2.1.2/lib/less/rails/template_handlers.rb:17:in `evaluate'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/context.rb:175:in `block in evaluate'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/context.rb:172:in `each'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/context.rb:172:in `evaluate'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:171:in `build_dependency_context_and_body'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:135:in `dependency_context'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:194:in `build_dependencies_paths_and_assets'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:141:in `dependency_paths'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:61:in `mtime'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/asset.rb:58:in `block in encode_with'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/asset.rb:57:in `each'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/asset.rb:57:in `encode_with'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:43:in `encode_with'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/caching.rb:52:in `cache_asset'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/index.rb:67:in `block in build_asset'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/index.rb:76:in `memoize'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/index.rb:65:in `build_asset'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/trail.rb:102:in `find_asset_in_path'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/base.rb:101:in `find_asset'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/index.rb:48:in `find_asset'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/base.rb:110:in `[]'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/less-rails-2.1.2/lib/less/rails/import_processor.rb:13:in `block in evaluate'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/less-rails-2.1.2/lib/less/rails/import_processor.rb:12:in `each'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/less-rails-2.1.2/lib/less/rails/import_processor.rb:12:in `evaluate'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/context.rb:175:in `block in evaluate'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/context.rb:172:in `each'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/context.rb:172:in `evaluate'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:171:in `build_dependency_context_and_body'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:135:in `dependency_context'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:194:in `build_dependencies_paths_and_assets'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:141:in `dependency_paths'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:61:in `mtime'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/asset.rb:58:in `block in encode_with'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/asset.rb:57:in `each'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/asset.rb:57:in `encode_with'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:43:in `encode_with'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/caching.rb:52:in `cache_asset'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/index.rb:67:in `block in build_asset'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/index.rb:76:in `memoize'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/index.rb:65:in `build_asset'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/trail.rb:102:in `find_asset_in_path'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/base.rb:101:in `find_asset'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/index.rb:48:in `find_asset'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:20:in `block in compile'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/base.rb:151:in `block in each_logical_path'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/base.rb:139:in `block (2 levels) in each_file'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/base.rb:129:in `each'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/base.rb:129:in `each_entry'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/base.rb:137:in `block in each_file'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/base.rb:136:in `each'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/base.rb:136:in `each_file'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/sprockets-2.0.3/lib/sprockets/base.rb:149:in `each_logical_path'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:18:in `compile'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/sprockets/assets.rake:52:in `internal_precompile'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/sprockets/assets.rake:66:in `block (3 levels) in '
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/adam/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/sprockets/assets.rake:56:in `block (3 levels) in '
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/adam/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/bin/rake:33:in `'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `load'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `

'
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [/Users/adam/.rvm/rubies/ruby-1.9.2-p290/bi...]
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `call'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `sh'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `sh'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/file_utils.rb:80:in `ruby'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `ruby'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/sprockets/assets.rake:9:in `ruby_rake_task'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/sprockets/assets.rake:17:in `invoke_or_reboot_rake_task'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/sprockets/assets.rake:25:in `block (2 levels) in '
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/adam/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/bin/rake:33:in `'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `load'
/Users/adam/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `

'
```