3

I have an image named pt_homepage_banner1.png.

I ran the task on production

bundle exec rake assets:precompile

and it successfully placed the image file into public/assets folder and made and entry into manifest.yml

Still i am getting exception -

Sprockets::Helpers::RailsHelper::AssetPaths::AssetNotPrecompiledError

fpt_homepage_banner1.png isn't precompiled

My production.rb settings are

 config.serve_static_assets = false

  config.assets.compress = true

  config.assets.compile = false

Please answer what i am missing. if any clarification regarding the question, please ask

Thank you

Simone Carletti
  • 173,507
  • 49
  • 363
  • 364
prashantsahni
  • 2,128
  • 19
  • 20
  • Well, it looks like the filename got an 'f' prepended to it somewhere -- so unless that's just a typo, you might try tracking that down. – Jan Hettich Jun 01 '13 at 05:09

2 Answers2

1

I also got the same error,

Sprockets::Helpers::RailsHelper::AssetPaths::AssetNotPrecompiledError b-error.png isn't precompiled. 

In my app I am calling this image, but in my images/ folder it was not there. So I added it and precompiled it again, so that the file appeared in public/assets folder. But I still gets the same error. So I know that Rails is somewhat stuck with this file, so what I did is I changed the b-error.png to 500.png and used another image and precompiled.

Now it Works!
Abhi
  • 3,361
  • 2
  • 33
  • 38
-5

Set following in config/environments/production.rb

config.serve_static_assets = true
config.assets.compile = true
Shamith c
  • 3,719
  • 3
  • 25
  • 33