Skip to content
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

Change the path of assets #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jastkand
Copy link

@jastkand jastkand commented Jul 7, 2013

While migrating to Rails 4 I had an issue when the application couldn't find css and javascript files. Changing the path of assets fixed the problem.

I've tested fixed version of the gem on Rails 3.2.13 and it still works fine.

@acaron
Copy link

acaron commented Jul 4, 2014

@jastkand you forgot to change the .css extension to .css.scss

@bourgeois
Copy link

Yes, this would be greatly appreciated as we are also using this gem with Rails 4.

Thanks !

@acaron
Copy link

acaron commented Jul 4, 2014

@alessani I made a pull request #14 working with rails 4. The other pull request ( #11 ) was not working.

@jastkand
Copy link
Author

jastkand commented Jul 4, 2014

@acaron What do you mean by not working? Adding .scss extension is not necessary as sprockets can handle asset-url helpers in .css files.

@acaron
Copy link

acaron commented Jul 4, 2014

@jastkand see the document here: http://guides.rubyonrails.org/asset_pipeline.html "When using the asset pipeline, paths to assets must be re-written and sass-rails provides -url and -path helpers (hyphenated in Sass, underscored in Ruby)[...]"

and the answer here: http://stackoverflow.com/questions/15257555/how-to-reference-images-in-css-within-rails-4 "asset-data-url works for me after I changed my .css file to .css.scss file in a Rails 4 app"

Since it is sass-rails that provides helpers, it must be a .scss file. It was not working for me with a css file, it was interpreted as pure css. Hope this help!

@jastkand
Copy link
Author

jastkand commented Jul 4, 2014

Well, I see. It might be worked for me as I always were including .css files in .scss ones. @acaron's pull-request (#11) is much cleaner and is better to be merged. I fixed my version though.

P.S. Sorry I didn't noticed that everything is already merged and fixed 😄

@acaron
Copy link

acaron commented Jul 4, 2014

@jastkand ah! of course it was working then 😄 now the gem is up to date and we are all happy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants