# How to include this library into ruby?

**URL:** <https://www.ruby-forum.com/t/how-to-include-this-library-into-ruby/75192>\
**Category:** Ruby\
**Created:** [November 8, 2006, 3:52am UTC](https://www.ruby-forum.com/t/how-to-include-this-library-into-ruby/75192 "2006-11-08T03:52:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![trsew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/6a8cbe/32.png) [@trsew](https://www.ruby-forum.com/u/trsew)\
**Post date:** [November 8, 2006, 3:52am UTC](https://www.ruby-forum.com/t/how-to-include-this-library-into-ruby/75192/1 "2006-11-08T03:52:48Z")

</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  
api.def  
auto\_defs.inc  
auto\_funcs.inc  
example.rb  
extconf.rb  
gen\_api.rb  
init.c  
README  
template.rb  
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  
root@ubuntu:~# gem install curl  
Attempting local installation of ‘curl’  
Local gem file not found: curl\*.gem  
Attempting remote installation of ‘curl’  
Updating Gem source index for: [http://gems.rubyforge.org](http://gems.rubyforge.org)  
ERROR: While executing gem … (Gem::GemNotFoundException)  
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

---

<div class="post-metadata">

**Author:** ![trsew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/6a8cbe/32.png) [@trsew](https://www.ruby-forum.com/u/trsew)\
**Post date:** [November 8, 2006, 9:52am UTC](https://www.ruby-forum.com/t/how-to-include-this-library-into-ruby/75192/2 "2006-11-08T09:52:16Z")

</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)

```
ruby extconf.rb #creates the Makefile
make #compiles the extension
make install #installs the extension on the system
                  #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

---

<div class="post-metadata">

**Author:** ![trsew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/6a8cbe/32.png) [@trsew](https://www.ruby-forum.com/u/trsew)\
**Post date:** [November 8, 2006, 9:54am UTC](https://www.ruby-forum.com/t/how-to-include-this-library-into-ruby/75192/3 "2006-11-08T09:54:12Z")

</div>

Sayan Thabthimyai wrote:

> ```
> README
> ERROR: While executing gem ... (Gem::GemNotFoundException)
> 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](http://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:** ![trsew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/6a8cbe/32.png) [@trsew](https://www.ruby-forum.com/u/trsew)\
**Post date:** [November 8, 2006, 12:40pm UTC](https://www.ruby-forum.com/t/how-to-include-this-library-into-ruby/75192/4 "2006-11-08T12:40:42Z")

</div>

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  
> api.def  
> auto\_defs.inc  
> auto\_funcs.inc  
> example.rb  
> extconf.rb  
> […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)

---

<div class="post-metadata">

**Author:** ![trsew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/6a8cbe/32.png) [@trsew](https://www.ruby-forum.com/u/trsew)\
**Post date:** [November 9, 2006, 9:51am UTC](https://www.ruby-forum.com/t/how-to-include-this-library-into-ruby/75192/5 "2006-11-09T09:51:53Z")

</div>

Justin C. wrote:

> Sayan Thabthimyai wrote:
> 
> > ```
> > README
> > ERROR: While executing gem ... (Gem::GemNotFoundException)
> > 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](http://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
