Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: require doesn't load non-rb files
James Britt
4/20/2007 6:25:00 AM
Volkan Civelek wrote:
> hi,
> i know it sounds so trivial but couldn't tackle...
> here it is...
>
> let's say you have foo.so file.
> at the same folder you have bar.rb file and on that bar.rb file you
> require 'foo.so'
>
> ruby bar.rb gives "No such file to load" error....
>
> if you rename foo.so with foo.rb and modify bar.rb like require 'foo' or require 'foo.rb'
> it all just fine...
>
> any suggestions are greatly appreciated....
http://www.ruby-doc.org/core/classes/Kernel.ht...
Leave off the file extension. Ruby has its own logic for working that
out with 'require'.
require 'foo'
--
James Britt
"I must create a system, or be enslaved by another man's;
I will not reason and compare; my business is to create."
- William Blake
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: require doesn't load non-rb files
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