How We Moved Rails Development to Windows WSL2 Linux

July 29, 2020


Up till now we had been developing Rails 6 applications on linux using VMWare on a windows laptop. But now with the general availability of WSL 2, we can retire the old laptop and do everything together in one place. Given that WSL 2 does not currently support GUI applications, we cant expect to replicate the Pepermint distro that was so nice to use. Instead we are taking the opportunity to retool to use VS codeOur toolset uncludes “Git”, “Rails”, “PostgreSQL”, and deployment to “AWS Beanstalk” ... Read more

Moving Rails Development to Windows WSL 2 Linux

November 3, 2019


New Opportunity: Linux on Windows via WSL 2With the now general availability of WSL 2 on Windows 10, it has now become possible to run Linux desktop on a Windows PC without the need of a Virtual Machine. WSL 2 is the 2nd iteration of the Windows Subsystem for Linux, this time with a Linux kernel. We can already utilize WSL 1 with the availability of Bash shell which is vastly superior to the command window (Cmd). ... Read more

Upgrade to Ruby 2.6 on Linux

February 26, 2019


To be ready for Rails 6 upgrade we needed to install Ruby 2.5 or above, so we went for ruby 2.6.1 Up till now we had been running Rails 5.2.2 on Ruby 2.4.1. So here are the steps we took:- update ruby version in /.ruby-version file Intall Ruby 2.6 $ sudo apt-get update $ rvm get stable --autolibs=enable gpg: Signature made Sun 30 Dec 2018 10:44:46 GMT using RSA key ID 39499BDB gpg: Can't check signature: No public key Warning, RVM 1. ... Read more

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 Tempfolder. It’s time to do some clean up. Run Disk Usage Analyser toidentify where the problems are: usr/srcfolder - 2.4 GB, contained folders like linux-headers-3.13.0-32 that go back years. home/.rvmfolder grew to 6GB, in which the worst offender was the current gemset, at 2. ... 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. see also: [Moving Rails Development to Windows WSL 2 Linux] (/post/moving-rails-development-to-windows-wsl2-linux/). 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: The process is now faultless: “Deploying Versions with Zero Downtime”. Here is what we did: STEP 1) Take a DB snapshot. STEP 2) Duplicate the environment in AWS management console, using the DB snapshot just created. ... 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: It is not possible to retrieve the logs - also due to an execution timeout. It is possible to SSH to the EC2 server but looking around the logs it appears everything is rolled back. ... 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

© 2020 Keith P | Follow on Twitter | Git