how to include this library into ruby?

  • Thread starter Sayan Thabthimyai
  • Start date
S

Sayan Thabthimyai

i have download rbCurl-0.0.2a0.tgz(this library is about ftps) from
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
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
 
J

Justin Collins

Sayan said:
i have download rbCurl-0.0.2a0.tgz(this library is about ftps) from
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
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 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/

Good luck.

-Justin
 
S

Stefano Crocco

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
 
R

Ross Bamford

i have download rbCurl-0.0.2a0.tgz(this library is about ftps) from
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
[2] http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/222735
 
S

Sayan Thabthimyai

Justin said:
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/

Good luck.

-Justin

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

regards
Sayan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,150
Latest member
MakersCBDReviews
Top