From: Gaston Garcia Date: 2005-08-19T03:56:59+09:00 Subject: require question ------=_Part_8913_9258161.1124391415461 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello to the ruby-talkers. It's my first week with ruby, I'm reading Why's= =20 poingnant guide currently. I'm not a programmer, my only knowledge is a=20 little php I use to do web stuff and some actionScript cus I do some Flash.= =20 I thought of learning to program and Ruby is what I've chosen (even though= =20 Eric Raymond says to learn Python is what he thinks is best). Anyways I=20 don't care, Why's poignant guide is funny as hell, and that's it. I wanna b= e=20 a part of it. Now my question is (I'm assuming) a very simple one: I'm trying to use the 'require' Kernel method. I save a file as 'my_string.rb' and it contains just this: my_string =3D 'hello world' On another ruby file saved as 'my_string_reader.rb' I write: require 'my_string' puts 'my_string' I thought that would output my 'hello world', but I get "undefined local=20 variable or method 'my_string' for main:Object (NameError) I'm using windows xp. But the same problem happened on Ubuntu Linux. Same= =20 error. It's the only example from Why's poignant guide that gives me errors= .=20 It's as if it's not reading the variables I've got stored in the required= =20 file. Thanks for your help. --=20 -gaston ------=_Part_8913_9258161.1124391415461--