2

I'm trying to require a downmark script called, appropriately enough, downmarkit.

Four lines into the beginning of my code is the block: require_relative 'downmarkit'

The file does exist:

$ls /home/mike/public_html/downmarkit /home/mike/public_html/downmarkit 

Yet when I execute my script from the public_html folder...

$ruby _import.rb _import.rb:4:in `require_relative': no such file to load -- /home/mike/public_html/downmarkit (LoadError) 

This is probably a really silly mistake on my part, but I'm not seeing it. Why can't ruby see what is right in front of it's face?

2
  • 1
    Is the file read protected? The web server runs as a separate user, so try a "chmod o+r downmarkit". Commented Jan 29, 2012 at 11:12
  • Tried both of those. Actually, the only reason I'm using require_relative is because the standard ./ wouldn't work either. The permissions change didn't work.. same behavior. Commented Jan 29, 2012 at 11:16

1 Answer 1

1

When requiring ruby looks for file with .rb extension. Your ls says that this file has no extension.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.