Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

how do I run ruby in Xcode?

how do I run ruby in Xcode?

Xcode-OTHER

Posted on Jul 28, 2015 2:53 PM

Reply
2 replies

Jul 29, 2015 2:17 PM in response to shawn.pitts

Keep in mind Shawn that the stackoverflow link is from 2011, and MacRuby has not had an update in a LONG while, and by their own post, are on indefinite hiatus. There is no inherent Ruby build solution in Xcode 6.2 or later. Apple has squashed the Ruby Cocoa scripting bridge that allowed one to mix Ruby and Cocoa/Objective-C code. Ruby/Cocoa which reinstates this scripting bridge functionality has not been updated since Fall 2014 — but does work.


One can write an Objective-C program that uses NSTask to run Ruby scripts. One can Goog "NSTask Ruby Script" for examples of using NSTask.


I write Ruby code in Sublime Text 3 — not in Xcode. I use the Rubocop gem to validate my syntax.

how do I run ruby in Xcode?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.