3

I want to use "Foundation Icon Fonts 2 on SASS for Rails" gem with Rails4 Project. https://github.com/zaiste/foundation-icons-sass-rails

I followed the instruction to install, but I've got following error.

Showing /Users/[Username]/dev/[AppName]/app/views/layouts/application.html.erb where line #18 raised:

File to import not found or unreadable: foundation-icons. Load paths: /Users/[Username]/dev/[AppName]/app/assets/images
/Users/[Username]/dev/[AppName]/app/assets/javascripts
/Users/[Username]/dev/[AppName]/app/assets/stylesheets
/Users/[Username]/dev/[AppName]/vendor/assets/javascripts
/Users/[Username]/dev/[AppName]/vendor/assets/stylesheets
/Users/[Username]/dev/[AppName]/vendor/bundle/gems/turbolinks-1.2.0/lib/assets/javascripts /Users/[Username]/dev/[AppName]/vendor/bundle/gems/jquery-rails-3.0.2/vendor/assets/javascripts /Users/[Username]/dev/[AppName]/vendor/bundle/gems/coffee-rails-4.0.0/lib/assets/javascripts /Users/[Username]/dev/[AppName]/vendor/bundle/gems/zurb-foundation-4.2.3/scss /Users/[Username]/dev/[AppName]/vendor/bundle/gems/zurb-foundation-4.2.3/js (in /Users/[Username]/dev/[AppName]/app/assets/stylesheets/application.css.scss.css:16)

Is this gem is not available in Rails4? If not, how can I use foundation icon fonts2 in Rails4?

shilovk
  • 11,718
  • 17
  • 75
  • 74
ironsand
  • 14,329
  • 17
  • 83
  • 176
  • `application.html.erb where line #18` can you show us your `application.html.erb` ? – rails_id Jul 09 '13 at 08:34
  • Sorry, I tried it again, and works fine now. I don't know why it did n't worked last time. Thanks anyway! – ironsand Jul 11 '13 at 08:09
  • 3
    I think this is because you need to restart your server after installing the gem for the gem engine to work. Seeing as you updated this two days later, I'm guessing you restarted your app in that time. – Violet Shreve Jul 26 '13 at 23:50

3 Answers3

6

Restarting the webserver after installing the gem fixed it for me as mentioned by Jacob Evan Shreve

Rtype
  • 886
  • 11
  • 32
3

According to https://github.com/zaiste/foundation-icons-sass-rails/issues/9

In Rails 4 change this:

group :assets do
  gem 'foundation-icons-sass-rails'
end

to this:

gem 'foundation-icons-sass-rails'
user1515295
  • 1,181
  • 11
  • 28
0

The version 2 of this gem doesn't support Rails 4. You should use version 3. The reason it worked for you is probably that you're not running it in a production.

Vanuan
  • 31,770
  • 10
  • 98
  • 102