CSS different locally and bit different on heroku - Rails - css

I have noticed that some styling is different on heroku and its different on my local environment. Basically on my local env i changed something aligned it properly but on heroku its the old version. I thought it was something that needed assets compilation again and used the below command but nothing.
rake assets:precompile
i have also cleared my cache on heroku
heroku run rake tmp:cache:clear
but it still does not work
any clues?

Related

NextJS stuck at compiling

All of my next apps are getting stuck at event - compiled successfully when I try and run them using yarn dev. Everything from existing apps I've used before to brand new apps I literally make just for trying this fresh.
I've tried deleting node_modules and yarn.lock, running yarn again, then running yarn dev. No dice. I also updated node js to latest and tried a few iterations of the above, including some with a 'yarn build` step to see if that did anything. No luck.
Assuming it's some kind of machine config that got messed up, but I can't for the life of me figure out what it is. Ideas?
replace with it in package.json
“dev”: “next dev -p 1234",

mup deploy works but image won't start

I'm deploying my Meteor app with mup from a Windows 10 box to a Digital Ocean VPS. Latest version of mup, latest version of meteor, app runs fine on Windows and the app deployed and ran fine before adding node-uber NPM. I see the following error in the logs when the app tries to start:
npm ERR! enoent ENOENT: no such file or directory, chmod '/bundle/bundle/programs/server/npm/node_modules/node-uber/node_modules/sshpk/bin\sshpk-conv'
Obviously the problem is with the backslash in the filename, but not sure where that is coming from or how to fix it. It isn't referenced in the package.json for node-uber. I've tried editting the package.json for sshpk on the Windows side, but that doesn't make any difference. I can't edit the file in the Docker container because the container keeps restarting and kicking me out.
Anyone have any suggestions on how to fix this, perferably permanently so I don't have to jump through hoops every time I deploy?
Actually manually editting the package.json file does solve the problem. Turns out I have multiple copies of sshpk installed because the parent NPMs are specifying specific versions as being required.
So the "fix" for this problem is the edit the "bin" section of the sshpk package.json file to flip the "\" to "/", save and rerun mup deploy.
Sigh...

Heroku Rails app, Bootstrap not loading from Bowerfile

Using Heroku to deploy my Rails application for some testing. Application deploys fine, however the Bootstrap is not loaded from the Bowerfile. To clarify, I have a Bowerfile in the main directory that contains asset 'bootstrap-sass-official'(when application is running locally, everything works as expected). I also have the 'bower-rails' gem installed, as well as the required line in the application.css file require 'bootstrap-sass-official'. I also have the rake assets:precompile running at the time of deployment with no issues. I have also tried running heroku rake bower:install which tells me to install Bower via npm, which I already have installed.
I have looked for solutions, but no luck. Help?

Rails 4: Sass raises SyntaxError when precompiling assets on server but not on development computer

Here is the error I get when running bundle exec rake assets:precompile on the server:
Sass::SyntaxError: Invalid CSS after "...5,255,255,0.9);": expected "}", was "!important"
(in /var/www/deploy/project/releases/20141230211654/app/assets/stylesheets/application.css)
(sass):15782
It also takes an unreasonably long time to precompile the assets on the server(Ubuntu).
On the other hand, Sass makes no complaints when I run the same rake task on my computer(Debian) and the precompilation takes a mere few seconds.
Why is this? I understand that there's a syntax error in the CSS, but why would my own instance of this Rails project not care about bad CSS syntax while the server does?
The difference was that I was not setting the environment on my machine to production.
So I should have been running:
RAILS_ENV=production bundle exec rake assets:precompile
I speculate that, in development, Rails merely concatenates unminified javascripts and css whereas the production environment does actual compilation using uglifier & sass, thus every part of the css gets parsed and errors get raised.

CSS not updating after Heroku deployments

I have read other questions with similar issues and tried their fixes to no avail
I have a 3.2.14 Rails app, where when I make changes in one CSS file followed by pushing the code to heroku, the specific CSS changes do not update. I have already tried:
-Verified that my git status is clean.
-- Tested in New Google Incognito Window for cache check
-- heroku restart
-- rake assets:precompile before deploying
-- Followed these instructions to specifically precompile in production environment
https://devcenter.heroku.com/articles/rails-asset-pipeline
-- Ran:
bundle exec rake tmp:clear
bundle exec rake assets:clean RAILS_ENV=production
bundle exec rake assets:precompile RAILS_ENV=production
Thanks for reading. Any guidance would be much appreciated.
Probably you have solved your problem by now. However I believe trying these commands in the following order would work.
$bundle exec rake assets:precompile
$git add .
$git commit -m "msg"
$git push heroku master

Resources