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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:56:56+00:00 2026-06-03T04:56:56+00:00

I would like to require a file called factories.rb: require File.join(File.dirname(__FILE__), ‘factories.rb’ ) and

  • 0

I would like to require a file called “factories.rb”:

require File.join(File.dirname(__FILE__), 'factories.rb' )

and am getting this error:

/home/sean/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems
/custom_require.rb:36:in `require': cannot load such file -- /home/sean/rand/test/factories.rb (LoadError)

I have ruby-1.9.3-p194 installed. Why does it also say 1.9.1 in the error message?

  • 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-03T04:56:57+00:00Added an answer on June 3, 2026 at 4:56 am

    Usually, Factory Girl automatically loads the factories.rb file ( and yours is in the right place ).

    I often have problems with that require syntax ( it’s mostly likely just me ), might try this:

    require File.dirname(__FILE__) + '/factories' # it's okay to leave off the .rb
    

    Also, the folder is 1.9.1 just ’cause the ruby core team decided to keep the name 1.9.1 throughout the 1.9 release schedule. I’ll try and find a link.

    EDIT: Here’s a link to a previous discussion on SO about the folder being 1.9.1:
    1st answer is good.

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

Sidebar

Related Questions

I'm building a website that will require user registration and logon. I would like
Instead of showing an error message 'Name is required' I would like to change
Would like to parse IPv4 address from exit-addresses . Format of the file: ExitNode
I would like to have a function called in an onclick handler, within an
I want to require a file called config.rb in a different ruby file called
I'm integrating wordpress into another application by calling require(../wp-blog-header.php); I would like to be
I would like to implement an input mask on Magento and that requires the
My work requires me to develop for Eclipse 3.4 (ganymede). I would like to
Would like a for loop in jquery so that: For every hover_link: show hidden
Would like someone to take a look at my script and tell me where

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.