# How to include this library into ruby?

**URL:** <https://rubytalk.org/t/how-to-include-this-library-into-ruby/32748>\
**Category:** ruby-talk\
**Created:** [8 November 2006 02:52 UTC](https://rubytalk.org/t/how-to-include-this-library-into-ruby/32748 "2006-11-08T02:52:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sayan\_Thabthimyai](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@Sayan\_Thabthimyai](https://rubytalk.org/u/Sayan_Thabthimyai)\
**Post date:** [8 November 2006 02:52 UTC](https://rubytalk.org/t/how-to-include-this-library-into-ruby/32748/1 "2006-11-08T02:52:51Z")

</div>

i have download rbCurl-0.0.2a0.tgz(this library is about ftps) from  
[http://www.d1.dion.ne.jp/~matuyuki/ruby.html](http://www.d1.dion.ne.jp/~matuyuki/ruby.html)  
i extract rbCurl-0.0.2a0.tgz and i got  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;api.def  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;auto\_defs.inc  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;auto\_funcs.inc  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;example.rb  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;extconf.rb  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gen\_api.rb  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;init.c  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;README  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;template.rb  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TODO  
i have no idia to include these files into ruby. i found this line  
require 'curl' in example.rb and i tried to install curl from gem  
install curl . i got  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;root@ubuntu:~# gem install curl  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attempting local installation of 'curl'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Local gem file not found: curl\*.gem  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attempting remote installation of 'curl'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Updating Gem source index for: [http://gems.rubyforge.org](http://gems.rubyforge.org)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ERROR: While executing gem ... (Gem::GemNotFoundException)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Could not find curl (\> 0) in the repository  
Does any one know how to include this library into ruby?  
or does anyone know other library that can connect to ftps by using  
ruby?  
regards  
Sayan

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Collins\_Justin](https://avatars.discourse-cdn.com/v4/letter/c/e19adc/32.png) [@Collins\_Justin](https://rubytalk.org/u/Collins_Justin)\
**Post date:** [8 November 2006 08:52 UTC](https://rubytalk.org/t/how-to-include-this-library-into-ruby/32748/2 "2006-11-08T08:52:14Z")

</div>

Sayan Thabthimyai wrote:

> i have download rbCurl-0.0.2a0.tgz(this library is about ftps) from [http://www.d1.dion.ne.jp/~matuyuki/ruby.html](http://www.d1.dion.ne.jp/~matuyuki/ruby.html)  
> i extract rbCurl-0.0.2a0.tgz and i got  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;api.def  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;auto\_defs.inc  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;auto\_funcs.inc  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;example.rb  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;extconf.rb  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gen\_api.rb  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;init.c  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;README  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;template.rb  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TODO  
> i have no idia to include these files into ruby. i found this line  
> require 'curl' in example.rb and i tried to install curl from gem install curl . i got  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;root@ubuntu:~# gem install curl  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attempting local installation of 'curl'  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Local gem file not found: curl\*.gem  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attempting remote installation of 'curl'  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Updating Gem source index for: [http://gems.rubyforge.org](http://gems.rubyforge.org)  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ERROR: While executing gem ... (Gem::GemNotFoundException)  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Could not find curl (\> 0) in the repository  
> Does any one know how to include this library into ruby?  
> or does anyone know other library that can connect to ftps by using ruby?  
> regards  
> Sayan

Change to the directory rbCurl and run:

ruby extconf.rb  
make  
make install (as root)

Note that this did not compile for me, maybe it will for you, but it looks pretty old (2001).  
It also doesn't look like any gems were made for this project. The gem command uses rubyforge.org as the default place to get packages and that project isn't listed there.  
I haven't used any ftps libraries personally, but I found this one on RubyForge:  
[http://rubyforge.org/projects/ftpfxp/](http://rubyforge.org/projects/ftpfxp/)

Good luck.

-Justin

---

<div class="post-metadata">

**Author:** ![Stefano\_Crocco](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@Stefano\_Crocco](https://rubytalk.org/u/Stefano_Crocco)\
**Post date:** [8 November 2006 08:52 UTC](https://rubytalk.org/t/how-to-include-this-library-into-ruby/32748/3 "2006-11-08T08:52:18Z")

</div>

Since this is a c extension to ruby, you need to compile this. To do so,  
you should do the following (in the directory where you unpacked the  
files)

&nbsp;&nbsp;&nbsp;&nbsp;ruby extconf.rb #creates the Makefile  
&nbsp;&nbsp;&nbsp;&nbsp;make #compiles the extension  
&nbsp;&nbsp;&nbsp;&nbsp;make install #installs the extension on the system  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#needs to be run with root privileges

In theory, this should work. I tried to do this before replying to your  
post, however, but got a compilation error in the make step. The readme  
file says that linux is supported (unlike the 0.0.1 release which only  
supports FreeBSD), so there may be something wrong with my system, or  
the problem might be due to the fact that this is an alpha release.

I'm sorry I can't help you more with this

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Ross\_Bamford4](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@Ross\_Bamford4](https://rubytalk.org/u/Ross_Bamford4)\
**Post date:** [8 November 2006 11:39 UTC](https://rubytalk.org/t/how-to-include-this-library-into-ruby/32748/4 "2006-11-08T11:39:55Z")

</div>

[...snip...]

You need to ruby extconf.rb to generate a Makefile, then do make && make  
install to compile and install the binding.

\*However\*, rbCurl has been (apparently) abandoned for quite some time,  
and doesn't compile with Ruby 1.8 or modern GCC. See thread [1] and my  
reply [2] for a possible workaround. As a result of that thread, there  
was some discussion of Friedrich possibly picking up rbCurl and properly  
updating it, but I don't know any more about that at the moment.

[1] [http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/222727](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/222727)  
[2] [http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/222735](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/222735)

> **···**
>
> On Wed, 2006-11-08 at 11:52 +0900, Sayan Thabthimyai wrote:
> 
> > i have download rbCurl-0.0.2a0.tgz(this library is about ftps) from  
> > [http://www.d1.dion.ne.jp/~matuyuki/ruby.html](http://www.d1.dion.ne.jp/~matuyuki/ruby.html)  
> > i extract rbCurl-0.0.2a0.tgz and i got  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;api.def  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;auto\_defs.inc  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;auto\_funcs.inc  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;example.rb  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;extconf.rb
> 
> --  
> Ross Bamford - rosco@roscopeco.REMOVE.co.uk

---

<div class="post-metadata">

**Author:** ![Sayan\_Thabthimyai](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@Sayan\_Thabthimyai](https://rubytalk.org/u/Sayan_Thabthimyai)\
**Post date:** [9 November 2006 08:51 UTC](https://rubytalk.org/t/how-to-include-this-library-into-ruby/32748/5 "2006-11-09T08:51:56Z")

</div>

Justin Collins wrote:

> Sayan Thabthimyai wrote:
> 
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;README  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ERROR: While executing gem ... (Gem::GemNotFoundException)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Could not find curl (\> 0) in the repository  
> > Does any one know how to include this library into ruby?  
> > or does anyone know other library that can connect to ftps by using  
> > ruby?  
> > regards  
> > Sayan
> 
> Change to the directory rbCurl and run:
> 
> ruby extconf.rb  
> make  
> make install (as root)
> 
> Note that this did not compile for me, maybe it will for you, but it  
> looks pretty old (2001).  
> It also doesn't look like any gems were made for this project. The gem  
> command uses rubyforge.org as the default place to get packages and that  
> project isn't listed there.  
> I haven't used any ftps libraries personally, but I found this one on  
> RubyForge:  
> [http://rubyforge.org/projects/ftpfxp/](http://rubyforge.org/projects/ftpfxp/)
> 
> Good luck.
> 
> -Justin

thank you very much everyone. i will try  
[http://rubyforge.org/projects/ftpfxp/](http://rubyforge.org/projects/ftpfxp/)

regards  
Sayan

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).
