small medium large xlarge

29 Aug 2012, 15:55
Timothy Western (1 post)

While running through the Churn-tests I noticed the following error:

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

I did some research and came upon the following article on StackOverflow:

What it boils down to, is an apparent security fix to ruby that changes how you have to do the Requires. I’ve tried both methods below:



require ‘./filename’


require_relative ‘filename’

forms all seem to work in replacing the require syntax used. So you could use it like one of the below patterns and it would work.

require ‘./churn’
require File.expand_path(‘churn.rb’) require_relative ‘churn’

Thought I would pass this on, in case anyone ran into the same issue that I did.

01 Oct 2012, 07:12
d3vin h (4 posts)

just encountered this error and followed your advice. thx for the post.