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:
- If it’s bundled in a
Gemfile, update the gem itself:
$ bundle update eventmachine
- 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”
I had to install the Puma using Bundler for Ruby 2.2.1 installed via RBEnv.
That was failing, however, giving me errors related to OpenSSL.
The issue was reported with a workaround. To install the Puma gem and make sure it is linked properly with OpenSSL, run the following:
gem install puma -v 2.13.4 -- --with-opt-dir=/usr/local/opt/openssl
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”
Nowadays, your Web app likely needs security and encryption with SSL. Once your SSL certificate and Web server are set up, one good way to ensure SSL is used is to redirect all HTTP traffic to HTTPS.
In the world of Ruby, I’ll explain how to do it for any application running with Rack or anything built with Ruby on Rails. Your Ruby on Rails application is probably running on top of Rack anyway, so the odds are you just need one of the two methods below.… Continue reading “Rack & Ruby on Rails: Force SSL”