------ art_52317_27869086.1159472887095 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 23/09/06, Max Russell <thedossone / gmail.com> wrote: > > Cross posting this from Ubuntu forums > > I recently got the excellent Ruby cookbook and scanning through quickly > seized upon the Blinkenlights examples. > > However I'm seeing something like this: > ./blinkenlights.rb > ./blinkenlights.rb:7: uninitialized constant BlinkenLights (NameError) > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > from ./blinkenlights.rb:4 > > > whenever I try to execute the script > #!/usr/bin/ruby > > require 'rubygems' > require 'blinkenlights' > > #Turn individual lights on and off > BlinkenLights.open do |lights| > lights.left rue > lights.middle rue > lights.right rue > > lights.scr alse > lights.cap alse > lights.num alse > end > > #Dislay a light show > BlinkenLights.open do |lights| > lights.left_to_right > 10.times{ lights.random } > lights.right_to_left > end > > > > I'm on Ubuntu 6.06 LTS and I have the Blinkenlightsgem installed, I used > sudo gem install blinkenlights and can list my local gems and see it. > > So why do I get this error? > > -- > Posted via http://www.ruby-forum.com/. > > your script is named 'blinkenlights.rb', right? Then you're are trying to 'require' your own script. -Thomas -- -- www.LuLaLiebe.de - Kennenlernen, Treffen, Verlieben ...finde deinen Traumparter bei LuLaLiebe! ------ art_52317_27869086.1159472887095--