UPDATE December 14th, 2018. This tutorial has been updated to target Dokku version 0.12.13. After reading this tutorial, you will be able to: Create your own server (droplet) on the cloud using the DigitalOcean cloud architecture. (I will also share with you a link that will give you $10 credit at DigitalOcean). Install your first […]
It may sound like a joke, but despite the strangeness of this post title, it’s actually a pretty serious matter, at least for us freelancers. Think about all the clients that depend on you for hosting their website. They probably don’t have a clue about how to manage their domain name, or what is a […]
Update February 13th: Join the discussion on Hacker News If you’re part of the Ruby On Rails community for a long time, you’ve probably read tons of articles about testing Rails application (less these days, though). Although there always have been diverging opinions on the matter, it seems the common wisdom was to say that […]
When Ruby on Rails was the most trendy thing in the web development world, I felt so cutting-edge! The coolest thing to develop with was Rails and I was developing with Rails. This meant I was the coolest guy living on the earth! Things have changed. Rails is still alive and strong, but it’s not […]
Now that we know how to setup a rails application using Dokku on a DigitalOcean droplet, it might be a good time to think about automating our database backups. If you haven’t read the first part, you should do it before reading any further. Sure, you can enable weekly backups of your whole droplet on […]
I know I sound like an old coot whose afraid of change, but there is something that doesn’t feel right for me with the new Single Page Application craze. It’s like all of a sudden, we’ve decided that web applications are crappy and that we want a return to traditional client/server applications. It’s a if […]
In the past I used to keep all files containing sensitive data (passwords, api keys and other secrets) out of my git repository. For example, I would add database.yml in the .gitignore file. Then I would put my database.yml on my production server in the « shared » folder. Finally I would ask capistrano to create a […]
TL;DR: Read the title 😉 I spent too many hours debugging a feature spec in an application. Turns out I was simply not paying attention to what I was doing! In a fixture file, I was setting a field the following way: some_date: I didn’t pay attention to the fact that “some_date” was a Date […]
It’s been a little while that I have decided to always extract my gem binaries into my rails application “bin” path. That way, I always execute binaries by specifying the relative path. For example “./bin/rails g model User”. At first I wasn’t sure about the idea. I was like: “Wait a minute! I will have […]
Hi (Oh my God… he just started his blog post with ‘Hi’), Did you know that as of Rails 3.1, you can have nested has_many :through clauses in your models? Here is a concrete example to understand what I mean: [ruby] class SportSchedule < ActiveRecord::Base has_many :gamedays has_many :games, :through => :gamedays has_many :results, :through […]