i installed into /home/username/package/ruby (using --prefix)
and add the manual path into PATH variable
when i was working in irb
if i press upper arrow key then ‘^[[A’ will come .after that if i press
enter then my irb will quit.
Do you have the readline and readline-devel packages installed? If you
install them (whether using your OS’s package manager or building from
source), then when you build ruby it will recognize them and irb will
use readline, which should give you the desired up-arrow behavior.
On my Ubuntu system these packages are called libreadline5 and
libreadline5-dev.
You can check in your ruby-1.8.6/ext/readline whether the ruby wrapper
got built or not. Just run ‘ruby extconf.rb’ there and see if some
checks fail.
After installing the readline packages, these checks should succeed. In
that case, do ‘make && make install’ in the same dir and irb should work
right.
Do you have the readline and readline-devel packages installed? If you
install them (whether using your OS’s package manager or building from
source), then when you build ruby it will recognize them and irb will
use readline, which should give you the desired up-arrow behavior.
On my Ubuntu system these packages are called libreadline5 and
libreadline5-dev.
You can check in your ruby-1.8.6/ext/readline whether the ruby wrapper
got built or not. Just run ‘ruby extconf.rb’ there and see if some
checks fail.
After installing the readline packages, these checks should succeed. In
that case, do ‘make && make install’ in the same dir and irb should work
right.
thank you Joel VanderWerf …now irb working well .but
I am going to use ri ,it tell to “make install-doc”
when i type “make install-doc” at finally
below errors are raised
mcccccccccccccccccc…
Generating RI…
/home/username/package/ruby-1.8.6-p111/lib/yaml.rb:9:in require': no such file to load -- stringio (LoadError) from /home/username/package/ruby-1.8.6-p111/lib/yaml.rb:9 from /home/username/package/ruby-1.8.6-p111/lib/rdoc/ri/ri_descriptions.rb:1:inrequire’
from
/home/username/package/ruby-1.8.6-p111/lib/rdoc/ri/ri_descriptions.rb:1
from
/home/username/package/ruby-1.8.6-p111/lib/rdoc/ri/ri_reader.rb:1:in require' from /home/username/package/ruby-1.8.6-p111/lib/rdoc/ri/ri_reader.rb:1 from /home/username/package/ruby-1.8.6-p111/lib/rdoc/generators/ri_generator.rb:46:inrequire’
from
/home/username/package/ruby-1.8.6-p111/lib/rdoc/generators/ri_generator.rb:46
from
/home/username/package/ruby-1.8.6-p111/lib/rdoc/rdoc.rb:273:in require' from /home/username/package/ruby-1.8.6-p111/lib/rdoc/rdoc.rb:273:indocument’
from ./bin/rdoc:63
make: *** [rdoc] Error 1
username@supermail:~/package/ruby-1.8.6-p111$
what an f’in PITA.
There’s no need to reference unspeakable acts with middle-eastern
flatbreads, or any baked good.
A simple rule for happiness: build ruby from source, and let it go in
/usr/local (or anywhere but /usr). For the developer, that has the
advantage, on any OS, of (a) letting you tinker with the interpreter and
(b) building with architecture-specific optimizations.
Use apt-get (or whatever) to get the few dependencies that are not
commonly installed (such as readline), or build them yourself.