Getting started with MacRuby and Xcode 4.2
Asked Answered
L

2

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?

Larissa answered 24/1, 2012 at 11:47 Comment(7)
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.Proudman
I've installed MacRuby after installing Xcode.Larissa
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.Proudman
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 github.com/MacRuby/MacRuby/commits/masterProudman
@6twenty: mmm ... do you think it helps, if i uninstall (manually) the macruby stuff and try again?Larissa
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 (lists.macosforge.org/mailman/listinfo.cgi/macruby-devel) or asking on Twitter (@macruby, #macruby) where you may be able to reach a team member.Proudman
You could also try downloading and installing the nightly build, which can be found here.Apical
N
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).

Nyssa answered 6/3, 2012 at 4:6 Comment(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.Berber
G
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

Gautama answered 19/7, 2014 at 7:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.