带有javascript_include_标记的Rails 3生产零错误

带有javascript_include_标记的Rails 3生产零错误,javascript,ruby-on-rails,ruby-on-rails-3,assets,Javascript,Ruby On Rails,Ruby On Rails 3,Assets,我有一个rails 3.0.9应用程序,目前正在尝试部署。该应用程序在my dev box(ruby 1.8.7 p352,mongrel)上运行良好,但在production box(ruby 1.8.7 p334,Passenger)上产生以下错误 堆栈跟踪是: vendor/bundle/ruby/1.8/gems/actionpack-3.0.9/lib/action_view/helpers/asset_tag_helper.rb:888:in `read' vendor/bundle

我有一个rails 3.0.9应用程序,目前正在尝试部署。该应用程序在my dev box(ruby 1.8.7 p352,mongrel)上运行良好,但在production box(ruby 1.8.7 p334,Passenger)上产生以下错误

堆栈跟踪是:

vendor/bundle/ruby/1.8/gems/actionpack-3.0.9/lib/action_view/helpers/asset_tag_helper.rb:888:in `read'
vendor/bundle/ruby/1.8/gems/actionpack-3.0.9/lib/action_view/helpers/asset_tag_helper.rb:888:in `join_asset_file_contents'
vendor/bundle/ruby/1.8/gems/actionpack-3.0.9/lib/action_view/helpers/asset_tag_helper.rb:888:in `collect'
vendor/bundle/ruby/1.8/gems/actionpack-3.0.9/lib/action_view/helpers/asset_tag_helper.rb:888:in `join_asset_file_contents'
vendor/bundle/ruby/1.8/gems/actionpack-3.0.9/lib/action_view/helpers/asset_tag_helper.rb:894:in `write_asset_file_contents'
vendor/bundle/ruby/1.8/gems/activesupport-3.0.9/lib/active_support/core_ext/file/atomic.rb:20:in `atomic_write'
vendor/bundle/ruby/1.8/gems/actionpack-3.0.9/lib/action_view/helpers/asset_tag_helper.rb:894:in `write_asset_file_contents'
vendor/bundle/ruby/1.8/gems/actionpack-3.0.9/lib/action_view/helpers/asset_tag_helper.rb:356:in `javascript_include_tag'
app/views/layouts/application.html.erb:79:in `_app_views_layouts_application_html_erb___689799961_85527100_0'
application.html.erb的第79行是:

<%= javascript_include_tag (Rails.env.development? ? "jquery.min.js" :  "http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"),
                         "jquery-ui.min",
                         "application", :cache => true %>
true%>

我已尝试从javascript_include_标记中删除条件,但这没有任何区别

如果所有参数实际上都是服务器上的文件,则只能使用
:cache=>true
选项-rails不会为您从googleapis获取jquery(如果它这样做了,则更可能会失败)

将jquery.min.js include放在它自己的
javascript\u include\u标记中,而不使用
:cache
选项,这样就可以了。或者,您可以停止尝试从googleapis加载jquery

<%= javascript_include_tag (Rails.env.development? ? "jquery.min.js" :  "http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"),
                         "jquery-ui.min",
                         "application", :cache => true %>