Undefined method `asset_path'

Hey folks,

Any idea why I sometimes get this error? It seems to happen randomly.

_assets/stylesheets/vendor/open-iconic-bootstrap.scss:6: Error: error in C function asset_path: undefined method `asset_path' for #<#<Class:0x00007f82c2e3bfb0>:0x00007f82c2e3be20> (SassC::SyntaxError)
        on line 6:12 of _assets/stylesheets/vendor/open-iconic-bootstrap.scss, in function `asset_path`
        from line 6:12 of _assets/stylesheets/vendor/open-iconic-bootstrap.scss
        from line 23:9 of _assets/stylesheets/main.scss
>>   src: url(asset_path('open-iconic.eot?#iconic-sm')) format('embedded-openty

Thanks

have you looked at line 6 of that file? might not be exactly line 6.

at what point are you getting that? when running jekyll serve/build? repo link?

are you using any plugins?

I’m not a ruby person, so I don’t know if this is related or how it would be but it looks like asset_path is a thing in ruby on rails. Not sure why that would matter with a normal jekyll site.

I’m using 3 plugins (jekyll-assets, jekyll-paginate-2, and jekyll-sitemap). The asset_path method comes from jekyll-assets.

Here’s line 6 of the open-iconic-bootstrap.scss file.

  src: url(asset_path('open-iconic.eot?#iconic-sm')) format('embedded-opentype'), url(asset_path('open-iconic.woff')) format('woff'), url(asset_path('open-iconic.ttf')) format('truetype'), url(asset_path('open-iconic.svg#iconic-sm')) format('svg');

I’m getting the error when I do jekyll serve (haven’t tried build). But the problem is I don’t get it all the time. For example, now it works just fine.

hmm, no idea, never used that plugin. Maybe it only does it if you change some css? then it processes something and is unhappy with it?

is asset_path your name for that? if so maybe change it to something else? I could sort of see how there could be a conflict with asset_path that ruby uses, but from what i saw that was in rails only but who knows, that is well beyond my pay grade.

I recommend that you seek help at the plugin’s repository: https://github.com/envygeeks/jekyll-assets/issues