Awesome, using the symbol for the class name was what I needed, since I have other associations where the class names don't work. Just to confirm, of those two ways that you can approach the before_fork that I tried, is there one that is better? Or are they pretty much the same. The original post you made was in 2012, so I didn't know if anything had changed.
On Friday, March 27, 2015 at 3:31:29 PM UTC-7, Jeremy Evans wrote: > > 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.
