Jellicle
Jellicle

Reputation: 30296

Ruby `require` doesn't find my file in rails lib

I'm trying to load a file from my rails 'lib' dir, but I get the error:

LoadError: cannot load such file -- lib/ss.rb

This is odd because in the console:

File::exist? 'lib/ss.rb' # => true
load 'lib/ss.rb' # => true
require 'lib/ss.rb' # => LoadError

What's more, this file should be auto-loading on start because in my application.rb file, I uncommented the line:

config.autoload_paths += %W(#{config.root}/lib)

Can anyone give me insight?

Upvotes: 2

Views: 721

Answers (1)

simonmenke
simonmenke

Reputation: 2880

You should not include lib and .rb

require "ssl"

Upvotes: 1

Related Questions