small medium large xlarge

07 Apr 2014, 19:59
Matas Milukas (1 post)

I am having some trouble implementing transactions on my database for some reason.

I create a different file transactions.rb as written in your book but when I execute, I get ActiveRecord::ConnectionNotEstablished .

I have tried different workarounds such as trying to include ActiveRecord::Base in the file, creating account.rb in the model folder and so on. But they didn’t work.

So, I wanted to ask you whether you could give me some suggestions on how to connect to the database from this file.

By the way, I am using a local sqlite3 database.

  You must be logged in to comment