Rails 3.1.1 资产预编译 - rake 中止
编辑:还有其他人有什么建议吗?我完全被难住了!!!
我有一个应用程序,其中所有资产都编译得很好,但是在第二个应用程序中,当我运行时:
RAILS_ENV=production rake assets:precompile --trace
我收到以下消息:未定义的方法“目录?”对于 nil:NilClass
请帮忙。当我查看 public/assets 目录时,我看到图像文件已被预编译,但没有 js 或 css 文件。
以下是完整的终端输出:
=> RAILS_ENV=production rake assets:precompile --trace
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53: warning: already initialized constant WFKV_
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/Users/swamiatma/.rvm/rubies/ruby-1.9.2-p290/bin/ruby /Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53: warning: already initialized constant WFKV_
** 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!
undefined method `directory?' for nil:NilClass
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/sprockets-2.0.2/lib/sprockets/base.rb:122:in `block in each_entry'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/sprockets-2.0.2/lib/sprockets/base.rb:118:in `each'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/sprockets-2.0.2/lib/sprockets/base.rb:118:in `each_entry'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/sprockets-2.0.2/lib/sprockets/base.rb:137:in `block in each_file'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/sprockets-2.0.2/lib/sprockets/base.rb:136:in `each'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/sprockets-2.0.2/lib/sprockets/base.rb:136:in `each_file'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/sprockets-2.0.2/lib/sprockets/base.rb:149:in `each_logical_path'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/actionpack-3.1.1/lib/sprockets/static_compiler.rb:18:in `compile'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/actionpack-3.1.1/lib/sprockets/assets.rake:52:in `internal_precompile'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/actionpack-3.1.1/lib/sprockets/assets.rake:66:in `block (3 levels) in <top (required)>'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/swamiatma/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/actionpack-3.1.1/lib/sprockets/assets.rake:56:in `block (3 levels) in <top (required)>'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/swamiatma/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:90:in `block (2 levels) in top_level'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:90:in `block in top_level'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:62:in `block in run'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/bin/rake:19:in `load'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [/Users/swamiatma/.rvm/rubies/ruby-1.9.2-p2...]
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/file_utils.rb:45:in `call'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/file_utils.rb:45:in `sh'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/file_utils_ext.rb:36:in `sh'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/file_utils.rb:78:in `ruby'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/file_utils_ext.rb:36:in `ruby'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/actionpack-3.1.1/lib/sprockets/assets.rake:9:in `ruby_rake_task'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/actionpack-3.1.1/lib/sprockets/assets.rake:17:in `invoke_or_reboot_rake_task'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/actionpack-3.1.1/lib/sprockets/assets.rake:25:in `block (2 levels) in <top (required)>'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/swamiatma/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:90:in `block (2 levels) in top_level'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:90:in `block in top_level'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:62:in `block in run'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/bin/rake:19:in `load'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile
EDIT: Anybody else has any suggestions? I'm totally stumped!!!
I have an app in which all the assets compile just fine but in this second app, when I run:
RAILS_ENV=production rake assets:precompile --trace
I get the following message: undefined method `directory?' for nil:NilClass
Please help. When I look under the public/assets directory I see that the image files have been precompiled but none of the js or css files.
Below is the full terminal output:
=> RAILS_ENV=production rake assets:precompile --trace
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53: warning: already initialized constant WFKV_
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/Users/swamiatma/.rvm/rubies/ruby-1.9.2-p290/bin/ruby /Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53: warning: already initialized constant WFKV_
** 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!
undefined method `directory?' for nil:NilClass
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/sprockets-2.0.2/lib/sprockets/base.rb:122:in `block in each_entry'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/sprockets-2.0.2/lib/sprockets/base.rb:118:in `each'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/sprockets-2.0.2/lib/sprockets/base.rb:118:in `each_entry'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/sprockets-2.0.2/lib/sprockets/base.rb:137:in `block in each_file'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/sprockets-2.0.2/lib/sprockets/base.rb:136:in `each'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/sprockets-2.0.2/lib/sprockets/base.rb:136:in `each_file'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/sprockets-2.0.2/lib/sprockets/base.rb:149:in `each_logical_path'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/actionpack-3.1.1/lib/sprockets/static_compiler.rb:18:in `compile'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/actionpack-3.1.1/lib/sprockets/assets.rake:52:in `internal_precompile'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/actionpack-3.1.1/lib/sprockets/assets.rake:66:in `block (3 levels) in <top (required)>'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/swamiatma/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/actionpack-3.1.1/lib/sprockets/assets.rake:56:in `block (3 levels) in <top (required)>'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/swamiatma/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:90:in `block (2 levels) in top_level'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:90:in `block in top_level'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:62:in `block in run'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/bin/rake:19:in `load'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [/Users/swamiatma/.rvm/rubies/ruby-1.9.2-p2...]
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/file_utils.rb:45:in `call'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/file_utils.rb:45:in `sh'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/file_utils_ext.rb:36:in `sh'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/file_utils.rb:78:in `ruby'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/file_utils_ext.rb:36:in `ruby'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/actionpack-3.1.1/lib/sprockets/assets.rake:9:in `ruby_rake_task'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/actionpack-3.1.1/lib/sprockets/assets.rake:17:in `invoke_or_reboot_rake_task'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/gems/actionpack-3.1.1/lib/sprockets/assets.rake:25:in `block (2 levels) in <top (required)>'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/swamiatma/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:90:in `block (2 levels) in top_level'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:90:in `block in top_level'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:62:in `block in run'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/bin/rake:19:in `load'
/Users/swamiatma/.rvm/gems/ruby-1.9.2-p290@lasource/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
感谢 phoet:我只是用
.bundle/ruby/1.9.1/gems/sprockets-2.0.2/lib/sprockets/base 处的
.该错误是由无效的符号链接引起的(仅在具有 Rails 3.1.1 sprockets 2.0.2 的生产环境中,另外,rack 1.3.4 会导致begin..rescue
块包围这些行。 rbconstant WFKV_
警告,但rack 1.3.3 不会)错误消失了,
bundle exec rake assets:precompile --trace
结束了,但最后两个步骤需要永恒** 在 tmp:cache:clear 之后立即执行 asset:precompile:primary
...我们会看到;)Thanks to phoet: I just surrounded those lines with an
begin..rescue
block at.bundle/ruby/1.9.1/gems/sprockets-2.0.2/lib/sprockets/base.rb
. The error was caused by an invalid symlink (only in production env with rails 3.1.1 sprockets 2.0.2, additionally rack 1.3.4 caused anconstant WFKV_
warning but rack 1.3.3 doesn't)Now the error is gone and
bundle exec rake assets:precompile --trace
comes to an end, but needs an eternity at the last two steps** Execute assets:precompile:primary
right after tmp:cache:clear ... we will see ;)感谢 Phoet 的建议,我在链轮的基本文件中添加了一个 put 语句,这给了我罪魁祸首的文件。这是一个 ckeditor js 文件。我已将 ckeditor 移至公共目录中的管道之外,但该文件以某种方式被调用包含在内。我还是不知道为什么。但我在 asset/javascripts 目录中放置了一个虚拟的 ckeditor.js 文件,这足以解决我的问题。
Thanks to Phoet's suggestions I added a puts statement in the base file of sprockets and that gave me the culprit file. It was a ckeditor js file. I have moved ckeditor outside the pipeline in the public directory but this file was somehow called for inclusion. I still don't know why. But I put a dummy ckeditor.js file in the assets/javascripts directory and that was enough to fix my problem.