Hey I compiled ruby with readline support. However when i go to IRB i
just get jibbrish when i press the up arrow on my keyboard. Any
suggestions?
Stewart wrote:
Hey I compiled ruby with readline support. However when i go to IRB i
just get jibbrish when i press the up arrow on my keyboard. Any
suggestions?
No suggestions, but I have this problem too:
irb
irb(main):001:0> puts "Test"
Test
=> nil
irb(main):002:0> ^[[A
ruby -v: ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-linux]
Marvin
···
--
Posted via http://www.ruby-forum.com/\.
Stewart <stewart.matheson@gmail.com> writes:
Hey I compiled ruby with readline support. However when i go to IRB i
just get jibbrish when i press the up arrow on my keyboard. Any
suggestions?
Identify the terminal (emulator) that you use and set the TERM
environment variable correctly.
If you change it, use tset to reset the terminal.
Launch irb. readline should use the TERM environment variable to
parse the right control codes from the terminal keyboard and send the
right control codes to the terminal screen.
···
--
__Pascal Bourguignon__
Stewart wrote:
Hey I compiled ruby with readline support. However when i go to IRB i
just get jibbrish when i press the up arrow on my keyboard. Any
suggestions?
You need the readline development libraries installed at the time when
you run ./configure. If you're under Linux, the package will be called
something like libreadline5-dev (Ubuntu/Debian) or readline-devel
(RedHat or other RPM-based distro)
If that's not the problem, then you'll need to be more specific. What OS
are you on? What version of ruby are you building? What makes you think
you built readline support successfully? Look through
ext/readline/mkmf.log to see why the extension wasn't built, and post it
here if you don't understand it.
···
--
Posted via http://www.ruby-forum.com/\.
i had the same problem. going to the ext/readline directory and 'make' and
'make install' solved the problem for me.
-Thomas
···
2009/8/11 Stewart <stewart.matheson@gmail.com>
Hey I compiled ruby with readline support. However when i go to IRB i
just get jibbrish when i press the up arrow on my keyboard. Any
suggestions?
--
Thomas Preymesser
thopre@gmail.com
Ogden Nash <http://www.brainyquote.com/quotes/authors/o/ogden_nash.html> -
"The trouble with a kitten is that when it grows up, it's always a cat."
Not sure what you mean by "terminal (emulator)" could you explain in a
little more detail what you mean.
···
On Aug 11, 4:22 pm, p...@informatimago.com (Pascal J. Bourguignon) wrote:
Stewart <stewart.mathe...@gmail.com> writes:
> Hey I compiled ruby with readline support. However when i go to IRB i
> just get jibbrish when i press the up arrow on my keyboard. Any
> suggestions?Identify the terminal (emulator) that you use and set the TERM
environment variable correctly.If you change it, use tset to reset the terminal.
Launch irb. readline should use the TERM environment variable to
parse the right control codes from the terminal keyboard and send the
right control codes to the terminal screen.--
__Pascal Bourguignon__
Sorry I should have posted more info
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9.6.0]
on mac os 10.5
I downloaded readline and compiled it my self. Then i compiled ruby.
So I would suggest its there and working but I am not sure. I think it
might be a linkage issue. Where can i find ext/readline/mkmf.log ?
···
On Aug 11, 4:27 pm, Brian Candler <b.cand...@pobox.com> wrote:
Stewart wrote:
> Hey I compiled ruby with readline support. However when i go to IRB i
> just get jibbrish when i press the up arrow on my keyboard. Any
> suggestions?You need the readline development libraries installed at the time when
you run ./configure. If you're under Linux, the package will be called
something like libreadline5-dev (Ubuntu/Debian) or readline-devel
(RedHat or other RPM-based distro)If that's not the problem, then you'll need to be more specific. What OS
are you on? What version of ruby are you building? What makes you think
you built readline support successfully? Look through
ext/readline/mkmf.log to see why the extension wasn't built, and post it
here if you don't understand it.
--
Posted viahttp://www.ruby-forum.com/.
Hey I compiled ruby with readline support. However when i go to IRB i
just get jibbrish when i press the up arrow on my keyboard. Any
suggestions?i had the same problem. going to the ext/readline directory and 'make' and
'make install' solved the problem for me.
And I recompiled everything after having installed libreadline5-dev.
Well I guess this is safer and that is what make is for after all.
Brian: I would only rerun ./configure if really necessary because that
recompiles everything, but that at least is the bullet proof method
;).
Cheers
Robert
···
On Tue, Aug 11, 2009 at 5:53 PM, Thomas Preymesser<thopre@gmail.com> wrote:
2009/8/11 Stewart <stewart.matheson@gmail.com>
-Thomas--
Thomas Preymesser
thopre@gmail.com
http://thopre.googlepages.com/
http://thopre.wordpress.com/Ogden Nash <http://www.brainyquote.com/quotes/authors/o/ogden_nash.html> -
"The trouble with a kitten is that when it grows up, it's always a cat."
--
module Kernel
alias_method :λ, :lambda
end
/usr/local/src/ruby-1.8.7-p72/ext/readline $ make
make: Nothing to be done for `all'.
/usr/local/src/ruby-1.8.7-p72/ext/readline $ make install
make: Nothing to be done for `install'.
/usr/local/src/ruby-1.8.7-p72/ext/readline $ ls
Makefile README README.ja depend extconf.rb readline.bundle
readline.c readline.o
/usr/local/src/ruby-1.8.7-p72/ext/readline $
Did not do anything Does not seem anything was made.
···
On Aug 11, 4:53 pm, Thomas Preymesser <tho...@gmail.com> wrote:
[Note: parts of this message were removed to make it a legal post.]
2009/8/11 Stewart <stewart.mathe...@gmail.com>
> Hey I compiled ruby with readline support. However when i go to IRB i
> just get jibbrish when i press the up arrow on my keyboard. Any
> suggestions?i had the same problem. going to the ext/readline directory and 'make' and
'make install' solved the problem for me.-Thomas
--
Thomas Preymesser
tho...@gmail.comhttp://thopre.googlepages.com/http://thopre.wordpress.com/Ogden Nash <http://www.brainyquote.com/quotes/authors/o/ogden_nash.html> -
"The trouble with a kitten is that when it grows up, it's always a cat."
Marvin Gülker <sutniuq@gmx.net> writes:
Stewart wrote:
Hey I compiled ruby with readline support. However when i go to IRB i
just get jibbrish when i press the up arrow on my keyboard. Any
suggestions?No suggestions, but I have this problem too:
irb
irb(main):001:0> puts "Test"
Test
=> nil
irb(main):002:0> ^[[Aruby -v: ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-linux]
type in the shell:
echo $TERM
and compare with the actual terminal (or terminal emulator) that you are using.
···
--
__Pascal Bourguignon__
Stewart wrote:
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9.6.0]
on mac os 10.5
I downloaded readline and compiled it my self. Then i compiled ruby.
So I would suggest its there and working but I am not sure.
Did you install readline after compiling it? I imagine that ruby
couldn't find wherever readline decided to install its header files.
Say if those files went into /usr/local/include, then you could try
setting
export CPPFLAGS="-I/usr/local/include -L/usr/local/lib"
before running ./configure
I think it
might be a linkage issue. Where can i find ext/readline/mkmf.log ?
cd /the/source/directory/where/you/built/ruby
cd ext/readline
ls
cat mkmf.log
···
--
Posted via http://www.ruby-forum.com/\.
Stewart <stewart.matheson@gmail.com> writes:
Stewart <stewart.mathe...@gmail.com> writes:
> Hey I compiled ruby with readline support. However when i go to IRB i
> just get jibbrish when i press the up arrow on my keyboard. Any
> suggestions?Identify the terminal (emulator) that you use and set the TERM
environment variable correctly.If you change it, use tset to reset the terminal.
Launch irb. readline should use the TERM environment variable to
parse the right control codes from the terminal keyboard and send the
right control codes to the terminal screen.Not sure what you mean by "terminal (emulator)" could you explain in a
little more detail what you mean.
http://tldp.org/HOWTO/Text-Terminal-HOWTO.html
You would use readline only when you're using the program thru a text
terminal interface. (eg. if you use irb thru emacs run-ruby command,
then you don't need readline because you have emacs editing commands
instead).
Nowadays, the most probable is that you are actually using a terminal
emulator, that takes input from your console keyboard and displays
output in a GUI window, but still communicating with the application
thru the serial I/O device drivers like a terminal. You still have
all the constraints of a terminal, including that of knowing exactly
what control codes are sent over the serial channel to represent key
presses, and what control codes are sent to the screen to control it
(cursor movement, character decorations, character displayed, etc).
···
On Aug 11, 4:22 pm, p...@informatimago.com (Pascal J. Bourguignon) > wrote:
--
__Pascal Bourguignon__
I'm pretty sure it's not even needed on Mac OS 10.5, as it ships with libedit for a compatible replacement. It won't hurt anything though, of course.
What happens if you start irb like this?
irb --readline
James Edward Gray II
···
On Aug 11, 2009, at 10:55 AM, Stewart wrote:
On Aug 11, 4:27 pm, Brian Candler <b.cand...@pobox.com> wrote:
Stewart wrote:
Hey I compiled ruby with readline support. However when i go to IRB i
just get jibbrish when i press the up arrow on my keyboard. Any
suggestions?You need the readline development libraries installed at the time when
you run ./configure. If you're under Linux, the package will be called
something like libreadline5-dev (Ubuntu/Debian) or readline-devel
(RedHat or other RPM-based distro)If that's not the problem, then you'll need to be more specific. What OS
are you on? What version of ruby are you building? What makes you think
you built readline support successfully? Look through
ext/readline/mkmf.log to see why the extension wasn't built, and post it
here if you don't understand it.
--
Posted viahttp://www.ruby-forum.com/.Sorry I should have posted more info
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9.6.0]
on mac os 10.5
I strongly suggest to check if your readline extension really compiled
before explorating the unlikely path of terminal issues
type
ruby -rreadline -e 'p 42"
and only if that works explore Pascal's idea.
HTH
Robert
···
On Tue, Aug 11, 2009 at 6:05 PM, Pascal J. Bourguignon<pjb@informatimago.com> wrote:
Marvin Gülker <sutniuq@gmx.net> writes:
Stewart wrote:
Hey I compiled ruby with readline support. However when i go to IRB i
just get jibbrish when i press the up arrow on my keyboard. Any
suggestions?No suggestions, but I have this problem too:
irb
irb(main):001:0> puts "Test"
Test
=> nil
irb(main):002:0> ^[[Aruby -v: ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-linux]
type in the shell:
echo $TERM
and compare with the actual terminal (or terminal emulator) that you are using.
--
__Pascal Bourguignon__
--
module Kernel
alias_method :λ, :lambda
end
Stewart <stewart.matheson@gmail.com> writes:
···
On Aug 11, 4:27 pm, Brian Candler <b.cand...@pobox.com> wrote:
Stewart wrote:
> Hey I compiled ruby with readline support. However when i go to IRB i
> just get jibbrish when i press the up arrow on my keyboard. Any
> suggestions?You need the readline development libraries installed at the time when
you run ./configure. If you're under Linux, the package will be called
something like libreadline5-dev (Ubuntu/Debian) or readline-devel
(RedHat or other RPM-based distro)If that's not the problem, then you'll need to be more specific. What OS
are you on? What version of ruby are you building? What makes you think
you built readline support successfully? Look through
ext/readline/mkmf.log to see why the extension wasn't built, and post it
here if you don't understand it.
--
Posted viahttp://www.ruby-forum.com/.Sorry I should have posted more info
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9.6.0]
on mac os 10.5
This is not enough information. What terminal emulator do you use?
Is it Terminal.app? Is it AquaTerm.app? Is it another MacOSX application?
Is it an xterm in X11.app? or some other X terminal emulator?
Or do you use a Linux console or another X terminal emulator running
on Linux, and connect to MacOSX thru ssh?
--
__Pascal Bourguignon__
Ah ok. I see I am using ASCI or that is what my term value is set to.
I am using a macbook so i am just using the default terminal for the
mac. How do i know what hte correct value of term is?
···
On Aug 11, 5:04 pm, p...@informatimago.com (Pascal J. Bourguignon) wrote:
Marvin Gülker <sutn...@gmx.net> writes:
> Stewart wrote:
>> Hey I compiled ruby with readline support. However when i go to IRB i
>> just get jibbrish when i press the up arrow on my keyboard. Any
>> suggestions?> No suggestions, but I have this problem too:
> irb
> irb(main):001:0> puts "Test"
> Test
> => nil
> irb(main):002:0> ^[[A> ruby -v: ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-linux]
type in the shell:
echo $TERM
and compare with the actual terminal (or terminal emulator) that you are using.
--
__Pascal Bourguignon__
Stewart wrote:
/usr/local/src/ruby-1.8.7-p72/ext/readline $ make
make: Nothing to be done for `all'.
/usr/local/src/ruby-1.8.7-p72/ext/readline $ make install
make: Nothing to be done for `install'.
/usr/local/src/ruby-1.8.7-p72/ext/readline $ ls
Makefile README README.ja depend extconf.rb readline.bundle
readline.c readline.o
/usr/local/src/ruby-1.8.7-p72/ext/readline $Did not do anything Does not seem anything was made.
Just to be sure, you might want to try (in the same dir):
make distclean (should delete the makefile)
ruby extconf.rb (should regenerate the makefile, and find the readline libs)
make
make install
···
--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
Stewart wrote:
/usr/local/src/ruby-1.8.7-p72/ext/readline $ make
make: Nothing to be done for `all'.
/usr/local/src/ruby-1.8.7-p72/ext/readline $ make install
make: Nothing to be done for `install'.
/usr/local/src/ruby-1.8.7-p72/ext/readline $ ls
Makefile README README.ja depend extconf.rb readline.bundle
readline.c readline.o
/usr/local/src/ruby-1.8.7-p72/ext/readline $Did not do anything Does not seem anything was made.
Hmm, maybe 1.8.7 works differently to 1.8.6 in this regards.
Clearly something was built, because you have the object file
(readline.o) and what is presumably the shared library object (I'm
guessing that's what readline.bundle is - it would be readline.so on a
more normal Unix flavour)
$ ruby -rreadline -e 'p 42'
/usr/local/ruby_test/lib/ruby/site_ruby/1.8/i686-darwin9.6.0/readline.bundle: dlopen(/usr/local/ruby_test/lib/ruby/site_ruby/1.8/i686-darwin9.6.0/readline.bundle, 9): Symbol not found: _rl_filename_completion_function (LoadError)
Referenced from: /usr/local/ruby_test/lib/ruby/site_ruby/1.8/i686-darwin9.6.0/readline.bundle
OK, now you're getting to the bottom of it. Clearly the module was
built, but there's a runtime error when it loads, because it has linked
to a function which doesn't exist. irb doesn't show you the error
because it rescues any exceptions arising from loading the readline
library, and continues without it.
Possibly Mac's libedit isn't sufficiently compatible with libreadline,
or vice versa, but I'm afraid you'll need a Mac expert to help you.
However googling for "compile ruby mac OSX" turns up what appears to be
some useful instructions, such as
HTH,
Brian.
···
--
Posted via http://www.ruby-forum.com/\.
There is no mkmf.log file in that directory. When you say
run .configure do you mean in the base src folder where i downloaded
ruby?
···
On Aug 11, 4:59 pm, Brian Candler <b.cand...@pobox.com> wrote:
Stewart wrote:
> ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9.6.0]> on mac os 10.5
> I downloaded readline and compiled it my self. Then i compiled ruby.
> So I would suggest its there and working but I am not sure.Did you install readline after compiling it? I imagine that ruby
couldn't find wherever readline decided to install its header files.Say if those files went into /usr/local/include, then you could try
settingexport CPPFLAGS="-I/usr/local/include -L/usr/local/lib"
before running ./configure
> I think it
> might be a linkage issue. Where can i find ext/readline/mkmf.log ?cd /the/source/directory/where/you/built/ruby
cd ext/readline
ls
cat mkmf.log
--
Posted viahttp://www.ruby-forum.com/.
/usr/local/src/ruby-1.8.7-p72/ext/readline $ irb --readline
irb(main):001:0>
···
On Aug 11, 5:05 pm, James Gray <ja...@grayproductions.net> wrote:
On Aug 11, 2009, at 10:55 AM, Stewart wrote:
> On Aug 11, 4:27 pm, Brian Candler <b.cand...@pobox.com> wrote:
>> Stewart wrote:
>>> Hey I compiled ruby with readline support. However when i go to
>>> IRB i
>>> just get jibbrish when i press the up arrow on my keyboard. Any
>>> suggestions?>> You need the readline development libraries installed at the time
>> when
>> you run ./configure. If you're under Linux, the package will be
>> called
>> something like libreadline5-dev (Ubuntu/Debian) or readline-devel
>> (RedHat or other RPM-based distro)>> If that's not the problem, then you'll need to be more specific.
>> What OS
>> are you on? What version of ruby are you building? What makes you
>> think
>> you built readline support successfully? Look through
>> ext/readline/mkmf.log to see why the extension wasn't built, and
>> post it
>> here if you don't understand it.
>> --
>> Posted viahttp://www.ruby-forum.com/.> Sorry I should have posted more info
> ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9.6.0]
> on mac os 10.5
I'm pretty sure it's not even needed on Mac OS 10.5, as it ships with
libedit for a compatible replacement. It won't hurt anything though,
of course.What happens if you start irb like this?
irb --readline
James Edward Gray II