在部署到 heroku 之前,我似乎总是需要预编译我的资产。我最近将 rails 升级到 3.2.11,因为它说它修复了安全补丁。我还更新了一些我的宝石。
我正在尝试使用以下命令在本地预编译我的资产,RAILS_ENV=production bundle exec rake assets:precompile --trace
但出现以下错误并 rake aborts。
RAILS_ENV=production bundle exec rake assets:precompile --trace
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:197: warning: Insecure world writable dir /usr/local in PATH, mode 040777
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:197: warning: Insecure world writable dir /Users/mwallace/.rvm in PATH, mode 040757
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/Users/mwallace/.rvm/rubies/ruby-1.9.3-p362/bin/ruby /Users/mwallace/.rvm/gems/ruby-1.9.3-p362/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:197: warning: Insecure world writable dir /Users/mwallace/.rvm in PATH, mode 040757
** 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 tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
no block given (yield)
(in /Users/mwallace/Sites/venueblast/app/assets/javascript/live/templates/main_view.handlebars.erb)
/Users/mwallace/Sites/venueblast/app/assets/javascript/live/templates/main_view.handlebars.erb:11:in `evaluate_source'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/tilt-1.3.3/lib/tilt/template.rb:209:in `instance_eval'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/tilt-1.3.3/lib/tilt/template.rb:209:in `evaluate_source'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/tilt-1.3.3/lib/tilt/template.rb:144:in `cached_evaluate'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/tilt-1.3.3/lib/tilt/template.rb:127:in `evaluate'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/context.rb:193:in `block in evaluate'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in `each'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in `evaluate'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/processed_asset.rb:12:in `initialize'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/base.rb:249:in `new'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/base.rb:249:in `block in build_asset'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/base.rb:270:in `circular_call_protection'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/base.rb:248:in `build_asset'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in `block in build_asset'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:in `cache_asset'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in `build_asset'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:in `find_asset'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/index.rb:60:in `find_asset'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/bundled_asset.rb:16:in `initialize'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/base.rb:252:in `new'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/base.rb:252:in `build_asset'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in `block in build_asset'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:in `cache_asset'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in `build_asset'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:in `find_asset'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/index.rb:60:in `find_asset'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/environment.rb:78:in `find_asset'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/actionpack-3.2.11/lib/sprockets/static_compiler.rb:19:in `block in compile'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/base.rb:219:in `block in each_logical_path'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/base.rb:206:in `block (2 levels) in each_file'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in `each'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in `each_entry'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/base.rb:204:in `block in each_file'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each_file'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/sprockets-2.2.2/lib/sprockets/base.rb:217:in `each_logical_path'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/actionpack-3.2.11/lib/sprockets/static_compiler.rb:18:in `compile'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/actionpack-3.2.11/lib/sprockets/assets.rake:56:in `internal_precompile'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/actionpack-3.2.11/lib/sprockets/assets.rake:70:in `block (3 levels) in <top (required)>'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/task.rb:228:in `call'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/task.rb:228:in `block in execute'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/task.rb:223:in `each'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/task.rb:223:in `execute'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/Users/mwallace/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/task.rb:152:in `invoke'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/actionpack-3.2.11/lib/sprockets/assets.rake:60:in `block (3 levels) in <top (required)>'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/task.rb:228:in `call'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/task.rb:228:in `block in execute'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/task.rb:223:in `each'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/task.rb:223:in `execute'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/Users/mwallace/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/task.rb:152:in `invoke'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/application.rb:143:in `invoke_task'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/application.rb:101:in `each'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/application.rb:101:in `block in top_level'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/application.rb:110:in `run_with_threads'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/application.rb:95:in `top_level'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/application.rb:73:in `block in run'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/bin/rake:19:in `load'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [/Users/mwallace/.rvm/rubies/ruby-1.9.3-p36...]
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/file_utils.rb:45:in `call'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/file_utils.rb:45:in `sh'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/file_utils_ext.rb:40:in `sh'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/file_utils.rb:80:in `ruby'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/file_utils_ext.rb:40:in `ruby'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/actionpack-3.2.11/lib/sprockets/assets.rake:12:in `ruby_rake_task'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/actionpack-3.2.11/lib/sprockets/assets.rake:21:in `invoke_or_reboot_rake_task'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/gems/actionpack-3.2.11/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/task.rb:228:in `call'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/task.rb:228:in `block in execute'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/task.rb:223:in `each'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/task.rb:223:in `execute'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/Users/mwallace/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/task.rb:152:in `invoke'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/application.rb:143:in `invoke_task'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/application.rb:101:in `each'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/application.rb:101:in `block in top_level'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/application.rb:110:in `run_with_threads'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/application.rb:95:in `top_level'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/application.rb:73:in `block in run'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362@global/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/bin/rake:19:in `load'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/bin/rake:19:in `<main>'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/bin/ruby_noexec_wrapper:14:in `eval'
/Users/mwallace/.rvm/gems/ruby-1.9.3-p362/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => assets:precompile
我的主要布局模板中的第 11 行似乎是原因。<%= yield %> 在哪里。
<div id="tophead">
<div class="container">
<div id="wrapper_main">
<div id="top_aurora"></div>
<div class="header">
<a href="/" alt="Venueblast - your ticket to live music online"><div id="logo"></div></a>
</div>
</div>
<div id="video_area" class="video_area">
<%= yield %>
</div>
<div id="footer" class="live_footer">
<div id="cornrows" class="cornrows">
<div class="center" id="live_trademark"><p>®Venueblast.com All Rights Reserved. <img src="../images/venueblast_footer_logo.png" height="15" width="93"></p>
<p>Interested in finding out more? <a href="contact.html">Contact Us</a></p>
</div>
</div>
</div>