0

我的 css 文件和缓存有问题。现在似乎没有任何样式表加载,我读到我可以尝试使用rake assets:precomile,但我得到一个错误。

当我使用跟踪运行时:

C:\Users\admin\Desktop\webapp>rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
"C:/Program Files/ruby-1.9.2/bin/ruby.exe" C:/Program Files/ruby-1.9.2/bin/rake assets:precompile:all RAILS_ENV=producti
on RAILS_GROUPS=assets --trace
rake aborted!
Command failed with status (127): ["C:/Program Files/ruby-1.9.2/bin/ruby.exe"...]
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `block in create_shell_ru
nner'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `call'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `sh'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `sh'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils.rb:80:in `ruby'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `ruby'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-3.2.6/lib/sprockets/assets.rake:12:in `ruby_rake_task'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-3.2.6/lib/sprockets/assets.rake:21:in `invoke_or_reboot_
rake_task'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-3.2.6/lib/sprockets/assets.rake:29:in `block (2 levels)
in <top (required)>'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_cha
in'
C:/Program Files/ruby-1.9.2/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top
_level'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_han
dling'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_han
dling'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
C:/Program Files/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
C:/Program Files/ruby-1.9.2/bin/rake:19:in `load'
C:/Program Files/ruby-1.9.2/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile

有谁知道如何解决这个问题?提前致谢。

4

1 回答 1

0

状态码 127 通常用于表示“未找到命令”。在您的情况下["C:/Program Files/ruby-1.9.2/bin/ruby.exe"...],找不到 ruby​​.exe。您是否正确安装了 ruby​​?

于 2012-10-18T13:41:13.767 回答