Getting readline support on solaris

Hi:

I have readline on my system (sparc 5.8), but I can’t seem to get
it to load after building ruby.

How can I build just the readline extension and
test it to see that it works so I don’t have to
rebuild and install all of ruby?

Thanks

···


Jim Freeze

panic: can’t find /

Jim Freeze wrote:

Hi:

I have readline on my system (sparc 5.8), but I can’t seem to get
it to load after building ruby.

How can I build just the readline extension and
test it to see that it works so I don’t have to
rebuild and install all of ruby?

Thanks


Jim Freeze

You should be able to cd into the Ruby source, under the ‘ext’
directory. You should see a ‘readline’ directory. cd there and do
“ruby extconf.rb”, and “make” to see what the problem is (if any).

Also, I don’t think readline support comes with 5.8 by default, though
it’s included on the companion CD, IIRC. If you don’t see
libreadline.so in /usr/lib, /usr/local/lib, or /opt/sfw/lib, you likely
don’t have it. There’s always sunfreeware.com, too.

Regards,

Dan

···


a = [74, 117, 115, 116, 32, 65, 110, 111, 116, 104, 101, 114, 32, 82]
a.push(117,98, 121, 32, 72, 97, 99, 107, 101, 114)
puts a.pack(“C*”)

Well duh, don’t I feel stupid.
I was assuming that when ‘false’ was returned by:

require ‘readline’

that it was not loading. But it was loaded.

Thanks

···

On Wednesday, 2 April 2003 at 3:24:04 +0900, Daniel Berger wrote:

Jim Freeze wrote:

Hi:

I have readline on my system (sparc 5.8), but I can’t seem to get
it to load after building ruby.

How can I build just the readline extension and
test it to see that it works so I don’t have to
rebuild and install all of ruby?

Thanks


Jim Freeze

You should be able to cd into the Ruby source, under the ‘ext’
directory. You should see a ‘readline’ directory. cd there and do
“ruby extconf.rb”, and “make” to see what the problem is (if any).


Jim Freeze

Gnagloot, n.:
A person who leaves all his ski passes on his jacket just to
impress people.
– Rich Hall, “Sniglets”

Jim Freeze wrote:

> > Well duh, don't I feel stupid. > I was assuming that when 'false' was returned by: > > require 'readline' > > that it was not loading. But it was loaded. > > Thanks > -- > Jim Freeze

Yeah, if it wasn’t installed you would get a LoadError. I have to admit
I find it strange that ‘require readline’ returns false instead of
true. Anyone know the reason for this?

Dan

···


a = [74, 117, 115, 116, 32, 65, 110, 111, 116, 104, 101, 114, 32, 82]
a.push(117,98, 121, 32, 72, 97, 99, 107, 101, 114)
puts a.pack(“C*”)

i think it returns false only if it has already been required, eg:

~ > ruby -e ‘p require “readline”’
true

~> irb
irb(main):001:0> require ‘readline’
=> false

but i could, as usual, be wrong :wink:

-a

···

On Wed, 2 Apr 2003, Daniel Berger wrote:

Jim Freeze wrote:

> > Well duh, don't I feel stupid. > I was assuming that when 'false' was returned by: > > require 'readline' > > that it was not loading. But it was loaded. > > Thanks > -- > Jim Freeze

Yeah, if it wasn’t installed you would get a LoadError. I have to admit
I find it strange that ‘require readline’ returns false instead of
true. Anyone know the reason for this?

Ara Howard
NOAA Forecast Systems Laboratory
Information and Technology Services
Data Systems Group
R/FST 325 Broadway
Boulder, CO 80305-3328
Email: ahoward@fsl.noaa.gov
Phone: 303-497-7238
Fax: 303-497-7259
====================================

Nope. Your’re correct:

ruby -e ‘p require(“readline”)’
true

···

On Wednesday, 2 April 2003 at 4:07:40 +0900, ahoward wrote:

On Wed, 2 Apr 2003, Daniel Berger wrote:

Jim Freeze wrote:

>

i think it returns false only if it has already been required, eg:

~ > ruby -e ‘p require “readline”’
true

~> irb
irb(main):001:0> require ‘readline’
=> false

but i could, as usual, be wrong :wink:


Jim Freeze

“I can resist anything but temptation.”

Jim Freeze wrote:

but i could, as usual, be wrong :wink:

Nope. Your’re correct:

ruby -e ‘p require(“readline”)’
true


Jim Freeze

“I can resist anything but temptation.”

Well, duh - I forgot irb automatically loads readline, so that’s why I
got a “false”. :slight_smile:

Dan

···

On Wednesday, 2 April 2003 at 4:07:40 +0900, ahoward wrote:


a = [74, 117, 115, 116, 32, 65, 110, 111, 116, 104, 101, 114, 32, 82]
a.push(117,98, 121, 32, 72, 97, 99, 107, 101, 114)
puts a.pack(“C*”)