Articles tagged 'postgresql'

I'm dusting off an old post this evening, since I've spent the entire day coding in Rails on a new side project. As it happens, I had the opportunity to test-drive this article to see if it still works, and it does! For bonus points, it nearly works with Rails 5-rc1, too, which is what I ended up playing with for most of the day. I've run out of time now, but sometime in the next few days, I'll update this article for Rails 5, switching from unicorn to puma — since that's what Heroku now recommend — and trying out Bootstrap v4! But meanwhile, if you've got the opportunity to bootstrap a new greenfield Rails project, give this a shot. Read more…

Today we're going to explore how to bundle up a sample Ruby on Rails application into Docker images, run containers locally in our development environment, and link the containers together so they can talk to each other. On the way, we'll automate the build with Rake, and discover a little more about how container linking actually works. Read more…

Today we figure out a novel approach to the materialised path pattern for representing hierarchical data in SQL. It takes advantage of PostgreSQL's native support for array types. But it also poses a question: can we make use of ActiveRecord's preloading machinery for eager loading these trees? Read more…

launchd is Mac OS X 10.4's replacement for init, cron, (x)inetd and all the various startup bits like /etc/init.d or /Library/StartupItems (as was the preferred way in Mac OS X up to 10.3.x). It's all replaced with one supervisor daemon which controls the startup (and restart upon failure) of daemons, schedules regular running of tasks and other hoopy things. I've been reading a little about it at Introduction to Tiger Terminal part 5 and Getting started with launchd trying to figure out how to make it work for me. And I came up with settings, that will launch the Darwin Ports copies of both MySQL and PostgreSQL on demand, which you can download here: mysql4.plist and postgresql.plist. Place those files in /Library/LaunchDaemons and, to get launchd to notice them, run the following: Read more…