Rails Engine - Import file not found or unreadable: font-awesome

I made a super simple application for rails and used a font - great, no problem. Deploying this to perform the same actions on the rails engine causes the following error.

File to import not found or unreadable: font-awesome

I can not find a solution. If anyone has any suggestions on how to make this simple rail engine work with font - awesome, I would really appreciate it.

The steps to creating a rail engine and font settings are awesome ...

create a base engine with one model class for testing

rails plugin new testeng --full --mountable 
cd testeng
bundle install
rails g scaffold book title:string desc:string
rake db:migrate

add awesome font

edit testeng.gemspec and add sass-rails and font-amazing gems after turning on the rail pearl

  s.add_dependency 'sass-rails', '~> 4.0.3'
  s.add_dependency 'font-awesome-rails'

rename application.css to application.css.scss

cd app/assets/stylesheets/testeng/
mv application.css application.css.scss

// /testeng/application.css.scss .

@import 'font-awesome';

/views/testeng/books/index.html.erb

<h1>Listing books</h1>

<%= link_to content_tag(:i, '', :class => "fa fa-plus-circle"), new_book_path  %>

rails

cd <root-app-path>
bundle install
cd test/dummy
bundle install
rails s

http://localhost:3000/testeng/books

ERROR

File to import not found or unreadable: font-awesome
+4
2

font-awesome-sass:

gem 'font-awesome-sass', '~> 4.4.0'

:

bundle install

application.css.scss(app/assets/stylesheets):

@import "font-awesome-sprockets";
@import "font-awesome";

, , :

<%= icon('thumbs-up', 'It Worked!!!', id: 'my-icon', class: 'fa-5x') %>
+1

, :

Sass::SyntaxError at /
File to import not found or unreadable: font-awesome-sprockets.
Load paths:
  /home/user/shop_app/depot2/app/assets/images
  /home/user/shop_app/depot2/app/assets/javascripts

, , :

:

 gem 'font-awesome-sass'

gem 'font-awesome-sass', '~> 4.4.0'
0

All Articles