Subject:
[ruby-ffi] Re: require error: no such file to load -- ffi
From:
Lu Liu
Date:
10/8/09 7:50 AM
To:
ruby-ffi


many thanks!

i also found the answer from http://docs.rubygems.org/read/chapter/3#page70.

On Oct 8, 2:32 pm, Aman Gupta <themastermi...@gmail.com> wrote:
> require 'rubygems'
> require 'ffi'
>
>
>
> On Thu, Oct 8, 2009 at 5:25 AM, Lu Liu <nudtl...@gmail.com> wrote:
>
> > Hi all,
>
> > I have successfully installed ffi-0.5.0. But when I tried require
> > 'ffi' in irb, it reported LoadError: no such file to load -- ffi. I
> > have no idea why this happens.
>
> > Actually, the installation process was not so smooth either. When I
> > tried sudo gem install ffi, it reported such an error:
>
> > rake RUBYARCHDIR=/var/lib/gems/1.8/gems/ffi-0.5.0/lib RUBYLIBDIR=/var/
> > lib/gems/1.8/gems/ffi-0.5.0/lib
> > sh: rake: command not found
>
> > but I found this post (http://bugs.debian.org/cgi-bin/bugreport.cgi?
> > bug=529663), added a symbolic link to rake in /usr/bin, and solved the
> > installation problem. I am not sure if this is also a bug of RubyGem
> > on Ubuntu.
>
> > However, the require command can not find 'ffi' even though I tried
> > both of the two ways of ffi installation (directly gem install and the
> > git way mentioned in this post:
> >http://groups.google.com/group/ruby-ffi/browse_thread/thread/e46d8a6a...).
>
> > Any suggestions? e.g. how can I check if the 'ffi' is in the list that
> > ruby require command can find?
>
> > BTW: i just tried the require 'ffi' in /var/lib/gems/1.8/gems/
> > ffi-0.5.0/lib with irb, it worked. but in other directories, no.
>
> > Thanks a lot!