Hello! I have wrapped a c library I have made into ruby using swig now I want to use it in a rails project I have already tested my library with a ruby script and it worked well I added the path to the swig generated library in my script and it recognized my library but when I tired to call my library in my rails project, it did not recognize any of the generated files even when I added their path (using "$: << "path/to/swig/library") have anyone an Idea on how to do that thank you -- ========== | Lyes Amazouz | USTHB, Algiers ========== --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Please, I need a solution quickly On Mon, Sep 14, 2009 at 1:15 PM, Lyes Amazouz <lyesjob-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hello! > > I have wrapped a c library I have made into ruby using swig > now I want to use it in a rails project > > I have already tested my library with a ruby script and it worked well > > I added the path to the swig generated library in my script and it > recognized my library > > but when I tired to call my library in my rails project, it did not > recognize any of the generated files even when I added their path (using "$: > << "path/to/swig/library") > > have anyone an Idea on how to do that > > thank you > > > -- > ==========> | Lyes Amazouz > | USTHB, Algiers > ==========>-- ========== | Lyes Amazouz | USTHB, Algiers ========== --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Sep 14, 1:15 pm, Lyes Amazouz <lyes...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello! > > I have wrapped a c library I have made into ruby using swig > now I want to use it in a rails project > > I have already tested my library with a ruby script and it worked well > > I added the path to the swig generated library in my script and it > recognized my library > > but when I tired to call my library in my rails project, it did not > recognize any of the generated files even when I added their path (using "$: > << "path/to/swig/library")So what happens when you require your library ? Fred> > have anyone an Idea on how to do that > > thank you > > -- > ==========> | Lyes Amazouz > | USTHB, Algiers > ===========
Hello!
It is all clear now
I have put the .so file generated by swig in the "#{RAILS_ROOT}/lib"
directory, now it recognizes it and every thing works fine
thank you
On Tue, Sep 15, 2009 at 1:27 PM, Frederick Cheung <
frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>
>
> On Sep 14, 1:15 pm, Lyes Amazouz
<lyes...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > Hello!
> >
> > I have wrapped a c library I have made into ruby using swig
> > now I want to use it in a rails project
> >
> > I have already tested my library with a ruby script and it worked well
> >
> > I added the path to the swig generated library in my script and it
> > recognized my library
> >
> > but when I tired to call my library in my rails project, it did not
> > recognize any of the generated files even when I added their path
(using
> "$:
> > << "path/to/swig/library")
>
> So what happens when you require your library ?
>
> Fred
>
>
> >
> > have anyone an Idea on how to do that
> >
> > thank you
> >
> > --
> > ==========> >  |   Lyes Amazouz
> >  |   USTHB, Algiers
> > ==========> >
>
-- 
========== |   Lyes Amazouz
 |   USTHB, Algiers
==========
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---