Sunday 10 February 2019

Programming on Windows

During the last four years, until the early part of 2018, I worked on a MacBook. Sometime in the second quarter of last year, I shifted to a Windows 10 laptop. The transition has been quite smooth and delightful.


There were two Rails applications that I had to write and maintain. The first application, let's call it webapp-1, was coded by me in 2016 using Ruby 2.3.1 p112 and Rails 4.2.6. The second application, hereafter referred to as webapp-2, is a new application that I had to write from scratch, so I chose the latest versions: Ruby 2.5.3, Rails 5.2.1.

For both these applications, the database was MySQL, and I decided to install the latest version, i.e., 8 running on Windows. The MySQL installer tools make the installation and configuration very easy and I could bring up MySQL quickly.

I started setting up the Rails environment for webapp-2 first. The installation program for windows that I downloaded was rubyinstaller-devkit-2.5.3-1-x64.exe. I ran it, selected MSYS2 and MINGW development toolchain option and the installation went through smoothly. I installed rails gem with the following command
> gem install rails --version 5.2.1

But then, when I started the rails server, I ran into a library issue. In the browser, I accessed localhost:3000 and I got a nasty looking error:
Authentication plugin 'caching_sha2_password' cannot be loaded: The specified module could not be found.