So far I've been learning Ruby (1.8.2 as pre-installed on Mac/Tiger) without any installation or command-line worries, but now I've decided to investigate a library called 'ruby/graphviz'. I downloaded it but I don't know how to install it. (There are no instructions, but then that might be because there's a standard way of doing it...)
Have you tried to get Ruby stuff from DarwinPorts?
···
On Nov 9, 2005, at 9:11 AM, pete boardman wrote:
So far I've been learning Ruby (1.8.2 as pre-installed on Mac/Tiger) without any installation or command-line worries, but now I've decided to investigate a library called 'ruby/graphviz'. I downloaded it but I don't know how to install it. (There are no instructions, but then that might be because there's a standard way of doing it...)
1. install the developer tools (the cause of your immediate error, I expect) You can get them from the Tiger DVD, or as a download from Apple with a (free) registration to their developer site.
2. To install graphviz, do as follows:
ruby extconf.rb
make
sudo make install
You're right thinking this is a fairly standard way of doing things, but most libraries do come with slightly more explicit instructions.
Once you've done that, you might consider installing a new ruby, either from source, or using fink (fink.sf.net) or darwinports (darwinports.opendarwin.org) if they're more convenient. The Ruby that ships with Tiger is very slightly broken, and installing the current stable version could save you from some mysterious headaches in the future. There's also a fair number of ruby packages available on both systems (though not always the most up-to-date versions).
I'm fairly sure that some functions of ruby-graphviz rely on graphviz already being installed on the system. You can get it through fink/darwinports as well, I imagine.
hope this helps,
matthew smillie.
···
On Nov 9, 2005, at 14:11, pete boardman wrote:
So far I've been learning Ruby (1.8.2 as pre-installed on Mac/Tiger) without any installation or command-line worries, but now I've decided to investigate a library called 'ruby/graphviz'. I downloaded it but I don't know how to install it. (There are no instructions, but then that might be because there's a standard way of doing it...)
So far I've been learning Ruby (1.8.2 as pre-installed on Mac/Tiger) without any installation or command-line worries, but now I've decided to investigate a library called 'ruby/graphviz'. I downloaded it but I don't know how to install it. (There are no instructions, but then that might be because there's a standard way of doing it...)
Only the extconf.rb file looks like it might do something re installation, but when run it says:
can't find header files for ruby.
Suggestions welcomed!
Typically, Ruby extensions that are compiled (as opposed to pure-Ruby extensions) will require access to the Ruby header files. You don't get these with just the pre-installed Ruby. You'll have to download and install Ruby yourself. As part of doing that the installation procedure will copy the header files to the directory that extconf.rb looks for them in.
I've never installed ruby-graphviz but just looking at extconf.rb it seems that (once you have the Ruby headers installed) you'll have to run these two commands:
ruby extconf.rb
sudo make install
I won't make any excuses for the lack of documentation - it seems that the ruby-graphviz developer assumed that interested parties would be motivated and able to figure it out for themselves. FWIW this is a fairly standard procedure.
Fortunately ruby-graphviz appears to be simple to install. There are some that are much, much harder.
No. I've just been using everything as supplied by Apple, then downloaded ruby-graphviz_0.6.0.tar. I was expecting to have to create a folder or two, or copy some files or something. I hope adding extensions to Ruby isn't going to be as hard as installing TeX ...
Pete
···
On 9 Nov 2005, at 20:27, ruby.journal@mac.com wrote:
Have you tried to get Ruby stuff from DarwinPorts?
Typically, Ruby extensions that are compiled (as opposed to pure-Ruby extensions) will require access to the Ruby header files. You don't get these with just the pre-installed Ruby. You'll have to download and install Ruby yourself. As part of doing that the installation procedure will copy the header files to the directory that extconf.rb looks for them in.
The Ruby that ships with Tiger is very slightly broken, and installing the current stable version could save you from some mysterious headaches in the future.
Thanks! That defines both the problem and the solution neatly. I'll get going on some downloads.
Tiger's Ruby is slightly broken, there's a gem to fix it, but I don't recall its name.
···
On Nov 9, 2005, at 2:32 PM, Timothy Hunter wrote:
Typically, Ruby extensions that are compiled (as opposed to pure-Ruby extensions) will require access to the Ruby header files. You don't get these with just the pre-installed Ruby. You'll have to download and install Ruby yourself.
> Typically, Ruby extensions that are compiled (as opposed to pure-
> Ruby extensions) will require access to the Ruby header files. You
> don't get these with just the pre-installed Ruby. You'll have to
> download and install Ruby yourself.
Tiger's Ruby is slightly broken, there's a gem to fix it, but I don't
recall its name.
install rubygems, then:
sudo gem install fixrbconfig; sudo fixrbconfig
Unfortunately, this isn't a complete solution to Tiger's Ruby problem. It does fix readline and lets you install and use Rails successfully (which was the problem which inspired the fix), but it doesn't solve problems with Array#pack (I think it was pack - feel free to offer corrections). Anecdotally: ruby-wordnet's convertdb.rb script will create a segmentation fault on both the 'fixed' and unfixed systems. (the script convert's Wordnet's database to a slightly different format).
This makes me believe that in order to completely fix that problem, you will need to roll your own, or install via some sort of package.
They somehow messed up the endianess of the pack and unpack
operations. They are completely backwards. I wondered if this had
anything to do with their intel development work? They have not fixed
it and show no sign of it ever being fixed during Tiger's life cycle.
I _highly_ recommend you install from source yourself.
Brian.
···
On 11/9/05, Matthew Smillie <M.B.Smillie@sms.ed.ac.uk> wrote:
>> Tiger's Ruby is slightly broken, there's a gem to fix it, but I don't
>> recall its name.
>
> install rubygems, then:
>
> sudo gem install fixrbconfig; sudo fixrbconfig
Unfortunately, this isn't a complete solution to Tiger's Ruby
problem. It does fix readline and lets you install and use Rails
successfully (which was the problem which inspired the fix), but it
doesn't solve problems with Array#pack (I think it was pack - feel
free to offer corrections).
I should have a new release packaged up this weekend, along with a gem
that should fix the problem.
If I installed Ruby 1.8.3 from source, will I have any problems or do I
need to run a fix? I am asking because if i try to run the fix it is
broken now on 10.4.3 and will not run because the location of ruby.h
has changed. I currently just want to do some small rails development
with mysql.
Ruby-Wordnet doesn't use any C components so it doesn't care where your
ruby.h is. The segfault in the distributed version is from an incorrect
use of BerkeleyDB's transactions, which is completely unrelated to the
Tiger problem.