I had the same problem, and I found just adding `require 'openssl'` at the
top of the script fixed the issue. I don't know why though, didn't have
this problem until updating to the latest ruby 2.0 via RVM.


On 11 October 2013 05:18, Tamara Temple <tamouse.lists / gmail.com> wrote:

>
> On Oct 10, 2013, at 6:14 AM, Zhi-Qiang Lei <zhiqiang.lei / gmail.com> wrote=
:
>
> > equire 'net/http'
> >
> > uri =3D URI('https://github.com')
> >
> > Net::HTTP.start(uri.host, uri.port,
> >                 :use_ssl =3D> uri.scheme =3D=3D 'https') do |http|
> >   request =3D Net::HTTP::Get.new uri
> >
> >   response =3D http.request request # Net::HTTPResponse object
> > end
> >
> > puts response
>
> Looks like it may be a precedence problem. Try changing to this:
>
> > Net::HTTP.start(uri.host, uri.port,
>                 :use_ssl =3D> (uri.scheme =3D=3D 'https')) do |http|
>
> It's binding the :use_ssl =3D> uri.scheme first, then doing the compare=
=85
>
>
>