Install RMagick 2.13.2 in macOS Sierra

Homebrew is usually pretty good at installing ImageMagick and I was wondering why it threw the following error when I tried to configure an old Rails project in macOS Sierra. I had run brew install imagemagick before installing the RMagick gem and still got this –

checking for Ruby version >= 1.8.5... yes
checking for /usr/local/Cellar/gcc@4.9/4.9.3_1/bin/gcc-4.9... yes
checking for Magick-config... no
Can't install RMagick 2.13.2. Can't find Magick-config in <snip>

Turns out Homebrew installed ImageMagick 7.0.4-6 and it doesn’t have Magick-config executable in its bin directory, instead it has Magick++-config.

Got the gem installed by downgrading ImageMagick to version 6 as follows.

# Uninstall ImageMagick 7
brew uninstall imagemagick
brew install imagemagick@6
brew link imagemagick@6 --force

Now we can install the gem.

gem install rmagick -v '2.13.2'


TalentSpace and the 2 months BootCamp program

A few months back I joined BigBinary as remote Software Developer and relocated to Kochi to stay close with family and friends. It’s an unique experience working completely from home, I would save it for another post.

“What should I learn to get a job?”

It’s a question I’ve seen a lot of people asking, often the talented ones. With many students graduating every year, only a few of them are able to secure good jobs or higher education opportunities. Rest are forced to pursue jobs unrelated to their interests with low salary or are left jobless. Interesting fact is that this happens when good companies are desperately looking for people to hire! It’s a problem worth solving.

I always had a dream to build a place to learn and do technology together. Because it’s more fun when things are done collaboratively with people of similar interests. I thought this would be the best time and soon put up a small website with an application form,

Idea was to select a few passionate people through an online test/phone interview, train them in general programming and Ruby on Rails on Sundays, and refer them to good companies. Meanwhile I contacted a few companies asking whether they would like to be employer-partners in this venture. They were interested and happily came onboard. The overall response was exciting. Soon TalentSpace started getting applications, out of which 6 passionate people were selected.

Next challenge was to build a space for this. The apartment I live in Kochi has some commercial space in first 2 floors. Talked to the builder owners and they were more than happy to give a 1200sq ft hall for rent to build the office. They have a furniture shop as well through which they quickly arranged tables and chairs. Meanwhile I got a projector, screen and cables delivered through Amazon. Friends helped to arrange everything over a night and we were all set to begin!







As scheduled 6 selected folks came for the first session on November 1, Sunday. We had another session last week and they have been doing fun-to-solve programming assignments in between. Currently we have a Slack group for discussions and a trello board to manage tasks. The entire BootCamp program is 2 months long with a fees of INR 20K. We hope to cover everything from building an application from scratch and deploying it in production.

We believe in social coding, going forward our plan is to take everything to GitHub. Online code reviews and assigning with issues would give them an exposure to real world software development. Also none of us believes in certificates, the code these folks push would serve as a portfolio for potential recruiters.

It’s all going great. Thanks to everyone who helped and supported to start this venture :)

GSoC 2013: Week 10 of Grandham project

Last week I’ve been working on admin review feature to incorporate the new changes happened in the user end.

Screen Shot 2013-08-26 at 1.56.09 AM

With the addition of in-place editing feature, admins can now approve minor edits by actually looking the difference. They also have options to replace author/publisher if the previously set author was different.

Along with that, we now have an option to upload book cover. It can be found in ‘Add new book’ form. In the long run, it will be also appearing under each book cover(in book page) where user can upload a cover just like they edit other information.

Screen Shot 2013-08-26 at 2.03.44 AM

GSoC 2013: Week 9 of Grandham project

In Week 9, I rewrote the complete crowdsourcing functionality of Grandham from a submission based approach to micro-edits based approach. Earlier we used to store the entire snapshot while recording modifications but now we store only the ‘edit’ (similar to diff, but in a structured database table) and pass it to admins for reviewing. This approach has some significant advantages including the easy generation of history of book pages.

In-place editing was integrated during the same week. Now participants can click on a field and edit it.

GSoC 2013: Week 8 of Grandham project

Last weekly I mainly worked on Search feature and admin interfaces. Here’s a quick review:

  • Experimented with various search engines like Sphinx, Ferret, etc and finally decided to use Solr with sunspot gem as it worked well with unicorn data without any configuration.
  • Wrote a general search backend interface for Grandham. We can plugin other search engines anytime as long as it communicated the way Grandham needs it.
  • Added Admin interfaces managing Authors and Publishers.

GSoC 2013: Week 7 of Grandham project

I couldn’t post the weekly updates regularly for the last two times since I was kept more busy than I had expected and the festive holiday that came in between. Here’s a quick review of what happened during the 7th week of GSoC.

  • Grandham got an UI revamp!
  • Integrated new theme.
  • Separate books / authors / publishers lists were implemented
  • Updated user sign in / sign up pages
  • Integrated database clear and fixed failing specs (It’s green now, yay!)

GSoC 2013: Week 6 of Grandham project

This week I’ve been mostly fixing bugs, refactoring code and building admin features. Grandham has built in checks to avoid duplication in Authors/Publishers now.

Submission Review Interface Grandham review page

We have a new interface this week –  A screen to review crowdsourced information submissions. Administrators can use this feature to control the information displayed to user. Currently every review item has 3 actions – Approve, Archive or Comment. Out of these, ‘Comment’ is a new feature which needs to be implemented. It will be helpful for the task force to generate discussions around specific submissions.


After a couple of rounds of refactoring, Grandham got a Code Climate score of 4.0 from 1.61! :)

GSoC 2013: Week 5 of Grandham project

Last week, I implemented different parts of the application including the basics of user authorization. Also did a work on refactoring the code base, our tests are clean now.

New features

We now have a page to display information of a specific book, which can be navigated from the books list. This page will eventually contain all the information, including location information and links to download the entire MARC data.

User authorization has been added to Grandham using the gem ‘devise’. Devise provides beautiful forms required for various user-authorization needs, I customized them to work with the look and feel for Grandham. Some of them are here:

Grandham sign in 2Grandham registration




(Social login needs to be implemented in coming weeks)

Our test suite was starting to clutter and due to a problem in factories the CI has been failing randomly. I’ve refactored the test suite and now it all works fine.


In other news, we have switched the browser to run tests from selenium – firefox to poltergeist – phantomjs. It helps us to run tests faster. Also I’ve updated our API and data import script.

GSoC 2013: Week 4 of Grandham project

Last week, I worked on edit book feature and design mockups.

Edit book feature

As you know from previous posts, we have Submission model to store every contribution from users. When an user submits a correction or an edit, it gets stored as a new Submission in submissions table which needs approval from task force to live. ‘Edit’ component of this feature was implented last week.

We have a few routes associated with this feature.

The following route is to post details for adding a new book. It requires language_id (language short code such as ML or EN) to associate the book to that language. Grandham creates new Submission and a new Book instance (with auto generated grandham_id) if submission to this route was successful.

 POST language_submissions_path - /language/:language_id/submissions

Next route is the edit book feature’s route. It requires book_id (grandham_id of the book) to accept information. It creates just a new Submission for the exising book. This submission will be available for task force to approve.

 POST book_submissions_path - /books/:book_id/submissions

Design mockups

Like I mentioned in one of my previous posts, I had drawn the design mockups for basic features of Grandham. The application will be in a state to go live when the features in design mockups are done.


We now have a live instance of app running in Heroku –

GSoC 2013: Week 3 of Grandham project

In Week 3, I was mostly designing routes and developing the submission interface for Grandham.

Submission Interface


Grandham should have two interfaces for data submission.

  1. Interface for normal users
  2. Interface for advanced users

The first interface, the form to input basic details of a book has been implemented. All the information entered through this form directly goes to ‘Submission’ model with ‘approved’ = false. Later when the task force changes ‘approved’ value to true, all other submission will get disapproved and this submission details would get featured in Book page.

We are storing Author and Publisher information in different models connected to Submission using a has_many :through association and we use the rails feature accepts_nested_attributes_for to input them in the same Submission#new interface.


We now have language based navbar in which the links would change according to the language selected. This would help users to quickly navigate to Book, Authors, Publishers and Libraries. It will be an UX enhancement to show selected Language in navbar, will do that.

We have a very basic 2 column books listing now, it’s mainly for development purposes and testing. We will have a proper books listing on the way.

In other news, I got Travis working with selenium integration specs. It required some additional bits of configuration like this –

  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"