【发布时间】:2012-03-30 08:07:26
【问题描述】:
我目前正在尝试部署一个 rails 3.0.9 应用程序。该应用程序在我的开发盒(ruby 1.8.7 p352,mongrel)上运行良好,但在生产盒(ruby 1.8.7 p334,Passenger)上产生以下错误。
A ActionView::Template::Error occurred in site#index:
can't convert nil into String
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 `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 %>
我尝试从 javascript_include_Tag 中删除条件,但这没有任何区别
【问题讨论】:
标签: javascript ruby-on-rails ruby-on-rails-3 assets