You are not logged in.
I have the impression there is a problem with 'irb' the tool for the ruby documentation which is part of the ruby package, this is the output I get:
~$irb IO::open
/usr/lib/ruby/1.8/irb/input-method.rb:68:in `initialize': No such file or directory - IO::open (Errno::ENOENT)
from /usr/lib/ruby/1.8/irb/input-method.rb:68:in `open'
from /usr/lib/ruby/1.8/irb/input-method.rb:68:in `initialize'
from /usr/lib/ruby/1.8/irb/context.rb:80:in `new'
from /usr/lib/ruby/1.8/irb/context.rb:80:in `initialize'
from /usr/lib/ruby/1.8/irb.rb:92:in `new'
from /usr/lib/ruby/1.8/irb.rb:92:in `initialize'
from /usr/lib/ruby/1.8/irb.rb:57:in `new'
from /usr/lib/ruby/1.8/irb.rb:57:in `start'
from /usr/bin/irb:13
~$ irb IO::new
/usr/lib/ruby/1.8/irb/input-method.rb:68:in `initialize': No such file or directory - IO::new (Errno::ENOENT)
from /usr/lib/ruby/1.8/irb/input-method.rb:68:in `open'
from /usr/lib/ruby/1.8/irb/input-method.rb:68:in `initialize'
from /usr/lib/ruby/1.8/irb/context.rb:80:in `new'
from /usr/lib/ruby/1.8/irb/context.rb:80:in `initialize'
from /usr/lib/ruby/1.8/irb.rb:92:in `new'
from /usr/lib/ruby/1.8/irb.rb:92:in `initialize'
from /usr/lib/ruby/1.8/irb.rb:57:in `new'
from /usr/lib/ruby/1.8/irb.rb:57:in `start'
from /usr/bin/irb:13
~$ irb IO
IO(main):001:0> ------------------------------------------------------- Class: File < IO
SyntaxError: compile error
IO:1: syntax error, unexpected ':', expecting $end
------------------------------------------------------- Class: File < IO
^
from IO:1
from :0
IO(main):002:0>
IO(main):003:0* FTOOLS.RB: EXTRA TOOLS FOR THE FILE CLASS
SyntaxError: compile error
IO:3: syntax error, unexpected ':', expecting $end
FTOOLS.RB: EXTRA TOOLS FOR THE FILE CLASS
^
from IO:3
from :0
IO(main):004:0> =========================================
IO(main):005:0* Author: WATANABE, Hirofumi
SyntaxError: compile error
IO:4: syntax error, unexpected tEQQ
=========================================
^
from IO:5
from :0
IO(main):006:0>
IO(main):007:0* Documentation: Zachary Landau
SyntaxError: compile error
IO:7: syntax error, unexpected ':', expecting $end
Documentation: Zachary Landau
^
from IO:7
from :0
IO(main):008:0>
IO(main):009:0* This library can be distributed under the terms of the Ruby
NameError: uninitialized constant Ruby
from IO:9
from :0
IO(main):010:0> license. You can freely distribute/modify this library.
IO(main):011:0*
IO(main):012:0* It is included in the Ruby standard library.
IO(main):013:0*
IO(main):014:0*
IO(main):015:0* Description
SyntaxError: compile error
IO:10: syntax error, unexpected tIDENTIFIER, expecting kDO or '{' or '('
license. You can freely distribute/modify this library.
^
IO:12: syntax error, unexpected kIN, expecting $end
It is included in the Ruby standard library.
^
from IO:12
from :0
IO(main):016:0> -----------
IO(main):017:0* ftools adds several (class, not instance) methods to the File
SyntaxError: compile error
IO:17: syntax error, unexpected tIDENTIFIER, expecting kDO or '{' or '('
ftools adds several (class, not instance) methods to the File
^
IO:17: syntax error, unexpected ','
ftools adds several (class, not instance) methods to the File
^
from IO:17
from :0
IO(main):018:0> class, for copying, moving, deleting, installing, and comparing
IO(main):019:1> files, as well as creating a directory path. See the File class for
IO(main):020:3* details.
IO(main):021:3*
IO(main):022:3* FileUtils contains all or nearly all the same functionality and
IO(main):023:3* more, and is a recommended option over ftools
IO(main):024:3>
IO(main):025:3* When you
IO(main):026:3>
IO(main):027:3* require 'ftools'
IO(main):028:3>
IO(main):029:3* then the File class aquires some utility methods for copying,
IO(main):030:5* moving, and deleting files, and more.
IO(main):031:5*
IO(main):032:5* See the method descriptions below, and consider using FileUtils as
IO(main):033:5> it is more comprehensive.
IO(main):034:5*
IO(main):035:5* ------------------------------------------------------------------------
IO(main):036:5*
IO(main):037:5*
IO(main):038:5* Constants:
IO(main):039:5* ----------
IO(main):040:5* Separator: separator
IO(main):041:5> SEPARATOR: separator
IO(main):042:5> ALT_SEPARATOR: rb_obj_freeze(rb_str_new2("\\"))
IO(main):043:5> ALT_SEPARATOR: Qnil
IO(main):044:5> PATH_SEPARATOR: rb_obj_freeze(rb_str_new2(PATH_SEP))
IO(main):045:5> BUFSIZE: 8 * 1024
IO(main):046:5>
IO(main):047:5*
IO(main):048:5* Class methods:
IO(main):049:5* --------------
IO(main):050:5* atime, basename, blockdev?, catname, chardev?, chmod, chmod, chown,
IO(main):051:5* compare, copy, ctime, delete, directory?, dirname, executable?,
IO(main):052:5* executable_real?, exist?, exists?, expand_path, extname, file?,
IO(main):053:5* fnmatch, fnmatch?, ftype, grpowned?, identical?, install, join,
IO(main):054:5* lchmod, lchown, link, lstat, makedirs, move, mtime, new, owned?,
IO(main):055:5* pipe?, readable?, readable_real?, readlink, rename, safe_unlink,
IO(main):056:5* setgid?, setuid?, size, size?, socket?, split, stat, sticky?,
IO(main):057:5* symlink, symlink?, syscopy, truncate, umask, unlink, utime,
IO(main):058:5* writable?, writable_real?, zero?
IO(main):059:5>
IO(main):060:5*
IO(main):061:5* Instance methods:
IO(main):062:5* -----------------
IO(main):063:5* atime, chmod, chown, ctime, flock, lstat, mtime, o_chmod, path,
IO(main):064:5* truncate
IO(main):065:5> SyntaxError: compile error
IO:18: syntax error, unexpected ','
class, for copying, moving, deleting, installing, and comparing
^
IO:18: syntax error, unexpected kAND, expecting kIN
class, for copying, moving, deleting, installing, and comparing
^
IO:19: syntax error, unexpected tIDENTIFIER, expecting kDO or '{' or '('
files, as well as creating a directory path. See the File class for
^
IO:22: syntax error, unexpected tIDENTIFIER, expecting tCOLON2 or '[' or '.'
FileUtils contains all or nearly all the same functionality and
^
IO:23: syntax error, unexpected ',', expecting $end
more, and is a recommended option over ftools
^
from IO:23
from :0
Is this a bug? I'll file one if someone can confirm this (It's the first time I really use irb so I don't know its behavior that good).
Last edited by Ramses de Norre (2007-08-30 17:38:13)
Offline
Aren't you supposed to run irb first (without an argument) and then enter "commands"?
Offline
I am so stupid I was intending to use "ri" and not "irb"... Problem solved
Offline