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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:25:42+00:00 2026-06-07T22:25:42+00:00

I have a custom gem and am encountering a really weird LoadError when I

  • 0

I have a custom gem and am encountering a really weird LoadError when I install it as a gem and attempt to require it in irb.

Everything works fine with my rspec tests inside the project folder. This only occurs when using it as an actual gem in irb.

The file it throws a LoadError exception at (/lib/mws/api/order_response.rb) does in fact exist. I’ve tried renaming the file and updating the file that requires it (/lib/mws.rb). I’ve tried recreating the file thinking maybe there was a permissions issue. Nothing works.

If I comment out the require line for that specific file, everything works. There’s nothing special about the file. There’s 4 other files nearly identical to it (*_response.rb).

I feel like I’m taking crazy pills. I must being overlooking something but I sure don’t see it.

Trace:

chris@Samus:~$ irb
1.9.3p194 :001 > require 'mws'
LoadError: cannot load such file -- mws/api/order_response
    from /Users/chris/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/chris/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/chris/.rvm/gems/ruby-1.9.3-p194/gems/mws-0.1.18/lib/mws.rb:14:in `<top (required)>'
    from /Users/chris/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
    from /Users/chris/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
    from /Users/chris/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
    from (irb):1
    from /Users/chris/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in `<main>'

File with the requires (/lib/mws.rb)

require 'mws/base'
require 'mws/connection'
require 'mws/utility'

require 'mws/api/seller'
require 'mws/api/product'
require 'mws/api/order'
require 'mws/api/report'

require 'mws/api/general_response'
require 'mws/api/product_response'
require 'mws/api/report_response'
require 'mws/api/seller_response'
require 'mws/api/order_response' # <--- the offending line

module MWS
  # @see Base#initialize MWS::Base for instantiation details.
  # @return [Base] returns MWS::Base object.
  def self.new(merchant_id, access_key, secret_key)
    MWS::Base.new(merchant_id, access_key, secret_key)
  end
end

# The below is for documentation generation purposes.

# MWS is a wrapper for the Amazon Marketplace Web Service (MWS) API.
module MWS
  # API handles all the Amazon MWS API specific stuff.
  module API
  end
  # Utilities contains various functions needed throughout MWS. Utilities is a mixin to multiple classes.
  module Utilities
  end
end

File I’m requiring (/lib/mws/api/order_response.rb):

module MWS
  module API

    # Class for parsing Amazon's XML responses into managable objects.
    class OrderResponse

      # Include GeneralResponse instance methods as class methods
      extend GeneralResponse

    end
  end
end

And my file structure

enter image description here

  • 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-07T22:25:44+00:00Added an answer on June 7, 2026 at 10:25 pm

    Can should check in /Users/chris/.rvm/gems/ruby-1.9.3-p194/gems/mws-0.1.18/lib/mws/api if the file lies there (and doesn’t have obscure permissions).

    If that’s not the case, you probably forgot to add it in your gemspec.

    If it is there, please try requiring/loading it with the absolute path (for debugging purpose).

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

Sidebar

Related Questions

I have a custom gem which is built on the following structure of files:
I have the following custom Refinery CMS engines in my gemfile: gem 'refinerycms-venues', '1.0',
I have written a custom Ruby Gem to hook into our company's authentication and
I have some namespaced custom tags(developed with radius gem) that i would like to
I have a Gem that I need to install it from github using bundler
I'm using rails-rspec gem and I have several specs (models, controllers, etc). When I
I have an annoying problem whereby the rspec gem is installed on my machine
I have custom UITableViewCell . It contains UITextLabel . When I press this cell
I have custom validation rule: public function customRule($check) { } Inside this rule I
I have custom classes that I currently instantiate within App.xaml as resources. I want

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.