Ncurses run time error with ruby 1.9.1

I’ve just installed ruby 1.9.1 (port install). I gem installed ncurses,
it gave errors. After much searching i found this:

Ruby 1.9.1 RARRAY(x)->len should be RARRAY_LEN(x)

Changed the code, it compiled fine, i created a gem, installed it and it
shows up in local gems. However, my the examples do not run. This is the
error:

 form.rb:21:in `<main>': undefined method `new_field' for

Ncurses::Form:Module (NoMethodError)

(btw, I’ve also tried elliottcable-ncurses which installed straight off,
but the examples there too give the same error).

Is this a 1.9.1 issue, some environment issue or what ? Is anyone using
ncurses on 1.9.1?

I have ruby 1.9.1p243 (2009-07-16 revision 24175) [powerpc-darwin9.5.0]
and am on OSX 10.5.5.

Thanks in advance.

Ok.

I’ve installed ncurses-ruby 1.2.4.
That worked. I had to create a gemspec file and create and install a gem
(am i write in having to do that ?).
Also had to clear off ncurses gem for this to work.

Wondering how to tackle ?\M-a (meta a)… perhaps will have to start a
thread on that.

2009/10/3 (rkumar) Sentinel [email protected]:

Ok.

I’ve installed ncurses-ruby 1.2.4.
That worked. I had to create a gemspec file and create and install a gem
(am i write in having to do that ?).
Also had to clear off ncurses gem for this to work.

Wondering how  to tackle ?\M-a (meta a)… perhaps will have to start a
thread on that.

Maybe I am missing some subtlety of macports or there are multiple
curses libraries … but aren’t curses a stdlib extension which should
need no gem?

Thanks

Michal

Michal S. wrote:

Maybe I am missing some subtlety of macports or there are multiple
curses libraries … but aren’t curses a stdlib extension which should
need no gem?

Thanks

Michal

There is a basic curses which comes in stdlib. However, ncurses adds
more to it.

It seems that the ncurses that is installed with “port install
ncurses” is the 1.8 version. It does not run with 1.9.
However, ncurses-ruby (1.2.4) does work with 1.9, however, there is no
gem for it. You have to make the gem yourselves and install it.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs