I've done this on a sister Rails 3.1 app using production on my Leopard webserver. So I didn't expect to be this lost deploying this app. I've gotten Passenger to recognize the app, but I get a '[GET /] miss' error in apache. Looking around I figure I can get this to run in webrick to see if I can isolate the issue.
bundle exec rake assets:precompile RAILS_ENV=production
But when I load up localhost:3000 I get "blueprint/screen.css isn't precompiled"
I start comparing the differences between the sister apps and cannot find them. Here are some key code they share:
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application" %> #in app/views/layouts/application.html.erb
config/environments/production.rb
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.serve_static_assets = false
config.assets.precompile += %w( search.js )
config.assets.precompile += %w( blueprint/screen.css blueprint/print.css )
config.assets.precompile += %w( *.css *.js )
This happens in 3.1.0 and 3.1.3 and I can confirm the precompile happens on the blueprint directories. What am I overlooking?, sam
Have you tried separately like this?
config.assets.precompile += %w( blueprint/screen.css )
config.assets.precompile += %w( blueprint/print.css )
then run:
bundle exec rake assets:precompile RAILS_ENV=production
This should fixed it.
You can set assets.compile to true in the production environment to fallback to assets pipeline when the file is missed.
# config/environments/production.rb
# ...
# Fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With