New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make it work with Rails 4? #45

Closed
firedev opened this Issue Aug 8, 2013 · 6 comments

Comments

Projects
None yet
3 participants
@firedev

firedev commented Aug 8, 2013

Hi,

Am I doing something wrong? I have added the gem, but @import complaints:

File to import not found or unreadable: font-awesome.

In fact none of the gems that are using SASS work with Rails 4. So I just keep files in vendor/assets.

@balexand

This comment has been minimized.

Collaborator

balexand commented Aug 8, 2013

@firedev Try using a Rails Asset Pipeline require statement instead of a SASS @import.

Like this in a SASS file:

#= require font-awesome

Or in an SCSS file, use:

//= require font-awesome
@rmm5t

This comment has been minimized.

Collaborator

rmm5t commented Aug 8, 2013

@firedev What was the full name of the file that you were trying to @import from?

Our test suite has integration tests for these exact scenarios, and they're currently passing on Rails 4, so I'd like to understand your use-case a little better to see if we need to add tests for other use-cases.

@firedev

This comment has been minimized.

firedev commented Aug 8, 2013

Hmm, since I am extending FontAwesome selectors in my SCSS I need to rely on @import. I need FontAwesome classes to be available in my code, that's the whole point.

The file I am @importing everything from is app/assets/stylesheets.css.scss

@rmm5t

This comment has been minimized.

Collaborator

rmm5t commented Aug 8, 2013

@firedev Yeah, I'm a bit at a loss here. Here's what our test case file looks like (scss-import.css.scss)

@import "font-awesome";

And our associated integration test:
https://github.com/bokmann/font-awesome-rails/blob/master/test/font_awesome_rails_test.rb#L47-L50

@firedev

This comment has been minimized.

firedev commented Aug 9, 2013

Hmm sounds like some sort of evil magic, I have created a new Rails app - it works. Doesn't work inside the one created a couple of weeks ago.

Comparing environments now...

@firedev

This comment has been minimized.

firedev commented Aug 9, 2013

Okay I am an idiot, public apology. Forgot to restart the app after bundle

@firedev firedev closed this Aug 9, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment