문제

I followed the instructions specified in the GUIDE to use mechanize, but when I try to get an HTTPS page, I get a segfault.

require 'rubygems'
require 'mechanize'

agent = Mechanize.new

ruby-1.9.3-p0 :005 > agent.get("https://google.com")
/Users/wlue/.rvm/gems/ruby-1.9.3-p0/gems/net-http-persistent-2.3.3/lib/net/http/persistent/ssl_reuse.rb:70: [BUG] Segmentation fault

I'm wondering if I have rvm incorrectly configured somehow, but I don't know how to test that. I also have this in my top level .rvmrc, if that helps

export rvm_path="/Users/wlue/.rvm"

I don't think this is a ruby bug, because no one else has had problems with calling get on an https page, but I'm at a loss as to how to debug this.

edit: Turns out it's actually caused by an interaction with Rails. When I go directly to IRB it works fine, but rails console doesn't.

도움이 되었습니까?

해결책

I was having this problem, but it seems to work now in ruby 1.9.3p194

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