Monday, September 7, 2015

When Plans Go Bad

I started my post out this week with the intent of looking at another charting package for iOS, JBChartView.  My intent was to deploy it in a playground much like I did for my iOS-Charts post.  

But after trying for several hours and “Googling” the world (it seemed like), the closest I could get was an invalid CGGraphicsContext exception when the view tried to render.  

I figure it had to do something with how drawing was being done in the package or I was missing some dependency that XCode was delightful enough not to tell me about!!

Anyway unless a ureka moment occurs or the new version of XCode (hopefully coming this week) solves this, I need to put this on the back burner so as to get some real work done.  Which is what I am going to briefly talk about instead.

After the frustration of the chart experienceI was looking for something a little easier to get my sanity back.  So I turned my attention to configuring a Ubuntu server for a Rails project I am starting on.  Everything was going great, dev environment was set up and running, git repository was stood up and was accepting pushes and life was good.  Then I turned to the test machine and I ran straight into the infamous “nokogiri" gem could not be installed issue.

Back to “Googling”, Arrrrgghhh!!!

Anyway a few hours later I found the fix.  So since it was so hard to find, I thought I would end my post this week with the answer in the hopes of making it more visible to the larger community.  So here goes:

If you are using RVM on Ubuntu 14.04 (Trusty) and the nokogiri gem is not installing when you attempt to install Rails, thus keeping you from installing Rails all together.  The error you see will say something about needing to install development tools.  

To fix this, you need to reinstall rvm WITHOUT the binaries so the header files that nokogiri needs can be found.  The command to reinstall RVM is:

rvm reinstall 2.2.3 --disable-binary

Hope this helps, see you next week.

No comments:

Post a Comment