Rails 5.2: encrypted secrets

March 22, 2018


How we started to use Rails 5.2 Encrypted Secrets for securing Amazon S3 key pairs for use with Active Storage. Here is a useful starting point: Rails Encrypted Credentials on Rails 5.2 Our development and production envionment is Linux, and we precompile our assets before deployment. Part 1: Encrypt your secrets With Rails 5.2 a sort of ‘password safe’ is introduced, whereby you commit your encrypted secret credentials to source control, but not your master password. ... Read more

Ubuntu running low on disk space

June 11, 2016


Warnings have been popping up with increasing frequency that the disk space is running low on Ubuntu running on VMware Workstation 12 Player. Even creating a backup failed due to lack of space in the Temp folder. It’s time to do some clean up. Run Disk Usage Analyser to  identify where the problems are: usr/src folder - 2.4 GB, contained folders like linux-headers-3.13.0-32 that go back years. home/. ... Read more

Scaling down to single instance Elastic Beanstalk.

April 13, 2015


When you are looking to reduce your AWS costs, you might consider removing the Load balancer. At $20 per month it accounts for a large proportion of the hosting costs for a small application. Is it really needed right now? Down the line when your application grows, you can easily bring it back - right? Elastic beanstalk is handy for provisioning and deployment, and thankfully the load balancer is not compulsory. ... Read more

Moving Rails development from Windows to Linux

February 23, 2015


Recently we embarked on a new feature requiring a gem that is not compatible with Windows. To re-quote a quote from https://meta.discourse.org/t/bundle-install-fails-on-windows/6494 : “The reality is that Ruby, as used by most Rails apps is full of unixism, performance of Ruby MRI (the default Ruby) on Windows is abysmal, Rails load times are hellish, sooner or later (more likely sooner) you are going to hit gems that simply do not work properly on Windows. ... Read more

Deploying versions with zero downtime ( 2 months later )

October 7, 2014


Again, two months, almost to the day since we last hit problems with deployment, we are here again. Up till the day before, deployments worked fine if a little slow, but now they fail with a timeout. The site is running okay but remains at that version: “Update environment operation is complete, but with command timeouts. Try increasing the timeout period. For more information, see troubleshooting documentation.” It is not possible to retrieve the logs - also due to an execution timeout. ... Read more

Deploying versions with zero downtime

July 24, 2014


Two months, almost to the day since we last hit problems with deployment, it looks like we are here again. Up till the day before, deployments worked fine if a little slow, but now they fail with a timeout. The site is running okay but remains at that version: “Update environment operation is complete, but with command timeouts. Try increasing the timeout period. For more information, see troubleshooting documentation.” It is not possible to retrieve the logs - also due to an execution timeout. ... Read more

Bootstrap-sass upgrade for Rails on AWS

June 5, 2014


We recently spent a little time replacing blueprint with twitter bootstrap - precompiled with sass. It looks great. When it came to deploying to Elastic Beanstalk, we hit a few unexpected issues. Here is what we did to get it working. We are running on the 64bit Amazon Linux 2014.03 AMI. The up to then prerequisite nokogiri v 1.6.1 gem was already installed and working fine. The problem came with bundle install requiring nokogiri v 1. ... Read more

© 2018 Keith P | Follow on Twitter | Git