My experience with RubyCocoa

So, I just installed RubyCocoa on my OS X machine here at work. Just
thought I’d relay some keys to getting things to work:

  • The easiest way to install RubyCocoa (on 10.4) is to use
    DarwinPorts. The automatic installer does NOT work.

  • RubyCocoa requires the Ruby version that comes with OS X, so if
    you’ve compiled your own version (etc), which will probably end up in
    /usr/local/bin/, make sure you use /usr/bin/ruby or /usr/bin/irb for
    doing your RubyCocoa apps.

  • RubyCocoa is fun! :smiley:

If I think of anything else, I’ll be sure to share it.

M.T.

On 16/08/06, Matt T. [email protected] wrote:

  • RubyCocoa requires the Ruby version that comes with OS X, so if
    you’ve compiled your own version (etc), which will probably end up in
    /usr/local/bin/, make sure you use /usr/bin/ruby or /usr/bin/irb for
    doing your RubyCocoa apps.

A Darwin Ports-installed Ruby works just fine for me. I haven’t tried
it with a hand-built version, but I imagine the only problem would be
one of library locations.

Paul.

Matt, you may want to update, edit, or tweak
http://wiki.rubygarden.org/Ruby/page/show/RubyCocoa to share with the
largest number of current and future users.

—John

On Aug 16, 2006, at 9:39 AM, Paul B. wrote:

Paul.

The installer works fine for me with a custom built ruby in /usr/

local/bin/ruby. And I am sure that it is using that ruby because i
renamed the original apple ruby.

Cheers-
-Ezra

John:

Will do.

Ezra:

That’s very interesting. What version numbers are you running there?

When I first installed RubyCocoa with the 10.4 auto-installer, I tried
the following and it responded that it couldn’t find ‘osx/cocoa’, and
after I linked the files (symbolically) it said that it didn’t
recognize the constant OSX.

Hmm, what version of Xcode do you have installed?

M.T.

Matt T. [email protected] wrote:

  • RubyCocoa requires the Ruby version that comes with OS X, so if
    you’ve compiled your own version (etc), which will probably end up in
    /usr/local/bin/, make sure you use /usr/bin/ruby or /usr/bin/irb for
    doing your RubyCocoa apps.

on my computer it works with :

which ruby
/opt/local/bin/ruby

the dp one ))

Matt T. wrote:

So, I just installed RubyCocoa on my OS X machine here at work. Just
thought I’d relay some keys to getting things to work:

Thanks a lot.

If you have the time, I would really appreciate if you could write how
RubyCocoa compares to Ruby/Tk. In particular how easy is each one to
learn for someone with no experience (given also that Apple provides
tools like Interface Builder for Cocoa).

Diego

If you have the time, I would really appreciate if you could write how
RubyCocoa compares to Ruby/Tk. In particular how easy is each one to
learn for someone with no experience (given also that Apple provides
tools like Interface Builder for Cocoa).

Hi Diego,

If I HAD any experience, you bet I would. Unfortunately, this is
really my first foray into GUI building. In particular, I’ve never
used Tk, and probably won’t for some time.

However, I’d like to know just as well, so if anybody has any
experience with both of these, do tell! Or at least point us in the
right direction. :wink:

M.T.

On Aug 16, 2006, at 9:22 AM, Matt T. wrote:

So, I just installed RubyCocoa on my OS X machine here at work. Just
thought I’d relay some keys to getting things to work:

  • The easiest way to install RubyCocoa (on 10.4) is to use
    DarwinPorts. The automatic installer does NOT work.

  • RubyCocoa requires the Ruby version that comes with OS X, so if
    you’ve compiled your own version (etc), which will probably end up in
    /usr/local/bin/, make sure you use /usr/bin/ruby or /usr/bin/irb for
    doing your RubyCocoa apps.

I followed the build instructions on the rubycocoa website and it
worked fine against my own hand-built ruby. I don’t use DP for
anything ruby-related.

  • RubyCocoa is fun! :smiley:

agreed.

Matt T. a écrit :

  • RubyCocoa is fun! :smiley:

If I think of anything else, I’ll be sure to share it.

M.T.

Would you mind if I insert ma question here? I have had a successful
experience with RubyCocoa so far on my old G4. But now I’ve upgraded
to a Mac Intel, and I have a problem in reinstalling it from source.
The “sudo ruby install.rb config” command fails with this message:

ruby gen_cocoa_wrapper.rb
cpp-3.3: installation problem, cannot exec `cc1obj’: No such file or
directory
/usr/bin/cpp-3.3 returned 1 exit status

I have tried gcc 4.0.1 and 3.3 to the same result. And of course, there
is such a cc1obj file, not just one:
/usr/libexec/gcc/darwin/ppc/3.3/cc1obj
/usr/libexec/gcc/darwin/ppc/3.3-fast/cc1obj
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/cc1obj
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/cc1obj
The permissions look good on those files (the x flag is set)
I suspect something like the PATH or some other environment
variable. Has anyone seen the same symptom on Intel?
Thanks,
Jean-Pierre

On 8/17/06, Jaypee [email protected] wrote:

doing your RubyCocoa apps.
The “sudo ruby install.rb config” command fails with this message:
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/cc1obj
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/cc1obj
The permissions look good on those files (the x flag is set)
I suspect something like the PATH or some other environment
variable. Has anyone seen the same symptom on Intel?
Thanks,
Jean-Pierre

Yes, upgrade to xcode 2.3 or later (it’s at 2.4 now).

Arnaud B. wrote:

/usr/local/bin/, make sure you use /usr/bin/ruby or /usr/bin/irb for
to a Mac Intel, and I have a problem in reinstalling it from source.
/usr/libexec/gcc/darwin/ppc/3.3-fast/cc1obj

Running 10.4.7, just upgraded to xcode 2.4 and am still getting:
cpp-3.3: installation problem, cannot exec `cc1obj’: No such file or
directory

-PJ

Yes, upgrade to xcode 2.3 or later (it’s at 2.4 now).

Running 10.4.7, just upgraded to xcode 2.4 and am still getting:
cpp-3.3: installation problem, cannot exec `cc1obj’: No such file or
directory

I cannot verify it to be working with xcode 2.4 because I don’t have a
Intel Mac at home. However I did have this problem when trying to
install ruby-1.8.4 on a Mac Intel for someone and upgrading to xcode
2.3 was the solution.

The only thing that rings a bell for me is that the compiler you are
using is gcc-3.3 while I think building for x86 with xcode is only
supported with gcc-4. Maybe you can try to make RubyCocoa use gcc-4.

Eric H. [email protected] wrote:

I followed the build instructions on the rubycocoa website and it
worked fine against my own hand-built ruby. I don’t use DP for
anything ruby-related.

Same. I believe it it took all of three three word commands and a
password for installation.

and RubyCocoa is working within XCode ???
(i never get it working right both from Terminal AND XCode without a dp
install)))

On Aug 17, 2006, at 11:00 AM, Ryan D. wrote:

On Aug 16, 2006, at 9:22 AM, Matt T. wrote:

  • RubyCocoa requires the Ruby version that comes with OS X, so if
    you’ve compiled your own version (etc), which will probably end up in
    /usr/local/bin/, make sure you use /usr/bin/ruby or /usr/bin/irb for
    doing your RubyCocoa apps.

I followed the build instructions on the rubycocoa website and it
worked fine against my own hand-built ruby. I don’t use DP for
anything ruby-related.

Same. I believe it it took all of three three word commands and a
password for installation.


Eric H. - [email protected] - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com