0

I created a User model with attributes name and email. So to create users, I opened the rails console and used the sandbox.

rails console --sandbox user1 = User.new( name: "example" , email: example@org.com) => #

But when I do

>>user1.save

I get the following error:

1.9.3p194 :012 > user2.save
   (0.3ms)  SAVEPOINT active_record_1
ActiveRecord::StatementInvalid: SQLite3::SQLException: near "SAVEPOINT": syntax error: SAVEPOINT active_record_1

What could the possible error be? Some dependency issue between sqlite3 1.3.6 and activerecord 3.2.5

Subal Charla
  • 159
  • 2
  • 11
  • Does the error replicate if you dont use `SQlite3` and use any other possible a relation database like `mysql` – Viren Jun 18 '12 at 17:27
  • I have not tried it with anything other than SQLite3. Do you mysql would be a better RBMS? I think there is a compatibility issue between sqlite3-ruby 1.3.6 and the on-board SQLite3 version (3.4.0). – Subal Charla Jun 19 '12 at 07:31
  • Why dont you use sqlite3 gem that come in build with rails3 application if you dont use any adapter – Viren Jun 19 '12 at 10:28
  • Opps did notice you are already using sqlite3 got confuse in the name – Viren Jun 19 '12 at 11:18

0 Answers0