Forum: Radiant CMS Any workaround for sqlite3 login problem that works?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
68d1b077ca013419a8627dbc0bf2372d?d=identicon&s=25 Robert Lorimor (Guest)
on 2007-07-13 16:42
(Received via mailing list)
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.
8256939170b23d537b83640906c9e19a?d=identicon&s=25 Peter Berkenbosch (Guest)
on 2007-07-13 22:28
(Received via mailing list)
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
this<http://weblog.rubyonrails.com/2007/1/29/using-sqli...
this
<http://lists.radiantcms.org/pipermail/radiant/2007....

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
68d1b077ca013419a8627dbc0bf2372d?d=identicon&s=25 Robert Lorimor (bobbyl)
on 2007-07-14 10:53
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?
8256939170b23d537b83640906c9e19a?d=identicon&s=25 Peter Berkenbosch (Guest)
on 2007-07-14 14:24
(Received via mailing list)
Sorry, I don;t have a clue. Perhaps someone else on the list?

On 7/14/07, Robert Lorimor <robert.lorimor@gmail.com> wrote:
>
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Radiant mailing list
> Post:   Radiant@lists.radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>



--
met vriendelijke groet,

Peter Berkenbosch
9063cd7bc2f7308c7e6b0e5ea2eeb347?d=identicon&s=25 Aitor Garay-Romero (Guest)
on 2007-07-14 17:01
(Received via mailing list)
Could you please send us the output of the sqlite3 command ".dump users"
on the failing data base?  Just to check the schema.

     /AITOR
68d1b077ca013419a8627dbc0bf2372d?d=identicon&s=25 Robert Lorimor (bobbyl)
on 2007-07-16 07:11
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;
9063cd7bc2f7308c7e6b0e5ea2eeb347?d=identicon&s=25 Aitor Garay-Romero (Guest)
on 2007-07-16 11:11
(Received via mailing list)
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
This topic is locked and can not be replied to.