rake assets:precompile bug with rails and compass and "*" - css

I use rails 4.2.0 and compass-rails (2.0.2)
I have a css.scss file with
#import "compass/utilities/sprites";
#import "icons/*.png";
#include all-icons-sprites(true);
I have many image .png in app/assets/images/icons/XXX.png
I want deploy my app in production, it's work but with no assets, so I start
rake assets:precompile
in production environement.
An error occure:
rake aborted!
Sprockets::FileNotFound: couldn't find file 'icons/*.png'
I try to remove assets files in cache, nothing change.
details error: http://pastebin.com/6ggS3pP2
I think there is a problem with wildcard and path.
I try in dev ENV, nothing change...
I don't know what do more, what's the solution, plz?

to fix it, I just use mster branch of git like :
gem 'compass-rails', github: 'Compass/compass-rails'

Related

rails precompile assets see error in which file

I trying to precompile assets in production using
rake assets:precompile --trace RAILS_ENV=production
its says that there is syntax error like
Sass::SyntaxError: Invalid CSS after "white-space": expected ";", was
": nowrap;"
but there is no info that in which file.
is there anyway that I can see that about which file its talking about.
its assets / stylesheets/ application.scss file . just find white-space and you will get to the exact line.

syntaxt error on rake asset precompile for production

I am trying to push my app to heroku,
When I am doing $ bundle exec rake assets:precompile RAILS_ENV=production RAILS_GROUPS=assets
I am getting
rake aborted!
Sass::SyntaxError: Invalid CSS after "...overflow:hidden": expected "{", was ";width:100%;hei..."
(sass):6888
Not able to figure out the exact issue here. Can someone help me out.
It seems like you're missing the semicolon after overflow:hidden, it would help if you pasted your actual SASS/SCSS file!

Heroku/Zurb Foundation Sass SyntaxError in Rails App

My app is throwing this error when I try to push to Heroku. It looks like the culprit is a rogue !global line in a stylesheet somewhere, but I'm not sure where the source code lives.
rake aborted!
Sass::SyntaxError: Invalid CSS after "...odules, $name) ": expected "}", was "!global;"
(in /tmp/build_6cf14c02-e49b-44e7-819c-871d5da3cf73/app/assets/stylesheets/framework_and_overrides.css.scss:13)
Would greatly appreciate any help.
Change your foundation-rails gem from 5.4.4.0 to 5.4.3.1 in your gem file
gem 'foundation-rails', '5.4.3.1'
then run
bundle update
This should do it for now tell they fix it :)
Additionally:
As for finding the file "bundle show foundation-rails" use the finder "Go to folder" to the path and find "_function.scss" it is under vendor assets stylesheets foundation _function.scss
Both of my answers could be found in the link by gustavo-beathyate
As for heroku error
make sure if your adding any thing to the assets to use
rake assets:precompile RAILS_ENV=production
and then
also when you push use -f
git push -f heroku master
if not only use
git push -f heroku master
Here's a solution:
http://foundation.zurb.com/forum/posts/19222-sass-syntax-error-on-rails
You basically have to open the gem and modify line 13 in _functions.scss, removing the call to !global.
This issue has now been fixed with v5.4.5 of Foundation. See also here for some more background on the issue.
I was getting your exact error after I upgraded to foundation-rails 5.5.0.0. I updated the sass-rails gem per this post: https://stackoverflow.com/a/27807138/1753903 and the error went away.

Sass --watch not updating css

I've installed Sass and set up a folder with an index.html file and style.scss in my local server (In Ubuntu 13.04).
I type this command into the terminal:
sass --watch style.scss:style.css
And get this output:
Sass is watching for changes. Press Ctrl-C to stop.
LoadError: cannot load such file -- rb-inotify
Use --trace for backtrace.
Sass will update the css the first time I save my .scss file but after that nothing. Anyone know why?
You need to install rb-inotify gem:
gem install rb-inotify
Its more of code editor issue. I faced this issue with brackets and once I switched to Atom (just to test) sass started writing on css file real time.
Tried with both sass --watch sass:css (Directory based watch) and sass --watch sass/app.sass:css/app.css (file based), and both worked fine.

SASS with normalize and Codekit

When I'm trying to compile my project that include only
#import "normalize" from compass-normalize gem it tells me
thie error
Compass was unable to compile one or more files in the project:
LoadError on line 161 of /Applications/CodeKit.app/Contents/Resources/engines/compass/bin/../lib/compass/configuration/data.rb: no such file to load -- compass-normalize
Run with --trace to see the full backtrace
okey. So I have reinstalled all gems but it still doesn't work. What is more when I'm doing compass watch in command-line it works! And actually it compiles... what's wrong with codekit than?
Are you sure you have that specific gem? If not, you could try:
sudo gem install compass-normalize

Resources