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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:28:43+00:00 2026-05-31T03:28:43+00:00

I am attempting to build a Ruby Gem following this tutorial, however I am

  • 0

I am attempting to build a Ruby Gem following this tutorial, however I am unable to configure the rspec as it is unable to find my gem.

$ gem list | grep gemname
gemname (0.0.1.alpha)

$ rake spec
/Users/rudolph9/.rvm/rubies/ruby-1.9.3-p0/bin/ruby -S rspec ./spec/gemname_spec.rb
/Users/rudolph9/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such  file -- gemname (LoadError)
    from /Users/rudolph9/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/rudolph9/Developer/gemname/spec/spec_helper.rb:2:in `<top (required)>'
    from /Users/rudolph9/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/rudolph9/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/rudolph9/Developer/gemname/spec/gemname_spec.rb:1:in `<top (required)>'
    from /Users/rudolph9/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:698:in `load'
    from /Users/rudolph9/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:698:in `block in load_spec_files'
    from /Users/rudolph9/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:698:in `map'
    from /Users/rudolph9/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:698:in `load_spec_files'
    from /Users/rudolph9/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:22:in `run'
    from /Users/rudolph9/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:80:in `run_in_process'
    from /Users/rudolph9/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:69:in `run'
    from /Users/rudolph9/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:10:in `block in autorun'
rake aborted!
/Users/rudolph9/.rvm/rubies/ruby-1.9.3-p0/bin/ruby -S rspec ./spec/gemname_spec.rb failed

Tasks: TOP => default => spec
(See full trace by running task with --trace) 

I this this may have something to do with using rvm or perhaps the way the rake file is being configured on the tutorial previously mentioned but I am not sure.

What is causing the issue?

  • 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-31T03:28:43+00:00Added an answer on May 31, 2026 at 3:28 am

    It looks like this is bubbling up from the require in your spec_helper.rb file. Is your main gem class the same as your gem’s name? You should be requiring the main class and not the gem’s name. Try varying the require statement to one of the following and see if you get a different result.

    require 'gemname'
    # Or
    require 'gemname.rb'
    # Or
    require './path/to/gemname.rb'
    

    I would also try to require the class from IRB and see what circumstances it will work in.

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

Sidebar

Related Questions

I'm attempting to build my first ruby gem and all seemed to go well
I'm attempting to build ruby 1.8.7 on OS X. This is only for one
I'm attempting to build a gem for interacting w/ the Yahoo Placemaker API but
I'm attempting to build/install Cabal on my system and I'm running into the following
I am attempting to build an array of arrays that will with the following
I am currently attempting to build a model using Ruby on Rails. As of
I'm attempting to build an application in PHP to help me configure new websites.
Attempting to build a C# project which has numerous references to assemblies in NuGet
I'm attempting to build Python 2.6.2 from source on my Linux system. It has
I'm attempting to build some C++ code that requires the Windows 7.0 SDK header

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.