Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialKurt L
22,856 PointsShould I restart Unicorn after a git pull?
I have a Rails website live on the Internet with Nginx and Unicorn on DigitalOcean. :) But when I git pulled changes into my VPS, all my CSS disappeared (except for Bootstrap, which was provided by CDN), and changes to the text in the updated HTML files were not reflected on the server either. My solution sadly was to create a new droplet and start over. It's back on the web, but I hesitate to git pull any changes now, fearing that my styles will disappear and the HTML text will not be updated. What is the protocol here? I tried restarting Nginx, but that didn't work.
2 Answers
Jay McGavren
Treehouse TeacherI'm guessing your Nginx just needed a restart, which rebooting the server would have done. From now on just restarting Unicorn using the directions in the video should work.
/etc/init.d/unicorn_stories ...
and/or the service
command won't work unless you personally have created or symlinked an /etc/init.d/unicorn_stores
file (which I don't believe is covered in any of these workshops). I would recommend just sticking to the setup you have now, at least until you've completed our Deployment with Capistrano workshop.
Jay McGavren
Treehouse TeacherGenerally speaking you're going to want to restart Unicorn every time you deploy new code, yes; pretty sure the changes won't be picked up unless you do.