ericallam / font_assets

Helps with serving font assets with Rails 3.1
137 stars 79 forks source link

Can only be used when asset pipelining is switched on #7

Closed asanghi closed 12 years ago

asanghi commented 12 years ago

Otherwise you get errors No such middleware to insert before: "ActionDispatch::Static"

Perhaps it should be noted on README or alternatively supported in railtie.rb

ericallam commented 12 years ago

Thanks for the bug report. Will get this fixed up shortly.

On Jul 24, 2012, at 4:00 AM, Aditya Sanghi wrote:

Otherwise you get errors No such middleware to insert before: "ActionDispatch::Static"

Perhaps it should be noted on README or alternatively supported in railtie.rb


Reply to this email directly or view it on GitHub: https://github.com/rubymaverick/font_assets/issues/7

rmontgomery429 commented 12 years ago

Actually it looks like this issue is related to setting config.serve_static_assets = false. I still receive this error when the asset pipeline is enabled. Setting serve_static_assets to true makes it work. The downside to this is that I don't want to serve static assets in development. If this continues to be a roadblock I'll see if I can provide a patch.

I found this article to be helpful: http://www.stephenwalker.com/2010/08/issue-using-insert_afterbefore-actiondispatchstatic/

ericallam commented 12 years ago

Thanks @rmontgomery429 for the pull request. I merged it in and pushed up a new version of the gem 0.1.2