Any workaround for sqlite3 login problem that works?

Hi All,

This is my first post to the list, and any list in general. Here it
goes…

I have the following:
sqlite3-3.4.0 #the very latest from source
gem sqlite3-ruby 1.2.1

When I create Radiant project on my local Ubuntu system using the
method:

radiant --database sqlite3 myrailsproject
cd myrailsproject
sudo production db:bootstrap
script/server -e production

I get the login screen, but I cannot login.

I read on this list that there is a problem with sqlite3 and radiant
causing
this problem. I was unable to use the console to add the admin user.

Is there a current work around that works?

Thanks a bunch.

See http://wiki.radiantcms.org/FAQ

Default ‘admin’ user is not created during project creation when using
SQLite3 # http://wiki.radiantcms.org/FAQ#sqlite3_error

There is an incompatibility between Rails < 1.2.3 and sqlite3 < 3.3.17
on
all platforms. This prevents the creation of the default ‘admin’ user
when
creating a new project with “radiant -d sqlite3 path”. It also generates
random errors because of incorrect handling of NULL values in the
database.

Please update at least to Radiant 0.6.1 (which includes the latest Rails
in
the ‘vendor’ directory) and to sqlite3 3.3.17. For more details see
thishttp://weblog.rubyonrails.com/2007/1/29/using-sqlite3-with-railsand
this
http://lists.radiantcms.org/pipermail/radiant/2007-June/005302.html.

If you created a database with a failing sqlite3 version then create a
new
one with a correct version since the db schema will be incorrect. In the
improbable case that you already have valuable data in the old db,
migrate
it to the new one exporting/importing it with the sqlite3 command line
utility.

Peter

I need to stress that I am still having the problem with the VERY latest
version of SQLite3 3.4.0, which is greater than 3.3.17.

Also have the latest:
gem sqlite3-ruby 1.2.1
gem radiant 0.6.2

Any other thoughts on what I can do get around the no admin and password
problem?

Sorry, I don;t have a clue. Perhaps someone else on the list?

On 7/14/07, Robert L. [email protected] wrote:


Posted via http://www.ruby-forum.com/.


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


met vriendelijke groet,

Peter B.

Aitor Garay-Romero wrote:

Could you please send us the output of the sqlite3 command “.dump users”
on the failing data base? Just to check the schema.

 /AITOR

Ok. Here it is:

BEGIN TRANSACTION;
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, “lock_version” integer DEFAULT 0);
CREATE UNIQUE INDEX “login” ON users (“login”);
COMMIT;

Could you please send us the output of the sqlite3 command “.dump users”
on the failing data base? Just to check the schema.

 /AITOR

That schema is incorrect and has the known “NULL problem” of the
ruby-sqlite3 gem. The correct schema is:

---- 8< ----

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 NULL, “updated_by” integer DEFAULT NULL,
“admin” boolean DEFAULT ‘f’ NOT NULL, “developer” boolean DEFAULT ‘f’
NOT
NULL, “notes” text, “lock_version” integer DEFAULT 0);
---- 8< ----

You have something wrong somewhere.  If you created that database 

before
updating sqlite3, create it again.

I have rails+sqlite3 working on a debian machine and i don't use the

sqlite3 gem, instead i use a debian package:

---- 8< ----
aitor@cpbh-debian:~$ radiant --version
Radiant 0.6.1
aitor@cpbh-debian:~$ sqlite3 --version
3.3.17
aitor@cpbh-debian:~$ gem list | grep sqlite
aitor@cpbh-debian:~$ dpkg -l | grep sqlite
ii  libsqlite3-0                      3.3.17-1

SQLite
3 shared library
ii libsqlite3-ruby 1.2.1-1
SQLite3 interface for Ruby
ii libsqlite3-ruby1.8 1.2.1-1
SQLite3 interface for Ruby 1.8
ii sqlite3 3.3.17-1
A
command line interface for SQLite 3
ii sqlite3-doc 3.3.17-1
SQLite
3 documentation
aitor@cpbh-debian:~$
---- 8< ----

I updated the FAQ (http://wiki.radiantcms.org/FAQ) to comment this.

/AITOR