Installation from source (unclear instructions)

B

Ben Giddings

Hi all,

It's been a long time since I tried to install Ruby from source, but my
distribution of choice (gentoo) doesn't seem to have up-to-date 'ri'
packages, I thought I'd try the source install.

I did ./configure, and that worked fine, but then I got stumped.

The instructions say to edit "ext/Setup" to figure out what extensions
to use. When I look in that directory, I do indeed see a "Setup" file,
where everything is commented out. However, I also see a number of
other Setup files, like Setup.atheos, Setup.nt and Setup.x68.

The documentation doesn't mention these. Are they actually used, or are
they templates you can use as a base to create your own Setup file?
Also, is it supposed to be x68 or is that an x86 with a typo?

It also seems odd to me that ext/Setup has so much commented out. I'd
think that at least Socket would be uncommented, since so much of Ruby
assumes you have a working socket library. Is there any reason that so
many things are commented out?

From poking around the makefile, there's an "install-doc" target that
seems to generate the rdoc documentation. There's also an "install"
target that simply does "install-nodoc". However, I'm confused because
"install-doc" doesn't do the install *and* install the documentation, it
only installs the documentation, "install" or "install-nodoc" do the
actual installation of Ruby. Nothing in the README mentions the
"install-doc" target, nor is it (or ri for that matter) mentioned in any
of the pages I hit leading up to downloading and installing Ruby. Is
this just an oversight?

I want a fully-functional Ruby installation, with full documentation,
and all the useful extensions... so am I right that I should:

* uncomment nearly everything in ext/Setup
* make, sudo make install, sudo make install-doc

Ben
 
I

I did not

Hi all,

It's been a long time since I tried to install Ruby from source, but my
distribution of choice (gentoo) doesn't seem to have up-to-date 'ri'
packages, I thought I'd try the source install.

basil ruby-1.8.2 $ emerge -p ruby

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild R ] dev-lang/ruby-1.8.2_pre2

basil ruby-1.8.2 $ ri -v
ri: beta1 (1.2.2.8 2004/04/02)


I thought ri had been included in the ruby distribution.
Maybe you should remove your ri package and possibly emerge ruby again?

Hth
 
B

Ben Giddings

I said:
basil ruby-1.8.2 $ emerge -p ruby

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild R ] dev-lang/ruby-1.8.2_pre2

basil ruby-1.8.2 $ ri -v
ri: beta1 (1.2.2.8 2004/04/02)


I thought ri had been included in the ruby distribution.
Maybe you should remove your ri package and possibly emerge ruby again?

root@nightcrawler# qpkg -l ruby |grep '/bin/'
/usr/bin/ruby18
/usr/bin/erb18
/usr/bin/irb18
/usr/bin/rdoc18
/usr/bin/ri18
/usr/bin/testrb18

It did seem to create the documentation when I added the 'doc' USE flag,
but didn't install any 'ri' that I can see.

But even if I can get it to work on Gentoo, I'm curious about how it
should work when working from source.

Ben
 
I

I did not

I said:
basil ruby-1.8.2 $ emerge -p ruby

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild R ] dev-lang/ruby-1.8.2_pre2

basil ruby-1.8.2 $ ri -v
ri: beta1 (1.2.2.8 2004/04/02)


I thought ri had been included in the ruby distribution.
Maybe you should remove your ri package and possibly emerge ruby again?

root@nightcrawler# qpkg -l ruby |grep '/bin/'
/usr/bin/ruby18
/usr/bin/erb18
/usr/bin/irb18
/usr/bin/rdoc18
/usr/bin/ri18
/usr/bin/testrb18

It did seem to create the documentation when I added the 'doc' USE flag,
but didn't install any 'ri' that I can see.

But even if I can get it to work on Gentoo, I'm curious about how it
should work when working from source.

ls -ls /usr/bin/ri
0 lrwxrwxrwx 1 root root 4 Sep 1 12:03 /usr/bin/ri -> ri18

IIRC, the link is created by ruby-config which allows ruby16, ruby18 and
ruby19 to be installed on the same box.

Can you try to
# emerge ruby-config and run
# ruby-config ruby18

That should solve your problem.

Hth
 
B

Ben Giddings

I said:
ls -ls /usr/bin/ri
0 lrwxrwxrwx 1 root root 4 Sep 1 12:03 /usr/bin/ri -> ri18

IIRC, the link is created by ruby-config which allows ruby16, ruby18 and
ruby19 to be installed on the same box.

Can you try to
# emerge ruby-config and run
# ruby-config ruby18

# ls -l /usr/bin/ri
ls: /usr/bin/ri: No such file or directory
# ruby-config ruby18
* Linking /usr/bin/ruby18 to /usr/bin/ruby (relative)
* Linking /usr/bin/irb18 to /usr/bin/irb (relative)
* Linking /usr/bin/erb18 to /usr/bin/erb (relative)
* Linking /usr/bin/testrb18 to /usr/bin/testrb (relative)
* Linking /usr/bin/rdoc18 to /usr/bin/rdoc (relative)
* Linking /usr/lib/libruby18.so to /usr/lib/libruby.so (relative)
* Linking /usr/share/man/man1/ruby18.1.gz to
/usr/share/man/man1/ruby.1.gz (relative)

Still no 'ri'

Are you sure you didn't install RI in a different package? Here are my
packages containing "ruby":

# qpkg -I |grep ruby
app-emacs/ruby-mode *
app-xemacs/ruby-modes *
dev-lang/ruby *
dev-ruby/ruby-config *
dev-ruby/ruby-opengl *

Ben
 
I

I did not

# ls -l /usr/bin/ri
ls: /usr/bin/ri: No such file or directory
# ruby-config ruby18
* Linking /usr/bin/ruby18 to /usr/bin/ruby (relative)
* Linking /usr/bin/irb18 to /usr/bin/irb (relative)
* Linking /usr/bin/erb18 to /usr/bin/erb (relative)
* Linking /usr/bin/testrb18 to /usr/bin/testrb (relative)
* Linking /usr/bin/rdoc18 to /usr/bin/rdoc (relative)
* Linking /usr/lib/libruby18.so to /usr/lib/libruby.so (relative)
* Linking /usr/share/man/man1/ruby18.1.gz to
/usr/share/man/man1/ruby.1.gz (relative)

Still no 'ri'

Are you sure you didn't install RI in a different package? Here are my
packages containing "ruby":

Yep.
# ruby-config ruby18
* Linking /usr/bin/ruby18 to /usr/bin/ruby (relative)
* Linking /usr/bin/irb18 to /usr/bin/irb (relative)
* Linking /usr/bin/erb18 to /usr/bin/erb (relative)
* Linking /usr/bin/testrb18 to /usr/bin/testrb (relative)
* Linking /usr/bin/rdoc18 to /usr/bin/rdoc (relative)
* Linking /usr/bin/ri18 to /usr/bin/ri (relative)
* Linking /usr/lib/libruby18.so to /usr/lib/libruby.so (relative)
* Linking /usr/share/man/man1/ruby18.1.gz to
/usr/share/man/man1/ruby.1.gz (relative)

From /usr/bin/ruby-config (dev-ruby/ruby-config-0.3.1)
for i in ruby irb erb testrb rdoc ri ; do
alternatives_makesym \
/usr/bin/$i /usr/bin/${i}{$suf,18,16,19}
done

From /usr/portage/dev-ruby/ruby-config/ChangeLog
*ruby-config-0.3.1 (31 Aug 2004)

31 Aug 2004; Mamoru KOMACHI
+files/ruby-config-0.3.1.diff, +ruby-config-0.3.1.ebuild:
Make a symlink to /usr/bin/ri from /usr/bin/ri*


Please check you're using the latest version of ruby-config


Hth
 
B

Ben Giddings

I said:
Please check you're using the latest version of ruby-config

Ok, the latest (unstable) ruby-config 0.3.1 did it. Thanks. I still
want to know about the installation things though, it seems confusing.

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,159
Messages
2,570,881
Members
47,418
Latest member
NoellaXku

Latest Threads

Top