Rails4 with Foundation Icon Fonts 2 gem

2.1k views Asked by At

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?

3

There are 3 answers

0
Rtype On BEST ANSWER

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

0
user1515295 On

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'
0
Vanuan On

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.