Hello Ruby Experts,
I am new to Ruby, and already struggle with the installation
before even having written a single line of Ruby code.
Since I have been programming in Perl for a while
I found what I have read so far about Ruby syntax and idioms
quite tangible, so that the transition shouldn’t be too dificult.
I know I should start exploring Ruby maybe from a Linux box
where most likely all packages already came with any recent distro.
However, I need to write a SOAP client (sounds like hubris for a Ruby
newbie?)
that needs to be run from an HP-UX box.
Since there are no recent prebuilt ports of Ruby for HP-UX,
and since I am in the lucky position to have the HP ansic compiler
available at this box, I downloaded the latest stable source tarball.
I already had installed binaries of zlib and OpenSSL that also were
built
with the ansic compiler, albeit not in the usual places where I guess
Ruby
would look for them.
But the autoconf --help options didn’t reveal any mention of these libs.
So I ran a plain ./configure and afterwards make.
At this point make used to abort when compiling some openssl config
function.
Obviously because the HP ansic compiler is only C89 aware while in the
said
function a post-C89 array assignment took place.
So I needed to spread the asignment to two lines,
and the make finished without further errors.
(maybe the Ruby maintainers could add a note or patch for other plagued
HP users?)
diff ext/openssl/ossl_config.c{,.dist}
248,251c248
< VALUE arg[2];
< /arg = { self, section };/
< arg[0] = self;
< arg[1] = section;
VALUE arg[2] = { self, section };
My Ruby build seems to work, so does the irb interpreter
$ which ruby
/usr/local/bin/ruby
$ ruby -v
ruby 1.8.6 (2007-03-13 patchlevel 0) [hppa2.0w-hpux11.11]
Being used to Perl I do miss the -V which for perl displays the whole
build details.
Also being pampered somewhat by perldoc I do miss comparable Ruby Howtos
similar to what a “perldoc perl” has to offer.
This would be a tremendous help getting into Ruby by such a quickref
without having to peruse programming tomes in paper.
Still, I am unaware how the whole packaging/module system of Ruby
is organized.
I read somewhere that the CPAN equivilant were the Ruby Gems.
So I downloaded their tarball (you couldn’t download the whole CPAN that
easily)
and ran as root the setup.rb script.
But something must have gone awry.
When I now want to query gem how it is invoked
I get this mess.
$ gem --help
/usr/local/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:4:in
require': no such file to load -- zlib (LoadError) from /usr/local/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:4 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:8:in
require’
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:8
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:504:in
require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:504 from /usr/local/bin/gem:9:in
require’
from /usr/local/bin/gem:9
Looks as if it cannot find the location of the libz* files.
How can I fix this?
My next target would be to get Rails installed and running.
Anything similar there to watch out for?
Regards