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
Related
It hangs on the check_changes step at this command:
Command: cd /home/myproject/repo && git diff --name-only HEAD
With this output in terminal:
DEBUG [c3f0a05b] content/plugins/akismet/views/notice.php[m
DEBUG [c3f0a05b] :[K
A couple notes which may make this case unusual:
This is deploying a WordPress site.
WordPress core and plugins were (mistakenly) updated on the server using wp-cli so that production code and repository would be unsynced.
Solution turned out to be simple. But it required a lot of useless googling before I finally figured it out by trial-and-error. Posting this as a reference for others who may find themselves in this situation.
The fix was to ssh into the server and remove the repo directory from the project root:
cd /home/myproject
mv -v repo /tmp/cap-repo
After this, I was able to run the cap deploy command successfully.
I would be interested in hearing an explanation for the [m and :[K output.
I am trying to install assets on my sylius project, and I am facing problem :
COMMAND: php app/console sylius:install:assets
ERROR AFTER EXECUTING COMMAND: This command terminated with a permission error
I found solution of a problem, before you guys try to install assets be sure to clear cache, but you might get into a trouble with memory, so edit your
app/console file and add ini_set('memory_limit','-1');
and after that run cache clear, and install assets and everything will be fine :)
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?
I have been trying to deploy my Symfony2 project in Openshift with 1 small gear. My plan was to execute composer update once I finish pushing my codes into the server. Unfortunately an error keeps telling me that there is not enough memory to execute the command.
So I thought of unignoring the bundles that I needed in the vendor folder by removing them from the .gitignore file but still it doesn't get included in the commit.
Composer is known to consume a lot of memory. You should build you're project (composer update, php app/console assetic:dump, ...) and then push it to the server. Take a look at Jenkins, it's great tool.
Anyway if you want to force tracking of ignored files you can use the git add -f command.
You should only update composer in dev, for the prod server use: composer install (you need to have composer.lock under version control)
This is common problem connected with insufficient memory on the server. The solution is to add swap partition, so that you have enough memory to complete the update.
free -m
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024 // 1GB, or
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=2048 // 2GB
/sbin/mkswap /var/swap.1
/sbin/swapon /var/swap.1
Once you have added the swap you may run the update command, and it will complete successfully
I have an inherited small rails website. I tried to do a change on a css file, only to find that rails gives me an error page (code 500) with the following error:
No such file or directory - /.../cache/assets/sprockets%2F1450c8f5d2b6e201d72fa175586bbd9720131025-15645-1c0s8zd.lock
I've tried:
Restarting rails server
Rebooting my computer
Clearing the assets cache
Clearing tmp
Turning down the server > rake assets:clean > rake tmp:clear > restarting server
The only solution that frees the error is deleting the changes I've done.
I honestly have no idea were to start looking, so if someone can give some pointers It'd be great.
Try to do in rails console
Rails.cache.clear
or run in root directory
rake tmp:clear
Run this in your console:
bundle exec rake tmp:clear
bundle exec rake assets:clean
bundle exec rake assets:precompile
Hope this helps!
Stupid mistake on my part: rake assets:precompile was failing because I didn't have write permissions to the tmp folder.