Ruby's autoload not working in 1.8.7 or Ruby Enterprise?
- by webren
I've written a gem and within a file I am doing this to autoload my main gem logic:
$:.push File.expand_path('lib', __FILE__)
require "oa-casport/version"
require 'omniauth/core'
module OmniAuth
module Strategies
autoload :Casport, 'omniauth/strategies/casport'
end
end
For Ruby versions 1.8.7 and ree, it prints out "no such file to load - omniauth/strategies/casport'
But it doesn't print out this message on version 1.9.2. Is there something off with the location of calling autoload?
The repo for the gem is located at https://github.com/stevenhaddox/oa-casport