Questions tagged [curb]

Curb provides Ruby-language bindings for the libcurl, a fully-featured client-side URL transfer library.

Curb provides Ruby-language bindings for the libcurl, a fully-featured client-side URL transfer library. See https://github.com/taf2/curb

125 questions
1
vote
2 answers

Using gem Curb (curl) to download file

I have understood that I could use the RubyGem Curb to fulfill my needs of curl'ing down a file to my computer. But I cannot figure out how to actually "touch" the file. This is what I have got so far include 'rubygems' include 'curb' curl =…
maetthew
  • 191
  • 2
  • 14
1
vote
1 answer

Is is possible to force curb not use Keep Alive?

Using curb to communicate with some HTTP server and looks like that HTTP server does not implements Keep-Alive properly. This is why I'm searching way to force curb not use this feature. Sure, I can sleep minute or so before making next request, but…
taro
  • 5,772
  • 2
  • 30
  • 34
1
vote
1 answer

Ruby curb gem proplem in Windows 10 x64

My main purpose is execute this ruby code in windows. For this purpose I installed curb gem to Windows 10 by using this method. Although installation is compeleted without any error, I am taking these…
user3024835
  • 49
  • 2
  • 12
1
vote
1 answer

Rails Can't verify CSRF token authenticity

I've succesfully created new record by using post method api like this (Using Curl::PostField) curl_post_fields = [ Curl::PostField.content('first_name', first_name), Curl::PostField.content('last_name', last_name),] contact =…
1
vote
2 answers

Ruby Post Request with Basic Auth and Multiple Params

I'm having a ridiculously hard time doing something presumably simple... I am trying to run a simple POST request in ruby. I've looked at curb, typhoeus, rest-client, etc... The post request has basic auth (via api key) and two params... I have the…
Brandon
  • 1,701
  • 3
  • 16
  • 26
1
vote
2 answers

Ruby curb (libcurl): testing for time-out in GET request

Using curb gem (https://github.com/taf2/curb) to GET from a REST API. resp = Curl.get("http://someurl.com/users.json") do |http| http.headers["API-Key"] = ENV["API_KEY"] end # do stuff with resp.body_str I've started encountering…
Daniel May
  • 2,192
  • 5
  • 25
  • 43
1
vote
1 answer

Curl request in Ruby for Facebook Api

I'm trying to make a curl call with curb gem equivalent to: curl \ -F 'name=My new CA' \ -F 'subtype=CUSTOM' \ -F 'description=People who bought from my website' \ -F 'access_token=' \ …
1
vote
1 answer

Curb curb-fu gem installation problem

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>…
TDH
  • 567
  • 1
  • 6
  • 22
1
vote
2 answers

Ruby Curl::Easy pass -u parameter

I'm using the ruby curb gem and trying to call this api in the code. But, I'm not sure how to pass the -u parameter. curl -X GET -H 'Accept: application/json' -u 111122223333:…
user2974739
  • 619
  • 1
  • 7
  • 20
1
vote
1 answer

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…
picardo
  • 24,530
  • 33
  • 104
  • 151
1
vote
1 answer

How to get Nokogiri to scrape text from span in Ruby

I'm trying to scrape information from a website using Nokogiri and Curb, but I can't seem to find the right name/ to find where to scrape. I'm trying to scrape the API key, which is at the bottom of the HTML code as "xxxxxxx". The HTML code is: …
marriedjane875
  • 653
  • 2
  • 10
  • 24
1
vote
1 answer

How can I scrape with Nokogiri and cURB?

So I'm trying to scrape a certain section of www.latimes.com as a practice and the section I selected "trb_outfit_group trb_outfit_section" won't seem to scrape, any suggestions? I can post the latimes.com HTML if need be. Here's my code:…
marriedjane875
  • 653
  • 2
  • 10
  • 24
1
vote
3 answers

Can't install curb gem in Linux Mint

I have a problem with installing curb. When I type in my console: sudo gem install curb It returns me following error: Fetching: curb-0.8.6.gem (100%) Building native extensions. This could take a while... ERROR: Error installing curb: …
Mateusz Urbański
  • 7,352
  • 15
  • 68
  • 133
1
vote
2 answers

Ruby 2.1 NameError: uninitialized constant Curl

I just finished setting up another development server for my API built using Ruby and Sinatra, however on this server I can't get the curl gem to work properly. I've installed libcurl and libcurl-devel, and installed the curl gem without any errors,…
ecnepsnai
  • 1,882
  • 4
  • 28
  • 56
1
vote
1 answer

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…
Mike
  • 42
  • 6
1 2 3
8 9