7

I recently thought of getting started with MacRuby. I've installed Xcode 4.2 and i've installed MacRuby, but apparently i am missing something. In every tutorial i found so far it says, that i have to choose "MacRuby Application" from the Xcode templates ... but there is no such entry available. I've tried with 0.10 and with a nightly released a few days ago.

I've had a look at where MacRuby installs it's stuff and i found templates for Xcode 3.0 ... do i have to use these templates and how do i import them to Xcode 4.2?

Before i am getting started i would also like to know, if it's somehow safe to start with MacRuby? At first sight i thought 'yes', because of the new MacRuby book available -- but there seems to be not much activity on the MacRuby website (last blog entry from march, last year?) ... which can in my experience be a sign that you should better not rely on something. Does MacRuby have a future?

aurora
  • 9,607
  • 7
  • 36
  • 54
  • Did you install MacRuby before or after Xcode? MacRuby needs to be installed after Xcode in order for the MacRuby Application template to get picked up. – 6twenty Jan 24 '12 at 12:54
  • I've installed MacRuby after installing Xcode. – aurora Jan 24 '12 at 12:55
  • As far as I'm aware the MacRuby installer *should* install the templates in the correct location, so I wouldn't think you'd need to import them manually. – 6twenty Jan 24 '12 at 13:16
  • There also seems to be still a lot of activity on MacRuby, even if they haven't made an official release in a while. See https://github.com/MacRuby/MacRuby/commits/master – 6twenty Jan 24 '12 at 13:16
  • @6twenty: mmm ... do you think it helps, if i uninstall (manually) the macruby stuff and try again? – aurora Jan 24 '12 at 13:20
  • 1
    I'm afraid I don't know enough about MacRuby to answer that. It may also be worth compiling MacRuby manually rather than using the installer, but again, I don't know if this will help or not. You could also try the MacRuby-devel mailing list (http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel) or asking on Twitter (@macruby, #macruby) where you may be able to reach a team member. – 6twenty Jan 24 '12 at 13:26
  • 1
    You could also try downloading and installing the nightly build, which can be found [here](http://www.macruby.org/files/nightlies/). – jtomschroeder Feb 19 '12 at 07:09

2 Answers2

3

MacRuby templates used to reside in /Developer, but with the newest XCode they changed the file structure to provide everything within an .app bundle, this meant that they could install it directly through the Mac Appstore, rather than just installing an installer, that you would then have to run.

If you navigate into the /Applications/XCode.app folder, you will find Contents/Developer. This is the same folder that was in /Developer before. If you move the MacRuby files into the corresponding locations in /Applications/XCode.app/Contents/Developer... things should work. (You could even do sudo ln -s /Applications/XCode.app/Contents/Developer /Developer before you install MacRuby).

Stian Håklev
  • 1,240
  • 2
  • 14
  • 26
  • 1
    I had the same problem with Xcode 4.3 and Lion, even though I installed MacRuby after Xcode. The MacRuby template showed up when I copied the files in /Developer/Library/Xcode/Templates/ to ~/Library/Developer/Xcode/Templates/Application as @Stian Håklev says. – Roger_S May 25 '12 at 13:44
0

I stumbled onto this because I was getting a "macruby.h file not found" error.

I had to do two things with Xcode:
1- add this path to "framework search paths" in my project settings
/Library/Frameworks

2-Add a symbolic link to help Xcode find the MacRuby.framework
cd /Applications/Xcode.app/Contents/Developer/Library/Frameworks
sudo ln -s /Library/Frameworks/MacRuby.framework MacRuby.framework

Jason F
  • 357
  • 3
  • 12