Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Another require question
Ed Hardy
11/1/2008 9:59:00 PM
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)"
2)
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.
--
Posted via
http://www.ruby-...
.
1 Answer
Tim Hunter
11/1/2008 10:09:00 PM
0
Ed Hardy wrote:
> 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)"
>
> 2)
> 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.
--
RMagick:
http://rmagick.ruby...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Another require question
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password