From: Dave Burt Date: 2006-09-25T09:25:19+09:00 Subject: Re: Cookbook example - uninitialized constant Max Russell 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| > ... > > > > 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? > I'm a bit mystified and don't have a Ubuntu box, but I'll ask some clarifying questions anyway. What versions of Ruby, Rubygems and BlinkenLights are you running? ruby --version gem --version gem list | grep blinken Cheers, Dave