Please disregard, solved. The answer was to move my constants higher in
environment.rb (before require File.expand_path('../application',
__FILE__)).
Apparently with this line in environment.rb, Rails loads all models when it
hits this line, thus if there are constants referenced in the models which
appear below in environment.rb, an error is thrown. Solution is to move
constants before this line.
require File.expand_path('../application', __FILE__)
On Fri, Nov 12, 2010 at 9:07 AM, David Kahn <[email protected]>wrote:
> I have the following constant in production.rb:
> GSA_EPLS_DATASOURCE = FILESTORE + "/" + "datafiles/gsa_epls.xml"
>
> The constant FILESTORE is located in environment.rb:
> FILESTORE = "../creditcompare_filestore/" + Rails.env
>
> When I try to migrate my db on heroku I get this error which points to the
> line above in production.rb
>
> uninitialized constant FILESTORE
>
>
> So I am gathering that there is a load sequence issue. I am trying to keep
> FiLESTORE in highest level as it applies to all environments... I dont have
> to but would like to. Is there a way to do what I am trying to do?
>
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.