# Ncurses run time error with ruby 1.9.1

**URL:** <https://www.ruby-forum.com/t/ncurses-run-time-error-with-ruby-1-9-1/176627>\
**Category:** Ruby\
**Created:** [October 3, 2009, 1:05pm UTC](https://www.ruby-forum.com/t/ncurses-run-time-error-with-ruby-1-9-1/176627 "2009-10-03T13:05:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sentinel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Post date:** [October 3, 2009, 1:05pm UTC](https://www.ruby-forum.com/t/ncurses-run-time-error-with-ruby-1-9-1/176627/1 "2009-10-03T13:05:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sentinel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Post date:** [October 3, 2009, 8:08pm UTC](https://www.ruby-forum.com/t/ncurses-run-time-error-with-ruby-1-9-1/176627/2 "2009-10-03T20:08:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sentinel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Post date:** [October 4, 2009, 12:45pm UTC](https://www.ruby-forum.com/t/ncurses-run-time-error-with-ruby-1-9-1/176627/3 "2009-10-04T12:45:50Z")

</div>

2009/10/3 (rkumar) Sentinel [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> 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

---

<div class="post-metadata">

**Author:** ![sentinel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Post date:** [October 5, 2009, 5:13am UTC](https://www.ruby-forum.com/t/ncurses-run-time-error-with-ruby-1-9-1/176627/4 "2009-10-05T05:13:40Z")

</div>

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.
