# Any workaround for sqlite3 login problem that works?

**URL:** <https://www.ruby-forum.com/t/any-workaround-for-sqlite3-login-problem-that-works/109344>\
**Category:** Radiant CMS\
**Created:** [July 13, 2007, 4:42pm UTC](https://www.ruby-forum.com/t/any-workaround-for-sqlite3-login-problem-that-works/109344 "2007-07-13T16:42:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rlorimor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/96bed5/32.png) [@rlorimor](https://www.ruby-forum.com/u/rlorimor)\
**Post date:** [July 13, 2007, 4:42pm UTC](https://www.ruby-forum.com/t/any-workaround-for-sqlite3-login-problem-that-works/109344/1 "2007-07-13T16:42:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rlorimor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/96bed5/32.png) [@rlorimor](https://www.ruby-forum.com/u/rlorimor)\
**Post date:** [July 13, 2007, 10:28pm UTC](https://www.ruby-forum.com/t/any-workaround-for-sqlite3-login-problem-that-works/109344/2 "2007-07-13T22:28:47Z")

</div>

See [http://wiki.radiantcms.org/FAQ](http://wiki.radiantcms.org/FAQ)

Default ‘admin’ user is not created during project creation when using  
SQLite3 # [http://wiki.radiantcms.org/FAQ#sqlite3\_error](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-sqlite3-with-rails](http://weblog.rubyonrails.com/2007/1/29/using-sqlite3-with-rails)and  
this  
[http://lists.radiantcms.org/pipermail/radiant/2007-June/005302.html](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

---

<div class="post-metadata">

**Author:** ![rlorimor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/96bed5/32.png) [@rlorimor](https://www.ruby-forum.com/u/rlorimor)\
**Post date:** [July 14, 2007, 10:53am UTC](https://www.ruby-forum.com/t/any-workaround-for-sqlite3-login-problem-that-works/109344/3 "2007-07-14T10:53:57Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![rlorimor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/96bed5/32.png) [@rlorimor](https://www.ruby-forum.com/u/rlorimor)\
**Post date:** [July 14, 2007, 2:24pm UTC](https://www.ruby-forum.com/t/any-workaround-for-sqlite3-login-problem-that-works/109344/4 "2007-07-14T14:24:57Z")

</div>

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

On 7/14/07, Robert L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> * * *
> 
> Radiant mailing list  
> Post: removed\_email\_address@domain.invalid  
> Search: [http://radiantcms.org/mailing-list/search/](http://radiantcms.org/mailing-list/search/)  
> Site: [http://lists.radiantcms.org/mailman/listinfo/radiant](http://lists.radiantcms.org/mailman/listinfo/radiant)

–  
met vriendelijke groet,

Peter B.

---

<div class="post-metadata">

**Author:** ![rlorimor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/96bed5/32.png) [@rlorimor](https://www.ruby-forum.com/u/rlorimor)\
**Post date:** [July 16, 2007, 7:11am UTC](https://www.ruby-forum.com/t/any-workaround-for-sqlite3-login-problem-that-works/109344/5 "2007-07-16T07:11:51Z")

</div>

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;

---

<div class="post-metadata">

**Author:** ![rlorimor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/96bed5/32.png) [@rlorimor](https://www.ruby-forum.com/u/rlorimor)\
**Post date:** [July 14, 2007, 5:01pm UTC](https://www.ruby-forum.com/t/any-workaround-for-sqlite3-login-problem-that-works/109344/6 "2007-07-14T17:01:08Z")

</div>

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

```
 /AITOR
```

---

<div class="post-metadata">

**Author:** ![rlorimor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/96bed5/32.png) [@rlorimor](https://www.ruby-forum.com/u/rlorimor)\
**Post date:** [July 16, 2007, 11:11am UTC](https://www.ruby-forum.com/t/any-workaround-for-sqlite3-login-problem-that-works/109344/7 "2007-07-16T11:11:25Z")

</div>

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](http://wiki.radiantcms.org/FAQ)) to comment this.

```
/AITOR

```
