The following way works perfectly
require "#{Rails.root}/lib/mymodule/class1.rb"
But why do do I have to put #{Rails.root}
The following way works perfectly
require "#{Rails.root}/lib/mymodule/class1.rb"
But why do do I have to put #{Rails.root}
As of Ruby 2.0, Ruby no longer considers the current directory to be in the require path. You could also use require ./lib/mymodule/class1.rb
.