Need someone to confirm a bug with sqlite3 and mental

I’ve been trying to get this working for two days now. If I get myself
a copy of mental (both from the Gem and from SVN) and try to use
sqlite3 as my database, the rake db:bootstrap script doesn’t seem to
create a user.

It doesn’t report any errors, or problems, it just says it’s complete
and then won’t log in. A look at the database contents reveals that
the admin user simply wasn’t created. This happens when I accept the
default settings and when I specify a username and password.

When using MySQL, the user is in the database and I can log in without
error.

Can anyone reproduce this?

Ben J…

SQLite3 version = 3.3.12

I’ve been trying to get this working for two days now. If I get myself
a copy of mental (both from the Gem and from SVN) and try to use
sqlite3 as my database, the rake db:bootstrap script doesn’t seem to
create a user.

I experience your problem on my windows box, but there’s a deeper
underlying problem on windows with rename_table screwing up column
defaults after rename_column, add_column, drop_column or any other
command that will do a recreate/drop to execute, so I don’t trust
sqlite3 on windows at all. I raised a rails bug
(http://dev.rubyonrails.org/ticket/6768) and mentioned it on the ruby
mailing list, but got nowhere.

You’ll probably see this in your db:

sqlite> .schema users
CREATE TABLE users (“id” INTEGER PRIMARY KEY NOT NULL, “name”
varchar(100) DEFAULT ‘’‘’‘’‘’‘’‘’‘’‘NULL’‘’‘’‘’‘’‘’‘’‘’, “email”
varchar(255) DEFAULT ‘’‘’‘’‘’‘’‘’‘’‘NULL’‘’‘’‘’‘’‘’‘’‘’, “login”
varchar(40) DEFAULT
‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’ NOT NULL,
“password” varchar(40) DEFAULT ‘’‘’‘’‘’‘’‘’‘’‘NULL’‘’‘’‘’‘’‘’‘’‘’,
“created_at” datetime DEFAULT NULL, “updated_at” datetime DEFAULT NULL,
“created_by” integer DEFAULT 0, “updated_by” integer DEFAULT 0, “admin”
boolean DEFAULT ‘f’ NOT NULL, “developer” boolean DEFAULT ‘f’ NOT NULL,
“notes” text);

My sqlite3 under linux works fine.

Dan.

Ben J. wrote:

When using MySQL, the user is in the database and I can log in without error.

Can anyone reproduce this?

Same issue here too.
L

We will probably re-freeze the mental branch to 1.2.2 if this issue
persists.

Sean

On 2/8/07, Ben J. [email protected] wrote:

When using MySQL, the user is in the database and I can log in without error.

Can anyone reproduce this?

Ben, any version of sqlite3 over 3.3.7 will show this issue, until you
update sqlite3-ruby to 1.2.1 and re-freeze rails to 1.2.2 (the bundled
rails into Radiant shows the bug as listed in the Riding Rails blog:

This is shown on Win32 and Linux as well, after update, you could use
sqlite3 3.3.12 if you want without these issues.

HTH,


Luis L.
Multimedia systems

Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
is worthwhile.
Vince Lombardi

On 2/9/07, Sean C. [email protected] wrote:

We will probably re-freeze the mental branch to 1.2.2 if this issue
persists.

Sean,

Its confirmed, will persist… AFAIK, 1.2.x prior 1.2.2 will show
this, didn’t test with 1.1.x branch, but the sqlite adapter inside AR
changed just in the 1.2.x branch (and will not be backported).

It doesn’t report any errors, or problems, it just says it’s complete
Ben, any version of sqlite3 over 3.3.7 will show this issue, until you


Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:
http://lists.radiantcms.org/mailman/listinfo/radiant


Luis L.
Multimedia systems

Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
is worthwhile.
Vince Lombardi

Sean C. wrote:

We will probably re-freeze the mental branch to 1.2.2 if this issue
persists.

Let’s do that.


John L.
http://wiseheartdesign.com

I have the same issue here. Even with sqlite3-ruby 1.2.1. Any
solutions
yet?

radiant (0.6.0)
sqlite3-ruby (1.2.1)
sqlite 3.3.13

It’s a rails issue - the version of rails that you’re using is the most
important one. You should be running 1.2.3 (that’s what
radiant ships with) but you could be using something else (do you have a
vendor/rails dir? If so, is it a 1.2.3 rails?).

Dan.

Thanks for your reply. Rails::VERSION::STRING from script/console says
“1.2.3”. I’m using the rails version radiant ships with (no
vendor/rails).

Robert

Thanks for your reply. Rails::VERSION::STRING from
script/console says
“1.2.3”. I’m using the rails version radiant ships with (no
vendor/rails).

In that case are you sure you’re seeing the same problem?

What do you get when you run .schema in sqlite?

Dan.

In that case are you sure you’re seeing the same problem?
What do you get when you run .schema in sqlite?

http://paste-bin.com/11503

I’m feeling pretty clueless here.

Robert

In that case are you sure you’re seeing the same problem?
What do you get when you run .schema in sqlite?

http://paste-bin.com/11503

I’m feeling pretty clueless here.

Looks like you’re not running windows. The original bug was only (afaik)
experienced in windows. Maybe the bug still exists in
whatever os you’re running under (BSD?).

I’ve got the same versions of rails, radiant and sqlite3-ruby on both my
windows and gentoo linux boxes, and can’t reproduce your
problem.

I posted a bug about this (http://dev.rubyonrails.org/ticket/6768) to
the rails list, you can probably reproduce the bug with the
same test and submit your own ticket detailing your environment.

Dan.

I have the same issue here. Even with sqlite3-ruby 1.2.1. Any solutions
yet?

radiant (0.6.0)
sqlite3-ruby (1.2.1)
sqlite 3.3.13


Robert Klein