Skip to content

Instantly share code, notes, and snippets.

@oren
Created March 27, 2010 07:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oren/345794 to your computer and use it in GitHub Desktop.
Save oren/345794 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'ffi-ncurses'
include FFI::NCurses
begin
stdscr = initscr
start_color
curs_set 0
raw
cbreak
noecho
clear
move 10, 10
standout
addstr("Hi!")
standend
refresh
getch
ensure
endwin
end
/opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/ffi-0.6.3/lib/ffi/library.rb:61:in `ffi_lib': Could not open library 'libXCurses.so': libXCurses.so: cannot open shared object file: No such file or directory. Could not open library 'XCurses': XCurses: cannot open shared object file: No such file or directory (LoadError)
from /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/ffi-0.6.3/lib/ffi/library.rb:43:in `map'
from /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/ffi-0.6.3/lib/ffi/library.rb:43:in `ffi_lib'
from /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/ffi-ncurses-0.3.2/lib/ffi-ncurses.rb:25
from /opt/ruby-1.8.7-p72/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /opt/ruby-1.8.7-p72/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from test.rb:2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment