I have a file called frontend_configuration.rb
which looks like this:
class FrontEndConfiguration
class << self
attr_accessor :base_url
end
end
In my development
config, I have a line:
FrontEndConfiguration.base_url = "http://localhost:4200"
When I try to run my rails server, it gives me an error saying:
uninitialized constant FrontEndConfiguration (NameError)
I am following this Stackoverflow answer here: Rails 3 / Setting Custom Environment Variables
Any ideas why Rails isn't detecting my custom initializer?
I am using Rails 5 API only mode.
Try this.
And now,