I recently jumped back into a MacRuby project that I haven’t touched in a while. I upgraded to the latest MacRuby 0.12, installed the necessary gems via macgem install, and was presented with this error:[code]Segmentation fault: 11[/code]
Since I started this project my ruby setup had drastically changed: RVM, custom irbrc, and lots of other tools that I’ve found essential for productive rails development had been installed. I noticed that macgem list --local returned the list of gems needed for my rails project.
Running env from the command line revealed that GEM_HOME and GEM_PATH were set explicitly in my bash env, a result of having RVM installed and a non-system ruby set as default. These two environment variables were causing macgem to look for and install gems in the rvm gem directory. To fix the issue run these two commands in your shell and then run your necessary macgem install commands:[code]unset GEM_PATH