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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:39:10+00:00 2026-05-23T23:39:10+00:00

I am trying to include a Ruby module. In the file helper.rb, I have

  • 0

I am trying to include a Ruby module.

In the file helper.rb, I have this text

module Helper
...
end

In the file test.rb, I have this text:

....
require 'helper'
...

These files are on the same level of the directory yet I keep getting this error:

<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- helper (LoadError)
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from test.rb:4:in `<main>'

I have also tried

include Helper

in test.rb and get this error:

test.rb:4:in `<main>': uninitialized constant Object::Helper (NameError)

What am I doing wrong?

  • 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-23T23:39:11+00:00Added an answer on May 23, 2026 at 11:39 pm

    In Ruby 1.9 you should use

    require_relative 'helper'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to include the Zend_Service_Amazon_S3 file by using require_once 'Zend/Service/Amazon/S3.php'; I have
I'm trying to include the unit tests for a module in the same source
I am trying to add require and include as Ruby keywords for Notepad++, but
I am getting an uninitialized constant error when trying to include a helper module
I am trying to include a .js file into a php file. My folder
I am trying to include a variable in a .ini file setting by surrounding
I am trying to include jpeg files in latex \includegraphics[width=57.6mm, height=43.2mm]{../../results2/html/zerooneloss_stumps.jpg} With specified the
I am trying to define a class inside a module with the Ruby C
I've been trying to implement the Luhn algorithm in Ruby. I've been following these
I am trying out ruby-prof and ran it against a somewhat self-contained module. The

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.