Ncurses run time error with ruby 1.9.1

R

(RK) Sentinel

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.
 
R

(rkumar) Sentinel

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.
 
M

Michal Suchanek

2009/10/3 (rkumar) Sentinel said:
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 =C2=A0to tackle ?\M-a (meta a).... perhaps will have to sta= rt 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
 
R

(rkumar) Sentinel

Michal said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top