In December 2019 DHH wrote the post “Only 15% of the Basecamp operations budget is spent on Ruby” about how his company only spent 15% of their $ 3,000,000 annual budget on Ruby systems. Obviously he meant well. But as a Rails and Phoenix consultant I often see the fallout of those posts. Therefor I’d like to share some thoughts about the costs of running a Rails application.

This photo has absolutely nothing to do with the article. My kids baked them a couple of days ago. They were very tasty and Medium posts with a nice photo always get more traction. ;-)

Basecamp is not the baseline for a Rails company

Before talking about the numbers I’d like to point out that David has access to the crème de la crème of Ruby on Rails developers. Being the creator of Rails he and…

After watching Marie Kondo I asked myself while reading an nginx access log of a big webpage (the one about German Schulferien) if those log entries of the search engine crawlers spark any joy. The answer was no. I’m happy to have the bots as regular guests on my web server but the information of their visit is not important for me (your mileage may vary).

To achieve this in nginx you have to create a list of bots you don’t want to log and put it as follows in your /etc/nginx/nginx.conf

map $http_user_agent $log_excluded_ua { ~Googlebot 0; ~bingbot 0…

I’ve been using Ruby on Rails for a decade now and I still love it. But sometimes it is one of those love-hate relationships. I work as a consultant aka fire fighter to help companies with their Rails projects. Most times I help them fixing all sort out performance and high availability issues. I’ve seen the code base of a lot of different Rails applications. So I don’t just see the happy path but also a lot of not so happy campers. I even wrote books about Rails to help more Rails beginners.

This is me failing to light paint a “2019” with a sparkler. Seemed to be as easy as deploying a Rails application.

It took me a while to understand…

While checking and updating existing client’s data I needed to update URLs in their database. Very often they had http in it but the side has since moved to https. Other sides moved to totally different URLs and there were even a few which didn’t exist any more. Some entries lacked the http:// or www part because it was a legacy database with suboptimal validation. Time to do some housekeeping for those URLs.

I searched for “crawl” on unsplash.com and it came up with this photo by Alex Blăjan.

I needed a method which I can call with the existing URL and it returns the new URL or nil in case that URL doesn’t work any…

A tutorial to create a simple authentication for your Rails 5.2 application when gems like Devise are too big or too complicated to customize.

Background: Often I use Devise as the one-stop-shop solution. But lately I found myself (again) in a Rails application trying to find out how to customize Devise for the specific needs of that application. Just to realize that I would have saved so much time by just implementing the authentication from scratch by myself.

The groundwork for tutorial was done by Ryan Bates many years ago.

Important: This tutorial works under the assumption that the session…

This Medium post is a copy of Chapter 14 about caching from my “Learn Rails 5.2” book (Amazon Link, Apress Link) which was published in April 2018 by Apress. Please contact me in case you need consulting or training for Rails, Phoenix or WebPerformance.

Homepage: https://www.wintermeyer-consulting.de
Email:
sw@wintermeyer-consulting.de
Twitter:
@wintermeyer

Abstract

With the caching of web applications, most people tend to wait to implement it until they encounter performance problems. First the admin usually looks at the database and adds an index here and there. If that does not help, the admin then takes a look at the views and adds…

Most SEO consultants will run their tool of choice to give their new client a list of 404 pages which according to them have to be changed into 301 to save all the link juice (backlinks). It’s a low hanging fruit for them: They have minimal work with it because they use automated tools to generate it. The result paints a gruel picture of lost opportunities if the client does not move all 404s to 301s immediately. To them any 404 is a SEO coffin nail. Your Google ranking is doomed!

Their argumentation is so plausible: Every 404 loses incoming…

Secrets were introduced with Ruby on Rails 5.1 to make life easier for developers who need to store encrypted credentials or API keys in their repository. Many people were confused by the way it had to be done. It did include a couple of extra steps and an often unnecessary seperation of different environments. I have no opinion about this but I do agree that the new way of achieving it in Ruby on Rails 5.2 is a lot easier. DHH got rid of the secrets and introduced credentials (read his PR for more information).

Kudos to DHH and the…

As part of writing my new Learn Rails 5.2 book I had to update it’s install how-to for Debian and macOS. For something that seems to be so basic there is a constant stream of changes in the procedure (e.g. this time the dirmng package for Debian).

medium.com says that a story always should have an image. So here is a photo of my son climbing. You’re welcome. ;-)

I always use RVM to install Ruby. Why should you too?

  • You simply do not have any root rights on the system. In that case,
    you have no other option.
  • You want to run several Ruby or Rails versions that are separated cleanly. Maybe not today but for a future system upgrades it…

You’ve probably heard about Brotli. It’s an open source data compression library which can be used to deliver smaller compressed versions of HTML, CSS and JavaScript files. Think of it as a better alternative to gzip. It’s a big deal for anybody who wants to improve WebPerformance. To use it the browser has to support it (Chrome and Firefox already do) and the web-server has to support it. But Debian’s official Nginx doesn’t yet. There are a couple of hack-ish how-tos which describe how to compile a customised version but that is a safe way into admin hell. If you…

Stefan Wintermeyer

Ruby on Rails, Phoenix Framework, WebPerf and Photography. Father of two. German and English.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store