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 On Tuesday, December 3, 2013 5:10:08 AM UTC-10, Jeremy Evans wrote: > > On Tuesday, December 3, 2013 2:29:11 AM UTC-8, Attila Gulyas wrote: > >> Hi, >> >> I am having trouble making a simple app work on heroku and >> I am pretty sure that I'm missing something fundamental as >> this is a beginner project. I started it twice, abandoning version 1 >> as I wanted a pure sequel based app. >> > > 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. > > Have you set up the database config for your heroku app properly? Can you > connect to it with the tools heroku supplies? > > 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/groups/opt_out.
