net/http not found?

H

hgl hgl

Hello.
Moved my ruby project to a server and tried running it, but I get this
error:

test.rb:1:in `require': no such file to load -- Net/HTTP (LoadError)
from test.rb:1

It persists even if I try running a file that has nothing but 'require
"Net/HTTP"' in it so I assume it's not a problem with the rest of my
code.
Tried taking the http.rb file from the source and running that. Got a
bunch of syntax errors.

Also tried reinstalling ruby, no effect. What am I doing wrong? The
whole
thing runs perfectly on my home PC, but not on the server. Which is
running ubuntu 10.04, in case that matters.
Thanks.
 
L

Luis Lavena

Hello.
Moved my ruby project to a server and tried running it, but I get this
error:

test.rb:1:in `require': no such file to load -- Net/HTTP (LoadError)
        from test.rb:1

It persists even if I try running a file that has nothing but 'require
"Net/HTTP"' in it so I assume it's not a problem with the rest of my
code.
Tried taking the http.rb file from the source and running that. Got a
bunch of syntax errors.

Also tried reinstalling ruby, no effect. What am I doing wrong? The
whole
thing runs perfectly on my home PC, but not on the server. Which is
running ubuntu 10.04, in case that matters.
Thanks.

Have you tried?

require 'net/http'

The class name is Net::HTTP, but the files are all lowercase.

Perhaps works on your home computer since could be an filesystem that
lacks case sensitivity (default OSX partition or Windows)

But will fail on Linux.
 
H

henry g.

Luis Lavena wrote in post #986805:
Have you tried?

require 'net/http'

The class name is Net::HTTP, but the files are all lowercase.

Perhaps works on your home computer since could be an filesystem that
lacks case sensitivity (default OSX partition or Windows)

But will fail on Linux.
haha, thanks. Works now.
Somehow I managed to forget about that, probably due to severe lack of
sleep.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top