{ "feed": { "id": "urn:uuid:2e8662fc-461f-58a7-9159-c22ca4880eb0", "link": [ { "@attributes": { "href": "http://darrennewton.com/atom.json", "rel": "self" } }, { "@attributes": { "href": "http://darrennewton.com/" } } ], "title" : "Miscellanea", "subtitle" : "Code, design & cultural ephemera from Darren Newton's brain", "updated" : "2016-12-21T15:18:18-05:00", "author": { "name": "Darren Newton" }, "rights" : "Copyright (c) 2016, Darren Newton", "entry": { "id" : "urn:uuid:4f271790-21fb-535d-9ea6-08c38eeeefe9", "link" : "http://darrennewton.com/2011/01/30/rvm-compile-ruby-with-iconv/", "summary" : "
\nI spent a very frustrating hour this morning trying to get the JSON gem to work on Ruby 1.9.2 p136 installed via RVM on Snow Leopard. I thought I would post my solution to help any other unfortunate souls. ", "content" : "
\nI spent a very frustrating hour this morning trying to get the JSON gem to work on Ruby 1.9.2 p136 installed via RVM on Snow Leopard. I thought I would post my solution to help any other unfortunate souls.
\n\nThe RVM docs suggest installing a sandboxed version of Iconv like so:
\n\n:::bash\n$ rvm package install iconv\n
\n\nThis didn't work. I got archictecture errors during compile. I then tried to install the iconv
gem, which again didn't work. It couldn't seem to find the iconv
lib files.
In the end, I installed icon with Homebrew and linked it to Ruby like so:
\n\n:::bash\n$ brew install libiconv\n$ rvm remove 1.9.2\n$ rvm install 1.9.2 --with-iconv-dir=/usr/local/Cellar/libiconv/1.13.1\n
\n\nThis compiled Ruby with the Homebrew installed iconv
libraries and the json
gem worked just fine after.