Installing ncurses and IDE

Hi all, I was recently advised to use ncurses in order to do some event
handling. I’m very happy to try it, i have looked at the documentation
and im pretty satisfied, but now i have a small issue.
I can’t seem to be able to install the ncurses gem… Please help me
somebody.
Also, i’m thinking of using an IDE for programming in ruby,could you
guys advise me on one? At the moment i was trying to get
Netbeans,Aptana, IntellijIDEA to work, but i can’t seem to get ncurses
to work in any of them. Any idea on what i should do and how?
Thanks in advance,
Nikita

Nikita Kuznetsov wrote in post #965054:

Hi all, I was recently advised to use ncurses in order to do some event
handling. I’m very happy to try it, i have looked at the documentation
and im pretty satisfied, but now i have a small issue.
I can’t seem to be able to install the ncurses gem… Please help me
somebody.
Also, i’m thinking of using an IDE for programming in ruby,could you
guys advise me on one? At the moment i was trying to get
Netbeans,Aptana, IntellijIDEA to work, but i can’t seem to get ncurses
to work in any of them. Any idea on what i should do and how?
Thanks in advance,
Nikita

Can’t help you unless we know what exactly the problem in installing is.
You need to tell us your OS and version, your ruby version etc. Give us
a dump of the error message you get.

Also, look up google “ncurses ruby install error” or the error you are
getting. You might get some help there too.

You can try downloading from the berlios.de site and doing the ruby
extconf.rb … make … make install" dance.

Let us know exactly. oh yes, you will first need ncurses on your system
before the ncurses gem can work.

Rahul K. wrote in post #965080:

Nikita Kuznetsov wrote in post #965054:

Hi all, I was recently advised to use ncurses in order to do some event
handling. I’m very happy to try it, i have looked at the documentation
and im pretty satisfied, but now i have a small issue.
I can’t seem to be able to install the ncurses gem… Please help me
somebody.
Also, i’m thinking of using an IDE for programming in ruby,could you
guys advise me on one? At the moment i was trying to get
Netbeans,Aptana, IntellijIDEA to work, but i can’t seem to get ncurses
to work in any of them. Any idea on what i should do and how?
Thanks in advance,
Nikita

Can’t help you unless we know what exactly the problem in installing is.
You need to tell us your OS and version, your ruby version etc. Give us
a dump of the error message you get.

Also, look up google “ncurses ruby install error” or the error you are
getting. You might get some help there too.

You can try downloading from the berlios.de site and doing the ruby
extconf.rb … make … make install" dance.

Let us know exactly. oh yes, you will first need ncurses on your system
before the ncurses gem can work.

Well. im Kinda a noob in this: Right now im writing you from a Win Vista
OS. but i could work on an ubuntu distribution.
I’ve tried sooo many different ways that i’ve actually confused myself
and i dont know what i have done where.
What im asking is, could you describe a step by step version of how to
install ncurses(windows or Linux), i don’t really mind. for me the idea
is to play around with ruby, learn some stuff and then get on with some
university work with it.

You will first need ncurses on your system before gem can work, what do
you mean by that? I have downloaded the ncurses folder from the berlios
website, where would i have to put those files? (in the description i
found on one website, i was told to copy ncurses.rb and ncurses.so to
the lib folder, but i didnt havea ncurses.so file… Confusing :slight_smile:

I had uninstalled Netbeans cos i didnt get it to work , so i dont
remember the message :frowning:

I think i will reinstall it and tell you my error message once i’m done
with that.

hey, so i tried doing what you advised… but once again i get errors
with the ncurses library :smiley:

I could not do the first line u told me (sudo apt-get install
build-essentials) and the software centre had nothing called compiler
toolchain.
i did however manage to install ncurses-dev.
Sudo gem install didndt work, soo i did sudo apt-get install rubygems
and that worked.
then i did the gem install and i get this error:

nikita@ubuntu:~$ sudo gem install ncurses
Building native extensions. This could take a while…
ERROR: Error installing ncurses:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
extconf.rb:22:in `require’: no such file to load – mkmf (LoadError)
from extconf.rb:22

Gem files will remain installed in /var/lib/gems/1.8/gems/ncurses-0.9.1
for inspection.
Results logged to /var/lib/gems/1.8/gems/ncurses-0.9.1/gem_make.out

contents of gem_make.out file :
/usr/bin/ruby1.8 extconf.rb
extconf.rb:22:in `require’: no such file to load – mkmf (LoadError)
from extconf.rb:22

What i was thinking is this. it keeps writing ruby 1.8, and i got the
latest ruby 1.9.x (atleast i think so). Maybe this is why ncurses isnt
working?

nikita@ubuntu:~$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]

On Tue, Nov 30, 2010 at 3:59 PM, Nikita Kuznetsov
[email protected] wrote:

Well. im Kinda a noob in this: Right now im writing you from a Win Vista
OS. but i could work on an ubuntu distribution.

I suggest working on the latter. It’s much easier (especially if you
can work in a VM, and don’t have to switch OSes every time you want to
play around a little).

You will first need ncurses on your system before gem can work, what do
you mean by that? I have downloaded the ncurses folder from the berlios
website, where would i have to put those files? (in the description i
found on one website, i was told to copy ncurses.rb and ncurses.so to
the lib folder, but i didnt havea ncurses.so file… Confusing :slight_smile:

1.) Install the compiler toolchain. The Software Center should manage
this for you (it’s in the Programming/Development section). Or, on the
commandline: “sudo apt-get install build-essentials”. That should get
you everything you need.
2.) You need the ncurses development libraries. So, “sudo apt-get
install ncurses-dev” should fetch you the most recent version in the
Ubuntu repos for you. It’s a good idea, if Apt doesn’t already, to
install the normal ncurses library, too.
3.) “sudo gem install ncurses” will fetch the gem, and build any
necessary extension for you.

I had uninstalled Netbeans cos i didnt get it to work , so i dont
remember the message :frowning:

Remember: Netbeans’ Ruby support ships with JRuby be default. Since it
is Java based, you cannot install gems that require compilation.
However, Netbeans will happily use any Ruby you point it to, and use
only the installed gems for this Ruby version.


Phillip G.

Though the folk I have met,
(Ah, how soon!) they forget
When I’ve moved on to some other place,
There may be one or two,
When I’ve played and passed through,
Who’ll remember my song or my face.

On Sun, Dec 5, 2010 at 12:29 PM, Nikita Kuznetsov
[email protected] wrote:

contents of gem_make.out file :
/usr/bin/ruby1.8 extconf.rb
extconf.rb:22:in `require’: no such file to load – mkmf (LoadError)
from extconf.rb:22

“sudo apt-get install ruby-dev”

What i was thinking is this. it keeps writing ruby 1.8, and i got the
latest ruby 1.9.x (atleast i think so). Maybe this is why ncurses isnt
working?

Try “ruby19 -v”.


Phillip G.

Though the folk I have met,
(Ah, how soon!) they forget
When I’ve moved on to some other place,
There may be one or two,
When I’ve played and passed through,
Who’ll remember my song or my face.

On Sun, Dec 5, 2010 at 4:59 PM, Nikita Kuznetsov
[email protected] wrote:

hey, so i tried doing what you advised… but once again i get errors
with the ncurses library :smiley:

I could not do the first line u told me (sudo apt-get install
build-essentials) and the software centre had nothing called compiler
toolchain.

Try it without the s (sudo apt-get install build-essential). I don’t
think the rest will work until you get this working.

martin

Alright i will give it a go. Also, any1 got an idea on how to get this
to work on windows vista ruby:1.9.2?
I am constantly getting the same error when i run gem install ncurses

C:\Users\Moog>gem install ncurses
Temporarily enhancing PATH to include DevKit…
Building native extensions. This could take a while…
ERROR: Error installing ncurses:
ERROR: Failed to build gem native extension.

C:/Ruby192/bin/ruby.exe extconf.rb
checking for unistd.h… yes
checking for ncurses.h… no
checking for ncurses/curses.h… no
checking for curses.h… no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
–with-opt-dir
–without-opt-dir
–with-opt-include
–without-opt-include=${opt-dir}/include
–with-opt-lib
–without-opt-lib=${opt-dir}/lib
–with-make-prog
–without-make-prog
–srcdir=.
–curdir
–ruby=C:/Ruby192/bin/ruby
extconf.rb:35:in `’: ncurses header file not found (RuntimeError)

Gem files will remain installed in
C:/Ruby192/lib/ruby/gems/1.9.1/gems/ncurses-0.9.1 for inspection.
Results logged to
C:/Ruby192/lib/ruby/gems/1.9.1/gems/ncurses-0.9.1/gem_make.out

obviously there is a ncurses.h file missing somewhere.
Online i found that i could run the program without installing the
ncurses library, by just downloading the ncurses library from the
berlios website and just stick in the ncurses.rb and the ncurses.so
files into my program folder. Sure i did that, but then i got an error
saying i need ncurses_bin.so (i ofc tried to rename ncurses.so to
ncurses_bin.so but ofcourse that was not the solution :))) ). any ideas
on what is going wrong?
And if some1 of you has the time, please try to install the latest
ncurses and latest ruby on windows vista and then tell me the whole step
by step operation because i am now out of ideas.

I will try to get it working on linux abit later, but right now i got no
internet access there, so i am sticking to windows vista.(university
internet certificates are complicated)

thanks again

On 12/07/2010 10:30 AM, Nikita Kuznetsov wrote:

Alright i will give it a go. Also, any1 got an idea on how to get this
to work on windows vista ruby:1.9.2?
I am constantly getting the same error when i run gem install ncurses

i’d start here

and here

note the requirements for the dev kit

in the end i got fxruby to work, im gonna work with that. Works like a
charm, no installation problems or anything :slight_smile:

Thank yuo all for your help