Fix eventmachine gem install error on OS X

In Ruby, eventmachine is a common gem containing an event-processing library. While most gems are written in Ruby, this one has bits that need to be compiled during installation. That’s why we call it a “native gem.”

Some people reported problems installing eventmachine in OS X. Fortunately, the fix is simple. There are two things to try when that gem cannot be compiled and installed:

  1. If it’s bundled in a Gemfile, update the gem itself:
    $ bundle update eventmachine
    
  2. If the above didn’t help, tell Bundler which OpenSSL library to use when compiling the gem:
    $ bundle config build.eventmachine
Continue reading “Fix eventmachine gem install error on OS X”

OS X Yosemite: Fixes for developers

Apple released OS X Yosemite to the public for free yesteday. So far, it isn’t bad. But, as a Web developer, I’ve hit a few bumps on the way, even during installation. Hopefully, if you’re a developer too, you’ll be wiser than me, do some research before installing, and maybe then this article will be of use to you.

This list isn’t meant to be exhaustive. I’m simply a Web developer often writing in Ruby nowadays, and I wish other Web developers will get back on track fast if they encounter the problems I have.… Continue reading “OS X Yosemite: Fixes for developers”

OS X, Homebrew, PostgreSQL: Work around false running report by launchctl

Logos of OS X, PostgreSQL, and Homebrew.

You have PostgreSQL installed with Homebrew on OS X. After you restarted your Mac, somehow Rails or other apps using PostgreSQL will report the server is not running while trying to start it with launchctl will say otherwise.

Turns out, the .plist file used by launchctl is only checking for the existance of the .pid file written by PostgreSQL when starting up. If you don’t shut down PostgreSQL before restarting the computer, that file will stay there. When your Mac starts up again, launchctl will see that .pidContinue reading “OS X, Homebrew, PostgreSQL: Work around false running report by launchctl”

OS X: Enable write support for NTFS partitions

OS X Mavericks can read NTFS partitions. They are mounted as read-only by default. But it turns out the OS can also write to those volumes. To do so, follow these 3 steps:

1. Get the name of the NTFS volume

Plug in your external hard drive which has the NTFS volume. As OS X will automatically mount it, an icon for it will appear on the Desktop or in Finder’s sidebar under “Devices.”

Note the name of that volume and its capitalisation.… Continue reading “OS X: Enable write support for NTFS partitions”