curb

Rails RestClient MultiPart Post

I have a spooling app that sits between a Ruby on Rails app, and a few Pandastream instances. Prior to the creation of the spooling application, the Rails app posted it's file data straight to Panda without issue. I've got the spooler receiving the file information and connection to the appropriate instance to pass the file data on, bu...

Curb epsv problem

I'm having a problem using Curb (ruby curl bindings) for FTP downloads. It looks like curb doesn't fall back to simple passive mode when extended passive mode fails. Extract from the log follows: < 250 Directory changed to /outgoing/productcatalog/35591 > EPSV * Connect data stream passively < 229 Entering Passive Mode (|||40938|) * ...

Having Issues with Curb gem on Mac Snow Leopard

This has consumed hours of my time. in the console i run: require 'curb' i get the error: LoadError: dlopen(/usr/local/lib/ruby/gems/1.8/gems/taf2-curb-0.5.4.0/lib/curb_core.bundle, 9): no suitable image found. Did find: /usr/local/lib/ruby/gems/1.8/gems/taf2-curb-0.5.4.0/lib/curb_core.bundle: mach-o, but wrong architecture - /usr/lo...

curb not working with rails

I have a simple class that is using curb to retrieve data. Everything works just find from the command line, but when I load it into my rails application WebBrick crashes on the "require 'curb'" statement. I'm extremely new to ruby so I'm not sure how exactly to debug the error from webbrick to determine what is wrong. If someone kno...

Why is curl in Ruby slower than command-line curl?

I am trying to download more than 1m pages (URLs ending by a sequence ID). I have implemented kind of multi-purpose download manager with configurable number of download threads and one processing thread. The downloader downloads files in batches: curl = Curl::Easy.new batch_urls.each { |url_info| curl.url = url_info[:url] curl...

Using curb gem and libcurl on Windows

I am trying to install the curb gem, which is libcurl bindings for Ruby, and of course I need to have "A working (lib)curl installation, with development stuff" installed on my computer. So, I went to the cURL Download Wizard and downloaded this package. But adding the bin into my PATH does not produce improvement and I still get an er...

libcurl on Windows problems

I am having a hard time installing libcurl ruby bindings gem (curb) on Windows. I have done everything right. I have libcurl directory on the PATH, and then I try two ways of installing the gem gem install curb and rake install EXTCONF_OPTS='--with-curl-dir=B:\curl' None of them work. They fail with different errors, though, and th...

How can i activate --trace-asci debugging with curb/curl for ruby?

Standard curl supports command line option --trace-asci and --trace. Anyone any clues on how to set this option for a Curl::Easy object? ...

Curb curb-fu gem installation problem

Hello I've installed the Curb and Curb-fu gem and libcurl on my Ubuntu box. If I go into irb and run the following irb(main):001:0> require 'rubygems' => true irb(main):002:0> require 'curb' => true irb(main):003:0> require 'json' => true irb(main):004:0> require 'curb-fu' => true irb(main):005:0> So it seems that I have access to ...

Mock out Curl::Easy.perform? (in Curb)

Is there a way to mock out Curb's Easy.perform method for unit testing? I use this to hit Facebook's graph API, and none of the http mock libs seem to support Curb. What's the best approach here? ...

Ruby: How do I send a JSON POST request using Curb?

How can I set the request body of a CURB request to be my json string? I am trying to do a JSON POST request using Curb. My code: require 'rubygems' require 'curb' require 'json' myarray = {} myarray['key'] = 'value' json_string = myarray.to_json() c = Curl::Easy.http_post("https://example.com" # how do I set json_string to be...