2
votes

I can reproduce this issue on both OSX and Windows with Ruby 1.9.2:

I have a simple Rails 3.2.3 app and am trying to precompile the assetpipeline, but the assets:precompile does nothing. Doesn't complain either.

Here is what I've done:

  1. Using RVM, create a new and clean gemset, call it rails32
  2. Install rails: gem install rails -v 3.2.3
  3. Create a dummy scaffold: rails g scaffold test name:string
  4. Migrate the prod db: rake db:migrate RAILS_ENV=production
  5. Run the server in prod: rails s -e production

At this point I get the asset not precompiled exception, which I was expecting. Then:

I run rake assets:precompile RAILS_ENV=production

It runs with no errors and ends.

After that, my app has fingerprinted assets in the HTML but they don't exist anywhere.

Any ideas? I thought this is the simplest form of using the assetpipeline.

1

1 Answers

0
votes

By default, Rails expects a high-load server (such as Apache or nginx) to serve static assets in production mode. If you really don't want to run your app behind such a server, in your config/environment.rb file, change config.serve_static_assets to true.