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 7782947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:41:55+00:00 2026-06-01T19:41:55+00:00

Though I have gem installed I get following error /rbing.rb:4: uninitialized constant RBing (NameError)

  • 0

Though I have gem installed I get following error

/rbing.rb:4: uninitialized constant RBing (NameError)
from /Users/bhushan/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /Users/bhushan/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from rbing.rb:3

And this error are specific to only Ruby 1.8.7 and Jruby same file works on 1.9.2. What might be broken?

rbing.rb file looks like this

require 'rubygems'
require 'rbing'
bing = RBing.new("APPID")

rsp = bing.web('infosys', :site => "linkedin.com")
puts rsp.web.results[0].url
  • 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-06-01T19:41:57+00:00Added an answer on June 1, 2026 at 7:41 pm

    In Ruby 1.8, the current directory is in the load path. So when you say require 'rbing', instead of using the rbing gem, Ruby will look in the current directory, see a file called rbing.rb (which is the current file), and reload it. Thus when it hits the reference to RBing, Ruby doesn’t know what to do, because it was never defined. (Obviously the same thing happens for JRuby, although this may be dependent on which version you are using.) You are not seeing this error in Ruby 1.9 because the current directory is not in the load path, therefore Ruby will skip the current file and require the rbing gem.

    You can confirm this by placing this line at the top of the file:

    puts "#{__FILE__} was required"
    

    Under 1.9, this should say

    rbing.rb was required
    

    Under 1.8 and JRuby, this should say

    rbing.rb was required
    ./rbing.rb was required
    

    (and then fail with uninitialized constant RBing).

    tl;dr: Name your file something else.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Even though I have a fermi card(gtx 560) I get this error on VS2010:
I can't seem to get heroku to db:push, even though I have installed taps.
I can't send email to my app users, even though I have the permissions.
I have the following gems defined in my environment.rb file: config.gem authlogic config.gem paperclip
I have a gem installed in my home directory on a laptop (eg not
I installed Ruby 1.8.7 through apt-get. I then installed 1.9.1 through RVM. The RVM
I have installed RVM in my ubunut linux box and configured the Rails 3
I just installed the plugin for Paperclip and I am getting the following error
I can't get the server to start in debugging mode: even though I have
When trying to install the mysql gem from cPanel on my website, I get

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.