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!
Related
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.
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'
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.
Here's what I did already before thinking this is a duplicate.
I let heroku do the rake assets:precompile
I did it locally, added it to git and pushed
None of these worked? I am thinking maybe Heroku somehow cached the assets which doesn't make sense to me but I have no other ideas at this point. Is this cache idea really possible on Heroku?
As far as I know Heroku doesn't cache any assets.
Try to run the following:
rm -rf public/cache
git commit -am "Removing cache files"
git push heroku master
If it doesn't work try this:
rm -rf public/cache
RAILS_ENV=production bundle exec rake assets:precompile
git add public/cache
git commit -am "Updated Compiled assets"
git push heroku master
You've probably already read Rails Asset Pipeline on Heroku Cedar, if not check it out.
Hope it helps.
Simple question:
I've got a Rails 3.1 app running in staging, which is RAILS_ENV=production. My problem is this: stylesheet_link_tag produces a different fingerprint for my css files than the fingerprint that was produced by rake assets:precompile.
So when I request a page, the link to the stylesheet is looking for a file like:
/assets/front-1e3a4454e0d5434eccac1a053ca4c7fd.css
but in reality the file sitting in public/assets is
front-60b624d69d97b3ac5f288c54245a5ed5.css
and the browser returns a 404 Not Found.
Here is my linlk stylesheet_link_tag :front. Can anybody explain to me why this happens?
I've been having the same exact issue. Best I can tell, this occurs when the precompile task runs during a capistrano deploy. I've had to remove the precompile from deployment and run the
rake assets:precompile RAILS_ENV=production from the release directory after the app has been deployed. It's a pain if you're pushing code frequently.