# Another require question

**URL:** <https://www.ruby-forum.com/t/another-require-question/152316>\
**Category:** Ruby\
**Created:** [November 1, 2008, 10:59pm UTC](https://www.ruby-forum.com/t/another-require-question/152316 "2008-11-01T22:59:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![devros](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7c8e57/32.png) [@devros](https://www.ruby-forum.com/u/devros)\
**Post date:** [November 1, 2008, 10:59pm UTC](https://www.ruby-forum.com/t/another-require-question/152316/1 "2008-11-01T22:59:41Z")

</div>

I’ve been learning Ruby for 2 weeks and of course I like it.

However,

1. 

‘file.open(path)’ returns this error in the SciTE editor:

“undefined local variable or method `math’ for main:Object (NameError)”

1. 

I try to require ‘file’ and fail at that too, even with an absolute path  
to ‘file.rb’ under the gems folder.

Maybe I need to reinstall Ruby?

Help please.

---

<div class="post-metadata">

**Author:** ![devros](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7c8e57/32.png) [@devros](https://www.ruby-forum.com/u/devros)\
**Post date:** [November 1, 2008, 11:11pm UTC](https://www.ruby-forum.com/t/another-require-question/152316/2 "2008-11-01T23:11:54Z")

</div>

Ed Hardy wrote:

> I try to require ‘file’ and fail at that too, even with an absolute path  
> to ‘file.rb’ under the gems folder.
> 
> Maybe I need to reinstall Ruby?
> 
> Help please.

I can’t offer any advice on (1), but it sure looks like a typo to me.  
For (2), do you need to require ‘rubygems’ first? I thought the OCI  
normally set up the RUBYOPTS environment variable to “rubygems” but  
perhaps I’m wrong.
