Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7031443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:48:14+00:00 2026-05-28T00:48:14+00:00

Ruby Settings From terminal % ruby -v ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux] =>

  • 0

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.rb and bowling_spec.rb
    are 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 would 1.9.1 even show up?
  • how do I get over this hump and start having fun with ruby.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:48:15+00:00Added an answer on May 28, 2026 at 12:48 am

    When you require a file and don’t specify an absolutely path to the file, Ruby looks on its load path (accessed within ruby as $LOAD_PATH or $:) and checks each directory there for the file you want. You cannot load bowling.rb because it’s not in a directory on your load path.

    The solution is one of two things:

    1. Put the current directory on the load path:

      $:.unshift File.expand_path('.')
      

      This puts the full path to the current working directory on the load path.

    2. Use require with the absolute path to the file:

      require File.expand_path('../bowling', __FILE__)
      

    A little additional info: File.expand_path returns 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:

    require /home/mike/src/something/bowling_spec.rb/../bowling
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are returning the following JSON from a ruby code: { label:CPU-7, data:[[50,45,38,34]], settings:{
Here is my terminal output. Anand@luckydev:~ $ which ruby /usr/local/bin/ruby Anand@luckydev:~ $ rvm list
I want to generate Email from my ruby application, So i used Action mail
I already removed all environment variables and ruby/ironruby directories and reinstalled it from scratch.
I am trying to get the emails I send through Gmail from my Ruby
I'm trying out rvm, and installed ruby 1.9.2 and rails 3 with it. I
Based on my previous thread : RVM installed by Ruby not working? where i
I'm trying compass in irb, this is my code: C:\Documents and Settings\test>irb irb(main):001:0> require
I'm running into some issues doing a describeSObject call from a ruby on rails
Bundler version 1.0.22 Deploying to RedHat Linux 6 Ruby 1.9.3p0 Rails 3.2.1 I read

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.