RAILS_ROOT require?
10,318
Yes, you should require the environment.rb:
require File.dirname(__FILE__) + '/../config/environment.rb'
puts RAILS_ROOT
And Rails.root
instead.
Related videos on Youtube
Author by
mportiz08
Updated on October 11, 2020Comments
-
mportiz08 over 3 years
I'm trying to access the RAILS_ROOT constant in a file residing in the /lib directory, but I'm not able to (uninitialized constant error). Is there something that I need to require to be able to do this?
-
Bernard Banta almost 12 yearsYou don't have to include
require File.dirname(__FILE__) + '/../config/environment.rb'
-
-
K.-Michael Aye over 11 yearsI get this error when trying to install Redmine, but I don't understand the answer. :( Where do I have to do what? "Require"?