Skip to content

MacRuby 0.12, RVM, and Gem Installation Problems

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…

Continue Reading

MacRuby, CocoaPods, 10.7, and XCode 4.3

I have a MacRuby project that uses CocoaPods for many of its ObjC dependencies. I had a bit of trouble getting it to run properly with the latest version of Xcode (4.3). This had to do with a recent change I made to MABSupportFolder (use of isEmpty()) which triggered a fairly obscure bug¬†in addition to the new XCode 4.3 organizational structure not being properly recognized at first. The obscure MacRuby bug was being caused by running -count on an NSString. When using MacRuby if you test if a NSString responds to -count using -respondsToSelector: you’ll get true as the response because of Ruby’s String#count method. However, that method requires an argument, but running respondsToSelector:@selector(count) will return true for an NSString…

Continue Reading