Ruby Settings From terminal
 % ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]
=> ~/ruby/grounded/test
 % where ruby
/home/mike/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
/home/mike/.rvm/bin/ruby
/usr/local/bin/ruby
/usr/bin/ruby
=> ~/ruby/grounded/Person/test
 % which ruby
/home/mike/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
% rvm current
ruby-1.9.2-p180
Directory Structure
 % tree
.
├── bowling.rb
└── bowling_spec.rb
File Contents
bowling.rb
class Bowling
end
bowling_spec.rb
require 'rubygems'
require 'rspec'
require 'bowling'
describe Bowling, "#score" do
  it "returns 0 for all gutter game" do
    bowling = Bowling.new
    20.times { bowling.hit(0) }
    bowling.score.should eq(0)
  end
end
% ruby bowling_spec.rb
/home/mike/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- bowling (LoadError)
    from /home/mike/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from bowling_spec.rb:3:in `<main>'
Questions
- Why am I getting a LoadError when bowling.rbandbowling_spec.rbare in the same folder?
- In the error what the heck is .../site_ruby/1.9.1/...when I am running ruby 1.9.2 then why would1.9.1even show up?
- how do I get over this hump and start having fun with ruby.
 
                        
When you
requirea file and don't specify an absolutely path to the file, Ruby looks on its load path (accessed within ruby as$LOAD_PATHor$:) and checks each directory there for the file you want. You cannot loadbowling.rbbecause it's not in a directory on your load path.The solution is one of two things:
Put the current directory on the load path:
This puts the full path to the current working directory on the load path.
Use
requirewith the absolute path to the file:A little additional info:
File.expand_pathreturns the absolute path to the first parameter from the current working directory, unless a second parameter is given; then it uses that as the starting point. So the whole line could be read: