title: How to enable ruby to see tk in the require tk statement?
body: <p>I am starting to learn the very basics of ruby on my iMac running Leopard.</p>
  
  <p>The version that is now on my system is ruby 1.8.6</p>
  
  <p>But, I independently also installed ( via MacPorts ) ruby 1.9 because that corresponds to the latest "PickAxe" book.</p>
  
  <p>The installation location for ruby 1.8.6 is in /usr/bin/ruby
  The installation location for ruby 1.9.1 is in /opt/local/bin ( installed there when I used MacPorts )</p>
  
  <p>My question has to do with an error message related to the require 'tk' statement in
  following fairly standard example, which is in the file HelloWorld.rb</p>
  
  <pre><code>require 'tk'
  root = TkRoot.new { title "Hello world" }
  TkLabel.new(root) do
      text 'Hello world!'
  end
  Tk.mainloop
  </code></pre>
  
  <p>When I invoke the command
  ruby HelloWorld.rb
  I get the results I expect; the program runs.</p>
  
  <p>However, when I invoke the command
  ruby1.9 HelloWorld.rb
  I get the error message</p>
  
  <p>HelloWorld.rb:1:in <code>require': no such file to load -- tk (LoadError)
      from HelloWorld.rb:1:in</code>'</p>
  
  <p>I have been searching the web and various postings but so far have not been able
  to find a clear explanation of what I need to do to make ruby1.9 be able to find tk
  when using the require 'tk' statement.</p>
  
  <p>Does it have to do with running the gem1.9 command ( which is also in /opt/local/bin )?</p>
  
  <p>I have tried invoking
  sudo gem1.9 install tk
  but that results in an error message
  ERROR:  could not find gem tk locally or in a repository</p>
  
  <p>Any suggestions would be greatly appreciated. </p>