Moving from AWS to Render
Tosbourn
by
1M ago
We recently worked with a client who wanted to move their Ruby on Rails application from AWS to Render. In this post I will cover everything we did to start up on Render, move everything across, and turn off things on AWS. As with most things technical, there is always a hefty amount of “it depends” when making decisions. What I describe in this post is just how we did it with the setup we had and the context we were working in. You might have a slightly different setup or context, but hopefully this will serve as a baseline. Why move from AWS to Render Anyone who has worked in startups will k ..read more
Visit website
Purging DNS entries
Tosbourn
by
1M ago
When making DNS changes, you can speed the process along by clearing some of the popular public DNS caches that exist on the internet. This might be old news to people, but it was brand new news to me, so I’m sharing in case this is useful to anyone else. Here are the ones I’ve recently learned about. one.one.one.one/purge-cache cachecheck.opendns.com developer.google.com/speed/public-dns/cache Each service has a slightly different form, but essentially you tell it the domain to remove from it’s cache, an act called purging, and hopefully this means the internet will see your DNS changes a b ..read more
Visit website
How to speed up Rubocop
Tosbourn
by
1M ago
Recently I’ve noticed that when I run Rubocop it seems to hang for ages before eventually running. This is not ideal when time could be better spent. I had a look online and found this StackOverflow question with someone who had the same issue, which they ended up kindly answering as well. I put the following piece of configuration at the top of my .rubocop.yml file and it solved the issue: inherit_mode: merge: - Exclude This means that it won’t analyse files it shouldn’t i.e. node_modules ..read more
Visit website
Decoupling Git and my Jekyll work
Tosbourn
by
1M ago
I’m experimenting with a new way of using version control on this Jekyll-powered website, I thought I’d share in case it was useful for someone. I will state the problems, what I used to do, and what I’m going to try out. The problems I have one article I want to write at any given time, but sometimes that article can take days to write and in the interim I might have small tweaks, or different articles I want to get out. I also want to have articles scheduled to be posted at a date in the future. Finally, I have several articles that I want to have in a draft state. These aren’t the main thin ..read more
Visit website
Updating payment method email addresses in Stripe
Tosbourn
by
1M ago
There currently isn’t a way within Stripe’s dashboard to update someone’s email address against a payment method. You can update the email address against the customer record, but there will be data in some webhooks that will include the email from the customer’s payment method. To update the payment method email address you need to use the stripe CLI. There is one command to run, but to run it we need three bits of information; The ID of the payment method, you can get this from the dashboard when you look up the customer, it will look like pm_123AbC… The new email address you want to be ref ..read more
Visit website
Finding out what called a Ruby method
Tosbourn
by
2M ago
Sometimes when we’re debugging some Ruby code, it is good to know what code has called the method we’re looking at. It is something I routinely like to know. There are a few different ways we can go about this, but the one I reach for more often than not is the Ruby kernel method caller. From the above-linked documentation, caller; Returns the current execution stack—an array containing strings in the form file:line or file:line: in method. I like it because; It is built into Ruby, so no additional gems needed It is easy to learn how to use it I think the best way to talk about this method ..read more
Visit website
How we helped Turas
Tosbourn
by
3M ago
We’ve been volunteering our time with a local Irish language charity called Turas (we have more about Turas on our client page). You could boil down our contribution to “help with the website”, but what does that mean in practice? In this article I wanted to share some of the things we’ve done recently to help them, to highlight that often the value a technical person brings to a project isn’t just code. In fact sometimes it isn’t even code. You might think that us writing about this very specific project won’t apply to your work, but I bet there is more overlap than you’d initially think. Mee ..read more
Visit website
Getting more out of Plausible
Tosbourn
by
4M ago
We’ve been using Plausible analytics for about four years on our site. It gives us lightweight, privacy focused analytics which as a business we use to see what articles attract new customers and get a general sense of how well our web presence is doing. I love Plausible. If you’re using Plausible, or are thinking about switching over to it and want to get the most out of it, you might enjoy some of the optional steps you can take to get a little bit more information into Plausible. Nothing we’re sharing today is a secret, they are all in the docs, but Plausible are constantly adding new featu ..read more
Visit website
Creating draft posts in Jekyll
Tosbourn
by
4M ago
If you want the ability to write an article over the course of a few days and ensure it’s version controlled but not publicly visible, here’s where drafts come in useful! You will want to create a folder called _drafts/ in the root of your project. In that you can place your draft article using the same naming convention as you would for something in your _posts folder (i.e. 2024_04_30_my_article.md). This will ensure the article doesn’t show up on your site. To work on a draft article locally run jekyll serve --draft, this will show your draft article so you can view it locally on the fronten ..read more
Visit website
Forcing a Rails database column to be not null
Tosbourn
by
5M ago
When creating models in Ruby on Rails, there are a few things to think about. One of them is which bits of data should be required in order for the model to be worth while. Today I’m going to show you the different ways you can set something to be required at a database level and introduce you to change_column_null. Not null constraint Before we get into the Rails bit, I want to talk about “null” and “not null constraint”. Null, often written in all caps like NULL is the database equivalent to nil which we see in Ruby code. It means there is nothing there. Not to be confused with 0 or "" which ..read more
Visit website

Follow Tosbourn on FeedSpot

Continue with Google
Continue with Apple
OR