Net/http not found?

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.

On Mar 10, 8:39pm, hgl hgl [email protected] wrote:

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.

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs