문제

Ubuntu 상자에 연석과 Curb-Gem과 libcurl을 설치했습니다.

irb에 들어가서 다음을 실행하면

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> 
.

그래서 모든 보석에 접근 할 수있는 것 같습니다.

그러나 나에게 오류를주는 매우 간단한 루비 앱을 만들었습니다.

#!/usr/bin/ruby

require 'rubygems'
require 'curb'
require 'json'
require 'curb-fu'

response = CurbFu.get('http://slashdot.org')
puts response.body
.

다음과 같은 오류가 발생합니다.

/usr/lib/ruby/gems/1.8/gems/curb-fu-0.4.4/lib/curb-fu/authentication.rb:3: uninitialized constant CurbFu::Authentication::Curl (NameError)
.

libcurl과 관련이 있고 여러 가지 다른 버전을 시도했지만 여전히 기쁨이 없었습니다.

아무도 도움을 줄 수 있습니까?

환호

togs

도움이 되었습니까?

해결책

나는 그것을 일하게 할 수 있었다.

Curb와 Curb-Gem을 모두 제거하고 다시 설치했습니다.

이제 Curb-fu 작업이 있습니다.

이에 대한 문제가있는 사람을위한 나중에 참조하십시오. 이들은 설치된 libcurl 비트입니다.

libcurl3
libcurl3-gnutls
libcurl4-openssl-dev
.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top