Jamie Jamie - 1 year ago 166
Ruby Question

"No such file or directory @ rb_sysopen" using OpenURI

I've recently run into a problem using OpenURI. Every

method results in the following error:

"No such file or directory @ rb_sysopen".

My code looks simply like the following:

data = open("http://google.ca/")

I noticed the error shortly after adding
gem 'nokogiri'
to my
and running
bundle install
, though I have no indication of whether or not this caused the problem and have since removed the entry with no positive impact on the problem. Any help would be appreciated.

Answer Source

Try to write require 'open-uri' before your code.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download