问题
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