asset pipeline error but config.assets.enabled = false in application.rb

£可爱£侵袭症+ 提交于 2019-12-11 10:26:29

问题


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?


回答1:


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?



来源:https://stackoverflow.com/questions/8389204/asset-pipeline-error-but-config-assets-enabled-false-in-application-rb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!