0
我有一个我正在尝试部署的rails 3.0.9应用程序。该应用程序在我的开发框(ruby 1.8.7 p352,mongrel)上运行良好,但在生产环境中产生以下错误(ruby 1.8.7 p334,Passenger)。Rails 3使用javascript_include_tag生产无错误
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条件,但不会使任何差异
谢谢你做的伎俩,最受赞赏 – user1302719 2012-03-30 09:10:50