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

  • Home
  • SEARCH
  • 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 7896941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:01:25+00:00 2026-06-03T08:01:25+00:00

I have a Gem which has the following structure: gem | |- lib/ |

  • 0

I have a Gem which has the following structure:

gem
|
|- lib/
   |
   |- gem.rb
   |- gem/
      |
      |- router.rb

Inside gem.rb, there’s the following code:

module Gem
    VERSION = '0.1.8.beta'
end

require 'gem/router'

However, despite using hundreds of functions and methods of my knowledge, router.rb cannot be required!

Any tips? Thanks.

  • 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-03T08:01:27+00:00Added an answer on June 3, 2026 at 8:01 am

    One of two things could be happening. If you are on 1.8.7 and friends, Ruby is probably seeing some standard library folder called gem (don’t name things after standard libraries). If you are using Ruby 1.9.*, you must use a method called require_relative that only searches relative to the current working directory.

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

Sidebar

Related Questions

I have a gem which I wrote and I use it inside my rails
I have a local development machine which has started to give me the following
Which rails voting system plugin or gem that has the following features vote up
I have a engine style Rails plugin from which I can create a gem
I have an awesome trouble with Gem. After executing this command: rm -f /usr/local/lib/ruby/gems/1.9.1/cache/*
I have an application which has the requirement, but infrequent usage, of uploading an
Looking at scala's Predef object, which is automatically imported, I found the following gem
Say I have written a gem which makes lazy calls to the Google Distance
I have a item tracking system which has an Item model which has a
I have a User model, which has a state. The state can be either

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.