On Friday, March 27, 2015 at 3:18:59 PM UTC-7, Jon Mattingly wrote:
>
> I've been having a bit of trouble getting my Heroku Postgres to work 
> correctly with sequel. I've tracked the errors to be related to my usage of 
> unicorn - https://devcenter.heroku.com/articles/forked-pg-connections. 
>
> I also found an answer here about three years ago referencing correct 
> setup for unicorn - 
> https://groups.google.com/forum/#!topic/sequel-talk/lrKLmgyOWOU. 
>
> However, I'm still having trouble getting it to work. When I modify my 
> unicorn.rb file as stated in the previous thread, I'm getting 
> 'uninitialized constant' errors when loading my sequel model files, which 
> I'm assuming happens because Sequel is not initialized properly? It's worth 
> saying that this ONLY happens on heroku, localhost is fine.
>

Your error appears unrelated to your initialization code, but in your 
associations code, related to the order in which you are loading files.
 

> Here's the offending line in unit.rb - 
> many_to_one :concept, :class => Concept
>

The Concept class probably isn't defined when you get to this line of code. 
Switch to:

  many_to_one :concept, :class =>:Concept

You could also just use:

  many_to_one :concept

Since it would default to using the Concept class.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to