> Just do: > > DB = Sequel.connect(ENV['DATABASE_URL']) > > Somewhere during Rails initialization before the model classes are loaded. > I generally do it in the config/environments/*.rb files. >
Thanks a lot! I put that line at the end of production.rb and works like a charm. I realized that you suggested the same solution on stack but I got confused where to put it. In development.rb I still use the YAML.load version and the initializer got ditched. Once on heroku there was an error in the views about the model objects being undefined. After putting "Sequel::Model.plugin :active_model" at the end of production.rb it was ok. Is this how you would configure sequel (in separate environment files) or is there a better/conventional way? I understand that this is a more rails-specific question and sequel is a tool for any ruby app using databases. Although now that everything is on track this is not that vital. Thanks again for the quick help:) Attila -- 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/groups/opt_out.
