-
Journey to Jekyll: Part 9 - Upgrading to Ruby 2.6
I have used Jekyll since Christmas 2016 and have never updated it since it worked fine for me. Just over a year ago, I tried to update to Ruby 2.7 when it was brand new and ran into a few errors and backed off for a while. In fact, I have been running Ruby 2.2 on my computer only for my Jekyll site. Finally, I decided to move up to Ruby 2.6 at least.…
-
Journey to Jekyll: Part 8 - Speeding up the Site Part 2
In Part 1 of Speeding up the Site, we optimised some images and removed AddThis. In this post, we try to optimise all the images before we push the site.…
-
Journey to Jekyll: Part 8 - Speeding up the Site Part 1
I started on the site around Christmas 2016 and have been adding things to it over time, assuming that a static site with very little Javascript and nothing special on it other than content and the necessary images would be quite fast (and it feels that way where I am). For some other work, I was looking at general principles for speeding up sites and decided to run a page speed test on my site also just to get a feel of some numbers.…
-
Go home on Windows
People from the Linux/ UNIX/ MacOS world wonder about the
HOME
on Windows and this came up in a Twitter thread recently.…
-
Ruby Tricks 8 - Solving Bundler Certificate Errors
In the Ruby world, Bundler is fantastic when it comes to dependency management. But sometimes, when you use it, especially for an older Ruby version, you might run into certificate errors. Here’s one way to fix that.…
-
Android Studio on Windows: Day 0 - Install and Hello World
In this post, we look at the steps required to run Android Studio on Windows 10. My main reason to do so is to build some simple apps and to also try to use JRuby on Android with the Ruboto project.…
-
JRuby on Windows: Day 2 - Creating Executable JARS
A common question in the Ruby world (especially from newbies) is to wonder how to produce a stand-alone executable that can be distributed. Ruby is inherently an interpreted language and currently there are a few ways to create an executable but none that are supported out of the box. One method to achieve this is to use JRuby and a tool called warbler to package your code into a Java Archive (JAR) file that can be run on any system where you have Java (i.e., a Java Virtual Machine set up). Let’s see how to do this for a Ruby project.…
-
Journey to Jekyll: Part 7 - Redirect HTTP to HTTPS on IBM Cloud/ Bluemix Staticfile Buildpack
This site is set up on IBM Cloud and built using Jekyll. The previous posts in the Journey to Jekyll with IBM Cloud/ Bluemix have covered bits about getting started. In the previous post in this series, we saw how to secure the site using an SSL certificate from ZeroSSL.…
-
Ruby on Windows: pik to run code with a specific Ruby version
Ruby has an important release every year on Christmas Day. As a result, it’s very likely that over a period of time, you will have a few important versions of Ruby installed on your computer. Every time you install a new version with big changes, you invariably end up with the need to run an old program with an older version because of a dependency or deprecation (or just caution, in some cases).…
-
Recipe/ Notes about making a delicious grilled cheese on toast
I don’t cook a lot but sometimes, I find a recipe that looks easy to follow, is fast and is delicious. I found this video on YouTube about making a better grilled cheese toastie (or as the comments insist, a ‘grilled cheese on toast’). Whatever you want to call it, I tried making it and it tasted great and my son loved it. I have watched the video a couple of times and strongly recommend you to watch it also. Once you’ve done that, this post will make more sense and has a nice little picture to remind you of the details.…
-
Ruby Tricks 7 - Updating bundler default version
It’s generally a good idea to keep your gem installation clean and you can do that by doing
gem cleanup
orgem cleanup [GEM_NAME]
which will remove the older versions of the gem. Of course, some times, you have applications (or other gems) that rely on a specific version – so, you need to keep those (or re-install them using bundle install).…
-
Portable setup for PostgreSQL on Windows
The normal method for using PostgreSQL on your Windows machine is to download the installer and then set it up. It’s easy and will do all the necessary things that you need for it. It will also set up services and other things that you might need. On the other hand, if you’re someone who uses PostgreSQL only some times and do not want it running all the time, or if you want to use different versions and want to have them switched on from time to time, or if you just want a portable setup that you can copy to any computer and get it running, then this post is for you.…
-
Ruby Tricks 6 - Solving FileUtils Warning: already initialized constant
I spent a few hours fighting this because I was not paying attention to the warnings but I learned a couple of things along the way, so I decided to put this in a short post so that I remember it for next time!…
-
Ruby 3.0 on Windows: Day 0 - install and Hello World
Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write (from the Ruby web site). On Christmas Day 2020, the core team released version 3.0 with major improvements and new features. Now that RubyInstaller 3.0.0-1 has been released it’s a good time to set it up on Windows and try the features of Ruby 3.0. This post will help you get started with Ruby 3 on Windows, and covers the basics of installation. This post is along the same lines as the JRuby Day 0 post from earlier.…
-
10 + 1 Tips for Beginners who are Starting Out
I noticed and responded to a Tweet that simply asked – what tips would you give to beginners who are just starting out (in coding/ programming)?…
-
Using ActionMailer outside Rails
I normally use Ruby directly for sending e-mail from scripts that need to send out status, etc. I was recently looking at the ActionMailer code that we have in a Rails project and I felt that it is very complete and provides a lot of additional support, especially when working within the context of a larger system (Rails or not).…
-
Rubymine and RuboCop complain - no such file to load
When using Rubymine with RuboCop in a slightly complex Ruby project, you might occasionally see an error like this which you feel is strange since the path in question is available to your Ruby program since the $LOAD_PATH is changed within the script.…
-
Exporting a List of Installed Programs in Windows 10
At long last, I am changing my PC – moving up from my old workhorse to, well, a newer work horse. However, it usually takes me a few weeks to get my new computer set up. Over the (past 20) years, I have ended up customizing my Windows PC in a certain way that I think helps my productivity. This means that I expect a lot of software to be there on my PC and certain things to be configured in specific ways.…
-
Git Notes #01
These are two short notes to remind myself about how a couple of things in Git work.…
-
Navigate to a command file's directory in Windows CMD Shell
I use Ruby a lot on Windows and it’s quite common to use a simple Command file to launch the script, especially when scheduling it using something like Windows Scheduler or PyCron. When launching a Command script in Windows, it will usually have an empty environment and will launch in something like
c:\windows\system32
instead of the directory where the command scripts is. Often, it’s quite useful to move to the directory of the script so that everything works with relative paths.…