Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Ruby 1.8.1 on OS X Panther and RubyCocoa

Reply
Thread Tools

Ruby 1.8.1 on OS X Panther and RubyCocoa

 
 
Phil Tomson
Guest
Posts: n/a
 
      03-04-2004
Being new to OS X (about 2 weeks now).

What's the best way to upgrade from the included Ruby (1.6. to
1.8.1?

A couple of other questions:

1. I want to use RubyCocoa; are there any issues if I upgrade to
1.8.1?
2. In the future it would be cool to be able to release my RubyCocoa
creations into the OS X wild (even to non-Ruby users). Is there any
way currently to package a RubyCocoa app so that anyone who downloads
it can just run it without having to go and get the RubyCocoa libs?

I guess it would be nice if Apple included RubyCocoa libs with their
next release of OS X, that would make #2 easy. It seems like there
are a couple of ways to achieve this:
1) We include RubyCocoa in the standard Ruby release (of course it
wouldn't get compiled on Windows platforms, but it could potentially
work with GNUStep on Linux) as another GUI lib (like we include FOX
and TK support now).
2) We lobby Apple to include RubyCocoa in OS X 10.4

#1 pros: we as a community have more control over it and it allows
people to (potentially) create Cocoa apps that run on both OS X and
Linux (GNUStep) platforms. Of course, I suspect the full API isn't
available on Linux (like the AddressBook API for example). However,
#1 would also add a lot of code to the standard Ruby distribution that
would primarily benefit only one platform, so it may not be a good
option.

Pehaps there is another option:
3) Those of us in the Ruby community who use OS X (seems to be a
growing number) create a distribution of Ruby for OS X that includes
RubyCocoa and try to get Apple to include it in 10.4. This would be
kind of like the Windows version of Ruby.

It's great to have Ruby included on OS X, but it would be even better
if we could write Cocoa apps with it right out of the box. Is anyone
at Apple listening?

Phil
 
Reply With Quote
 
 
 
 
Gavin Kistner
Guest
Posts: n/a
 
      03-04-2004
On Mar 4, 2004, at 1:49 PM, Phil Tomson wrote:
> What's the best way to upgrade from the included Ruby (1.6. to
> 1.8.1?


Personally, I downloaded the source, built it, let it install in the
standard location (/usr/local/) and added that to my path.

I think I also hunted down old copies and deleted them from their
standard-install locations.

Dunno, though...what are your parameters for 'best'?

I also trashed the built-in apache and built my own (again in the
standard dir) along with postgresql and mod_ruby and eruby and
ruby/postgres and more. The non-best aspect of this was that the
Sharing pane in System Preferences no longer allows me to start/stop
apache. The upside is that just about everything installed fine without
having to point out specific directories.
--
(-, /\ \/ / /\/



 
Reply With Quote
 
 
 
 
Mark Hubbart
Guest
Posts: n/a
 
      03-04-2004

On Mar 4, 2004, at 12:49 PM, Phil Tomson wrote:

> Being new to OS X (about 2 weeks now).
>
> What's the best way to upgrade from the included Ruby (1.6. to
> 1.8.1?


I tried a few different ways; for me the best way was to configure ruby
to install into /usr/local. This lets me keep the system version of
ruby around, and makes it so that I don't have to reinstall the newer
version of ruby when I upgrade the OS.

> 1. I want to use RubyCocoa; are there any issues if I upgrade to
> 1.8.1?


(Disclaimer! I didn't work with it a whole lot, but did read the docs.)
IIRC: applications built with Ruby v1.8 may not run properly on systems
running Ruby v1.6.

> 2. In the future it would be cool to be able to release my RubyCocoa
> creations into the OS X wild (even to non-Ruby users). Is there any
> way currently to package a RubyCocoa app so that anyone who downloads
> it can just run it without having to go and get the RubyCocoa libs?


There are two types of applications that you can make with RubyCocoa.
One is a standard ruby script that includes the extensions that link to
the framework. The other is a bundled app that you produce using
Apple's XCode. If you go with the bundled app, the framework can be
bundled up inside the app and noone will need to know that you even
used Ruby in the app If you distribute a script, OTOH, you will need
to provide the framework and compiled extensions.

> I guess it would be nice if Apple included RubyCocoa libs with their
> next release of OS X, that would make #2 easy. It seems like there
> are a couple of ways to achieve this:
> 1) We include RubyCocoa in the standard Ruby release (of course it
> wouldn't get compiled on Windows platforms, but it could potentially
> work with GNUStep on Linux) as another GUI lib (like we include FOX
> and TK support now).
> 2) We lobby Apple to include RubyCocoa in OS X 10.4


Personally, I really, REALLY think that Apple should maintain it. I
think all the bridge projects are open-sourced, so they could make
their own version of it. If they made RubyCocoa and it's sisters
(CamelBones and PyObjC) as easy to use as the Java-ObjectiveC Bridge, I
think there would be a lot more mac developers Seeing how many apps
there are now that were written using the java bridge, I'm sure that a
really good interface to the major "scripting" languages would result
in tons of new or ported apps. I know I would be developing more.

Unfortunately, Apple isn't maintaining them, and RubyCocoa, which was
written by a very busy person, hasn't had any major updates in a while
(that I know of) and last time I tried to install it (on panther) i
found it to be too much trouble. If I knew ObjectiveC, I would try to
help the project; but I don't.

> It's great to have Ruby included on OS X, but it would be even better
> if we could write Cocoa apps with it right out of the box. Is anyone
> at Apple listening?


I hope so...

--Mark

>
> Phil
>




 
Reply With Quote
 
Mark Hubbart
Guest
Posts: n/a
 
      03-04-2004

On Mar 4, 2004, at 1:30 PM, Gavin Kistner wrote:

> On Mar 4, 2004, at 1:49 PM, Phil Tomson wrote:
>> What's the best way to upgrade from the included Ruby (1.6. to
>> 1.8.1?

>
> Personally, I downloaded the source, built it, let it install in the
> standard location (/usr/local/) and added that to my path.
>
> I think I also hunted down old copies and deleted them from their
> standard-install locations.
>
> Dunno, though...what are your parameters for 'best'?
>
> I also trashed the built-in apache and built my own (again in the
> standard dir) along with postgresql and mod_ruby and eruby and
> ruby/postgres and more. The non-best aspect of this was that the
> Sharing pane in System Preferences no longer allows me to start/stop
> apache.


I believe you can solve this by editing the apache startup item to run
your new apache. I did this when I was running fink's apache; just look
in /System/Libray/StartupItems/Apache... there's a script in there.
change the paths in it, and you *should* be good to go. You may have to
change the $PATH environment variable too, though. Can't quite remember
for sure.

I wouldn't, though, trash the originals. when you update the system,
they might just go right back in anyways, or worse, just parts of them.
Also, you might want to be able to test something on the default setup,
to make sure it'll run properly for Joe User, who doesn't know how to
upgrade like that, and wouldn't want to anyhow.

--Mark



 
Reply With Quote
 
Mark Wilson
Guest
Posts: n/a
 
      03-05-2004

On Mar 4, 2004, at 3:49 PM, Phil Tomson wrote:

> Being new to OS X (about 2 weeks now).
>
> What's the best way to upgrade from the included Ruby (1.6. to
> 1.8.1?
>
> A couple of other questions:
>
> 1. I want to use RubyCocoa; are there any issues if I upgrade to
> 1.8.1?
> 2. In the future it would be cool to be able to release my RubyCocoa
> creations into the OS X wild (even to non-Ruby users). Is there any
> way currently to package a RubyCocoa app so that anyone who downloads
> it can just run it without having to go and get the RubyCocoa libs?
>
> [snip]


DarwinPorts has a fair amount of Ruby stuff (including RubyCocoa).
There's a fair amount there and, of course, a lot more that could be
done (I myself don't have the competence or the time to contribute in
the near future). Here's a link:

http://darwinports.opendarwin.org/po...at&substr=ruby

Regards,

Mark Wilson




 
Reply With Quote
 
Phil Tomson
Guest
Posts: n/a
 
      03-05-2004
In article <(E-Mail Removed)>,
Mark Hubbart <(E-Mail Removed)> wrote:
>
>On Mar 4, 2004, at 12:49 PM, Phil Tomson wrote:
>
>> Being new to OS X (about 2 weeks now).
>>
>> What's the best way to upgrade from the included Ruby (1.6. to
>> 1.8.1?

>
>I tried a few different ways; for me the best way was to configure ruby
>to install into /usr/local. This lets me keep the system version of
>ruby around, and makes it so that I don't have to reinstall the newer
>version of ruby when I upgrade the OS.
>
>> 1. I want to use RubyCocoa; are there any issues if I upgrade to
>> 1.8.1?

>
>(Disclaimer! I didn't work with it a whole lot, but did read the docs.)
>IIRC: applications built with Ruby v1.8 may not run properly on systems
>running Ruby v1.6.


I would expect that your RubyCocoa bindings would need to be built with
the version of Ruby you're using - is that what you mean?

>
>> 2. In the future it would be cool to be able to release my RubyCocoa
>> creations into the OS X wild (even to non-Ruby users). Is there any
>> way currently to package a RubyCocoa app so that anyone who downloads
>> it can just run it without having to go and get the RubyCocoa libs?

>
>There are two types of applications that you can make with RubyCocoa.
>One is a standard ruby script that includes the extensions that link to
>the framework. The other is a bundled app that you produce using
>Apple's XCode. If you go with the bundled app, the framework can be
>bundled up inside the app and noone will need to know that you even
>used Ruby in the app If you distribute a script, OTOH, you will need
>to provide the framework and compiled extensions.


Can you give some more details about the second option? How does one go
about doing this? (a quick HOWTO?)


Phil
 
Reply With Quote
 
Phil Tomson
Guest
Posts: n/a
 
      03-05-2004
In article <(E-Mail Removed)>,
Mark Wilson <(E-Mail Removed)> wrote:
>
>On Mar 4, 2004, at 3:49 PM, Phil Tomson wrote:
>
>> Being new to OS X (about 2 weeks now).
>>
>> What's the best way to upgrade from the included Ruby (1.6. to
>> 1.8.1?
>>
>> A couple of other questions:
>>
>> 1. I want to use RubyCocoa; are there any issues if I upgrade to
>> 1.8.1?
>> 2. In the future it would be cool to be able to release my RubyCocoa
>> creations into the OS X wild (even to non-Ruby users). Is there any
>> way currently to package a RubyCocoa app so that anyone who downloads
>> it can just run it without having to go and get the RubyCocoa libs?
>>
>> [snip]

>
>DarwinPorts has a fair amount of Ruby stuff (including RubyCocoa).
>There's a fair amount there and, of course, a lot more that could be
>done (I myself don't have the competence or the time to contribute in
>the near future). Here's a link:
>
>http://darwinports.opendarwin.org/po...at&substr=ruby
>


Pardon my ignorance, but how does one use these ports?

Phil
 
Reply With Quote
 
Mark Hubbart
Guest
Posts: n/a
 
      03-05-2004

On Mar 4, 2004, at 9:09 PM, Phil Tomson wrote:

> In article <(E-Mail Removed)>,
> Mark Hubbart <(E-Mail Removed)> wrote:
>>
>> On Mar 4, 2004, at 12:49 PM, Phil Tomson wrote:
>>
>>> Being new to OS X (about 2 weeks now).
>>>
>>> What's the best way to upgrade from the included Ruby (1.6. to
>>> 1.8.1?

>>
>> I tried a few different ways; for me the best way was to configure
>> ruby
>> to install into /usr/local. This lets me keep the system version of
>> ruby around, and makes it so that I don't have to reinstall the newer
>> version of ruby when I upgrade the OS.
>>
>>> 1. I want to use RubyCocoa; are there any issues if I upgrade to
>>> 1.8.1?

>>
>> (Disclaimer! I didn't work with it a whole lot, but did read the
>> docs.)
>> IIRC: applications built with Ruby v1.8 may not run properly on
>> systems
>> running Ruby v1.6.

>
> I would expect that your RubyCocoa bindings would need to be built with
> the version of Ruby you're using - is that what you mean?


yeah. I'm nearly positive that if you build RubyCocoa against a certain
version of Ruby, that's what you have to use with it from then on.
That's one reason why I would advise against deleting the original
distribution; that's the one that your users will have.

>>> 2. In the future it would be cool to be able to release my RubyCocoa
>>> creations into the OS X wild (even to non-Ruby users). Is there any
>>> way currently to package a RubyCocoa app so that anyone who downloads
>>> it can just run it without having to go and get the RubyCocoa libs?

>>
>> There are two types of applications that you can make with RubyCocoa.
>> One is a standard ruby script that includes the extensions that link
>> to
>> the framework. The other is a bundled app that you produce using
>> Apple's XCode. If you go with the bundled app, the framework can be
>> bundled up inside the app and noone will need to know that you even
>> used Ruby in the app If you distribute a script, OTOH, you will
>> need
>> to provide the framework and compiled extensions.

>
> Can you give some more details about the second option? How does one
> go
> about doing this? (a quick HOWTO?)


There should be project templates (for Project Builder / XCode) that
you can install with the framework... You build the app using XCode and
Interface Builder, mostly like a Java-Cocoa app. Compile it in XCode,
and it will build the application, and by default (I think) it includes
the framework in the app bundle. The app that you get should look and
act just like any other mac app.

--Mark



 
Reply With Quote
 
Ollivier Robert
Guest
Posts: n/a
 
      03-06-2004
[courtesy cc of this posting sent to cited author via email]

In article <(E-Mail Removed)>,
Phil Tomson <(E-Mail Removed)> wrote:
> Pardon my ignorance, but how does one use these ports?


[about DarwinPorts]

The best way is to get the tree with anonymous CVS as described on
<http://darwinports.opendarwin.org/>, build the "port" command.

Then installing a port is as easy as "port install ruby".
--
Ollivier ROBERT -=- EEC/AMI -=- http://www.velocityreviews.com/forums/(E-Mail Removed)
Usenet Canal Historique FreeBSD: The Power to Serve!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RubyCocoa and libxml-ruby-0.3.6 Une bévue Ruby 28 03-10-2006 07:20 AM
RubyCocoa and DarwinPorts Ruby? John N. Alegre Ruby 3 02-28-2006 02:33 PM
Ruby Install/Upgrade OS X Panther 10.3 jotto Ruby 7 01-06-2005 09:15 PM
Ruby FTP broken in Panther? George Girton Ruby 0 11-17-2003 04:59 AM
Building Ruby 1.8.1 on Panther Richard Kilmer Ruby 2 10-28-2003 08:42 PM



Advertisments