chrismytton / fancybox-rails

Use FancyBox with the Rails asset pipeline

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with rake assets:precompile

chrismytton opened this issue · comments

  • rails 3.1.0
  • fancybox-rails 0.1.4

Running the rake precompile:assets task gives the following error.

% rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
rake aborted!
fancybox.png isn't precompiled
  (in /Users/chris/.rvm/gems/ruby-1.9.2-p290/gems/fancybox-rails-0.1.4/vendor/assets/stylesheets/jquery.fancybox.css.erb)

Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
commented

getting the same error

It appears this was an issue with rails, reported in rails/rails#2763 and fixed in rails/rails#2768. So this fix will be in 3.1.1.

The workaround until then is to change the following lines in config/environments/production.rb

# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = false

to

# Fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = true

Then the rake task should run as expected.