资产管道错误,但application.rb中的config.assets.enabled = false [英] asset pipeline error but config.assets.enabled = false in application.rb
问题描述
我正在通过capistrano部署第一个Rails应用程序,其中: 导轨3.1 乘客3.0.11 nginx 1.0.10
该应用程序出错.在我的$ app/logs/production.log中,我得到:
5: <%= stylesheet_link_tag "application" %>
6: <%= javascript_include_tag "application" %>
7: <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
8: <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.js"></script>
app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb__88091947956529734_37470040'
但是在我的application.rb中,我已经设置了:
# Enable the asset pipeline
config.assets.enabled = false
我认为此指令导致资产管道被禁用.有什么想法吗?
在禁用管道的情况下,Rails希望引用的文件application.css
和application.js
在3.1之前的位置的公共目录中可用./p>
您不使用管道是有原因的吗?
I am deploying a first rails app via capistrano with: rails 3.1 passenger 3.0.11 nginx 1.0.10
The app errors out. In my $app/logs/production.log, I get:
5: <%= stylesheet_link_tag "application" %>
6: <%= javascript_include_tag "application" %>
7: <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
8: <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.js"></script>
app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb__88091947956529734_37470040'
But in my application.rb, I have set:
# Enable the asset pipeline
config.assets.enabled = false
I thought this directive causes the asset pipeline to be disabled. Any ideas what is going on?
With the pipeline disabled, Rails is expecting the referenced files application.css
and application.js
to be available in the public directory at the pre-3.1 locations.
Is there a reason why you are not using the pipeline?
这篇关于资产管道错误,但application.rb中的config.assets.enabled = false的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!