Subject: Re: [ruby-ffi] `ffi_libraries': no library specified (LoadError) |
From: Jesús García Sáez <blaxter@gmail.com> |
Date: 2/18/10 1:36 PM |
To: ruby-ffi@googlegroups.com |
On Wed, Feb 17, 2010 at 01:52, Stefan Schmidt <stefan.schmidt@gmail.com> wrote:
Hello, I just tried to run the hello world program of GitHub but encountered an error message on which I could not find any further information. Does anybody have a suggestion which actions to take? I am running Mac OS 10.5.8. Cheers, Stefan stefan@StefanMBP15:~/Desktop$ ruby -v ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-darwin9] stefan@StefanMBP15:~/Desktop$ gem list *** LOCAL GEMS *** ffi (0.6.2) rake (0.8.7) rake-compiler (0.7.0) rb-kqueue (0.1.0) yard (0.5.3) stefan@StefanMBP15:~/Desktop$ cat helloworld.rb require 'rubygems' require 'ffi' module MyLib extend FFI::Library attach_function :puts, [ :string ], :int end MyLib.puts 'Hello boys using libc!' stefan@StefanMBP15:~/Desktop$ ruby helloworld.rb /opt/local/lib/ruby/gems/1.8/gems/ffi-0.6.2/lib/ffi/library.rb:79:in `ffi_libraries': no library specified (LoadError) from /opt/local/lib/ruby/gems/1.8/gems/ffi-0.6.2/lib/ffi/library.rb: 106:in `attach_function' from helloworld.rb:6
Obviously it fails telling you there is no lib specified, the hello world I see in github is this [0], where did you get that example? [0] http://github.com/ffi/ffi/blob/master/samples/hello.rb