Irb and 1.8.0

How do I get irb working nicely in 1.8.0?

The irb that gets built from the current tarball says:

Version irb 0.9(02/07/03) is old.

Also, it does not use readline. In fact ext/readline doesn’t even get built.

My experience with ruby up through ruby-1.7.3 has been that irb and
readline work out of the box, assuming you’ve got the readline lib and
headers installed.

What’s different with 1.8? Why isn’t a current version of irb included?
Why isn’t readline built, if the lib and headers are available?

(I’m using linux-mdk9.1.)

Compile it according to the instructions :slight_smile:

After installation, ‘head /usr/local/bin/irb’ should show:

#!/usr/local/bin/ruby

···

On Sun, Aug 10, 2003 at 05:56:25AM +0900, Joel VanderWerf wrote:

How do I get irb working nicely in 1.8.0?

irb.rb - intaractive ruby

$Release Version: 0.7.3 $

$Revision: 1.2 $

$Date: 2002/11/19 02:00:18 $

by Keiju ISHITSUKA(keiju@ishitsuka.com)

If that’s not what you have, then something went wrong.

And you should make sure that /usr/local/bin/ruby is in fact ruby-1.8.0, not
ruby-1.6.8 (try ‘/usr/local/bin/ruby -v’ to confirm)

And finally, “which irb” should show /usr/local/bin/irb, not some other irb
on your PATH.

[Possibly substitute /usr/bin for wherever I have written /usr/local/bin
above, but otherwise it should be the same]

What’s different with 1.8? Why isn’t a current version of irb included?
Why isn’t readline built, if the lib and headers are available?

(I’m using linux-mdk9.1.)

Sorry but it’s not 1.8.0 which is at fault, but something’s wrong with your
system or the way you built ruby. I suggest you untar ruby-1.8.0.tar.gz from
scratch into a fresh directory, redo ./configure && make && sudo make install,
and take care to note any errors which occur during that process.

Regards,

Brian.

Joel VanderWerf wrote:

How do I get irb working nicely in 1.8.0?

The irb that gets built from the current tarball says:

Version irb 0.9(02/07/03) is old.

Also, it does not use readline. In fact ext/readline doesn’t even get
built.

Oops. I had reinstalled linux and lost the readline headers. Readline in
1.8 is fine now.

But I’m still wondering why the obsolete version of irb is included?

Brian Candler wrote:

···

On Sun, Aug 10, 2003 at 05:56:25AM +0900, Joel VanderWerf wrote:

How do I get irb working nicely in 1.8.0?

Compile it according to the instructions :slight_smile:

After installation, ‘head /usr/local/bin/irb’ should show:

#!/usr/local/bin/ruby

irb.rb - intaractive ruby

$Release Version: 0.7.3 $

$Revision: 1.2 $

$Date: 2002/11/19 02:00:18 $

by Keiju ISHITSUKA(keiju@ishitsuka.com)

If that’s not what you have, then something went wrong.

And you should make sure that /usr/local/bin/ruby is in fact ruby-1.8.0, not
ruby-1.6.8 (try ‘/usr/local/bin/ruby -v’ to confirm)

And finally, “which irb” should show /usr/local/bin/irb, not some other irb
on your PATH.

[Possibly substitute /usr/bin for wherever I have written /usr/local/bin
above, but otherwise it should be the same]

What’s different with 1.8? Why isn’t a current version of irb included?
Why isn’t readline built, if the lib and headers are available?

(I’m using linux-mdk9.1.)

Sorry but it’s not 1.8.0 which is at fault, but something’s wrong with your
system or the way you built ruby. I suggest you untar ruby-1.8.0.tar.gz from
scratch into a fresh directory, redo ./configure && make && sudo make install,
and take care to note any errors which occur during that process.

I just did a fresh install from a freshly built 1.8.0 source tree.

$ head /usr/local/bin/irb
#!/usr/local/bin/ruby-1.8.0

irb.rb - intaractive ruby

$Release Version: 0.7.3 $

$Revision: 1.2 $

$Date: 2002/11/19 02:00:18 $

by Keiju ISHITSUKA(keiju@ishitsuka.com)

$ /usr/local/bin/irb
Version irb 0.9(02/07/03) is old.

So maybe something is corrupted in the lib files that irb requires?

Joel VanderWerf wrote:

I just did a fresh install from a freshly built 1.8.0 source tree.

$ head /usr/local/bin/irb
#!/usr/local/bin/ruby-1.8.0

irb.rb - intaractive ruby

$Release Version: 0.7.3 $

$Revision: 1.2 $

$Date: 2002/11/19 02:00:18 $

by Keiju ISHITSUKA(keiju@ishitsuka.com)

$ /usr/local/bin/irb
Version irb 0.9(02/07/03) is old.

So maybe something is corrupted in the lib files that irb requires?

Nope. I deleted all of /usr/local/lib/ruby/1.8, and started from scratch
from the 1.8 tarball. No build errors. Same irb message.

Joel VanderWerf wrote:

Joel VanderWerf wrote:

I just did a fresh install from a freshly built 1.8.0 source tree.

$ head /usr/local/bin/irb
#!/usr/local/bin/ruby-1.8.0

irb.rb - intaractive ruby

$Release Version: 0.7.3 $

$Revision: 1.2 $

$Date: 2002/11/19 02:00:18 $

by Keiju ISHITSUKA(keiju@ishitsuka.com)

$ /usr/local/bin/irb
Version irb 0.9(02/07/03) is old.

So maybe something is corrupted in the lib files that irb requires?

Nope. I deleted all of /usr/local/lib/ruby/1.8, and started from scratch
from the 1.8 tarball. No build errors. Same irb message.

Well, the “is old” message was a warning I had added to my own .irbrc.
Heh. I forgot that.

But that still doesn’t explain why 1.8.0 has:

$ irb --version
irb 0.9(02/07/03)

But the latest irb in RAA is dated 2002.09.03.

The date printed by the ‘–version’ option comes from @LAST_UPDATE_DATE
assigned in version.rb. I checked that the version.rb that comes from
1.8.0 really does have

@LAST_UPDATE_DATE = “02/07/03”

whereas the version.rb that comes from RAA has

@LAST_UPDATE_DATE = “02/09/03”

But that still doesn’t explain why 1.8.0 has:

$ irb --version
irb 0.9(02/07/03)

Same for me.

But the latest irb in RAA is dated 2002.09.03.

Ugh, what an ambiguous date: I read 02/07/03 as 2nd July 2003. Americans
would read it as 7th February 2003. If it’s an ISO date with the year
truncated (yyyy.mm.dd) then it’s 3rd July 2002.

But it looks like somebody forgot to update the version string, since there
are many CVS $Date$ stamps later than that: for example

irb/completor.rb 2003/05/22
irb/context.rb 2003/07/26
irb/input-method.rb 2003/03/23
irb/locale.rb 2003/07/24

The version in RAA is called “0.9-2002.09.03”. I imagine that it has not
been updated since then, and therefore the one in Ruby itself is the most
current. Also, RAA says:

Description: Same Version of ruby1.7 except including Japanese
Comments.

Regards,

Brian.

···

On Sun, Aug 10, 2003 at 07:26:51AM +0900, Joel VanderWerf wrote: