# Can't log in with current release

**URL:** <https://www.ruby-forum.com/t/cant-log-in-with-current-release/107731>\
**Category:** Radiant CMS\
**Created:** [June 25, 2007, 8:34pm UTC](https://www.ruby-forum.com/t/cant-log-in-with-current-release/107731 "2007-06-25T20:34:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![pgundlach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b9e5f3/32.png) [@pgundlach](https://www.ruby-forum.com/u/pgundlach)\
**Post date:** [June 25, 2007, 8:34pm UTC](https://www.ruby-forum.com/t/cant-log-in-with-current-release/107731/1 "2007-06-25T20:34:10Z")

</div>

Hi,

I’ve just created a test project with the current release, used sqlite3  
db and used the defaults for the admin user. But radiant doesn’t accept  
the admin/radiant combination somehow.

This is the full log for the request:

Processing SiteController#show\_page (for 127.0.0.1 at 2007-06-25  
20:27:57) [GET]  
Parameters: {“url”=\>“/”, “action”=\>“show\_page”, “controller”=\>“site”}  
Redirected to [http://localhost:3000/admin/welcome](http://localhost:3000/admin/welcome)  
Completed in 0.04298 (23 reqs/sec) | DB: 0.00400 (9%) | 302 Found  
[[http://localhost/](http://localhost/)]

Processing WelcomeController#index (for 127.0.0.1 at 2007-06-25  
20:27:57) [GET]  
Session ID: 945ad237c74aae03fd934bc8ba00e1f3  
Parameters: {“action”=\>“index”, “controller”=\>“admin/welcome”}  
Redirected to [http://localhost:3000/admin/pages](http://localhost:3000/admin/pages)  
Completed in 0.00194 (514 reqs/sec) | DB: 0.00000 (0%) | 302 Found  
[[http://localhost/admin/welcome](http://localhost/admin/welcome)]

Processing PageController#index (for 127.0.0.1 at 2007-06-25 20:27:57)  
[GET]  
Session ID: 945ad237c74aae03fd934bc8ba00e1f3  
Parameters: {“action”=\>“index”, “controller”=\>“admin/page”}  
Redirected to [http://localhost:3000/admin/login](http://localhost:3000/admin/login)  
Filter chain halted as  
[#\<ActionController::Filters::ClassMethods::SymbolFilter:0x3552118  
@filter=:authenticate\>] returned false.  
Completed in 0.00175 (572 reqs/sec) | DB: 0.00000 (0%) | 302 Found  
[[http://localhost/admin/pages](http://localhost/admin/pages)]

Processing WelcomeController#login (for 127.0.0.1 at 2007-06-25  
20:27:57) [GET]  
Session ID: 945ad237c74aae03fd934bc8ba00e1f3  
Parameters: {“action”=\>“login”, “controller”=\>“admin/welcome”}  
Rendering within layouts/application  
Rendering admin/welcome/login  
Completed in 0.03685 (27 reqs/sec) | Rendering: 0.02999 (81%) | DB:  
0.00611 (16%) | 200 OK [[http://localhost/admin/login](http://localhost/admin/login)]

What am I doing wrong? Any clue for me?

Thanks,

Pat

(used Safari 3 and Firefox on OS X)

---

<div class="post-metadata">

**Author:** ![pgundlach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b9e5f3/32.png) [@pgundlach](https://www.ruby-forum.com/u/pgundlach)\
**Post date:** [June 25, 2007, 8:45pm UTC](https://www.ruby-forum.com/t/cant-log-in-with-current-release/107731/2 "2007-06-25T20:45:53Z")

</div>

Just a follow-up, don’t know if it is relevant:

I created the db like this: “rake production db:bootstrap”, but in the  
database itself there is no user:

~/stuff/radianttest/db$ sqlite3 production.sqlite3.db  
SQLite version 3.3.13  
Enter “.help” for instructions  
sqlite\> select \* from users;  
sqlite\>

Patrick

---

<div class="post-metadata">

**Author:** ![pgundlach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b9e5f3/32.png) [@pgundlach](https://www.ruby-forum.com/u/pgundlach)\
**Post date:** [June 25, 2007, 9:04pm UTC](https://www.ruby-forum.com/t/cant-log-in-with-current-release/107731/3 "2007-06-25T21:04:29Z")

</div>

There is a bug in current release that prevents the default user to be  
created when using sqlite3. You can use the Rails console to create a  
new  
user. Start with [http://wiki.radiantcms.org/How\_To\_Reset\_Your\_Password](http://wiki.radiantcms.org/How_To_Reset_Your_Password)  
.

Also be careful with sqlite3 version you use:  
[http://lists.radiantcms.org/pipermail/radiant/2007-June/005302.html](http://lists.radiantcms.org/pipermail/radiant/2007-June/005302.html)

```
/AITOR

```

---

<div class="post-metadata">

**Author:** ![pgundlach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b9e5f3/32.png) [@pgundlach](https://www.ruby-forum.com/u/pgundlach)\
**Post date:** [June 25, 2007, 9:20pm UTC](https://www.ruby-forum.com/t/cant-log-in-with-current-release/107731/4 "2007-06-25T21:20:32Z")

</div>

Hello Aitor,

thanks for your answer. The ‘how to reset your password’ procedure  
didn’t work right:

> > user.save!  
> > ActiveRecord::RecordInvalid: Validation failed: Password confirmation  
> > required  
> > from  
> > /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.2/vendor/rails/activerecord/lib/active\_record/validations.rb:764:in  
> > `save\_without\_transactions!’  
> > …
> 
> > user  
> > =\> #\<User:0x37eab3c @attributes={“name”=\>“Administrator”,  
> > “updated\_at”=\>nil, “created\_by”=\>0, “lock\_version”=\>0, “admin”=\>true,  
> > “notes”=\>nil, “updated\_by”=\>0, “password”=\>“radiant”, “login”=\>“admin”,  
> > “developer”=\>false, “created\_at”=\>nil, “email”=\>“removed\_email\_address@domain.invalid”},  
> > @confirm\_password=“radiant”, @errors=#\<ActiveRecord::Errors:0x37e2ce8  
> > @base=#\<User:0x37eab3c …\>,  
> > @errors={“password\_confirmation”=\>[“required”]}\>, @new\_record=true\>

So I guess I just wait for 0.6.3…

And thanks for the hint to have a look at the sqlite3 version. Mine is  
quite old.

Patrick

---

<div class="post-metadata">

**Author:** ![pgundlach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b9e5f3/32.png) [@pgundlach](https://www.ruby-forum.com/u/pgundlach)\
**Post date:** [June 25, 2007, 9:28pm UTC](https://www.ruby-forum.com/t/cant-log-in-with-current-release/107731/5 "2007-06-25T21:28:33Z")

</div>

Aitor Garay-Romero wrote:

> I remember doing something like “user.confirm\_password = user.password”.  
> It worked for me.

That’s what I had before. Just didn’t work. I can wait a few days.

Thnx,

Patrick

---

<div class="post-metadata">

**Author:** ![pgundlach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b9e5f3/32.png) [@pgundlach](https://www.ruby-forum.com/u/pgundlach)\
**Post date:** [June 25, 2007, 9:24pm UTC](https://www.ruby-forum.com/t/cant-log-in-with-current-release/107731/6 "2007-06-25T21:24:33Z")

</div>

I remember doing something like “user.confirm\_password = user.password”.  
It worked for me.

```
/AITOR
```

---

<div class="post-metadata">

**Author:** ![pgundlach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b9e5f3/32.png) [@pgundlach](https://www.ruby-forum.com/u/pgundlach)\
**Post date:** [June 26, 2007, 11:28am UTC](https://www.ruby-forum.com/t/cant-log-in-with-current-release/107731/7 "2007-06-26T11:28:59Z")

</div>

I checked again this with my current sqlite3 version (3.3.7) and now  
it’s  
working. I didn’t change anything expect the sqlite3 version, so i  
assume  
that this problem is related to  
[http://lists.radiantcms.org/pipermail/radiant/2007-June/005302.html](http://lists.radiantcms.org/pipermail/radiant/2007-June/005302.html).

I started the FAQ page with this issue:

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

```
/AITOR

```

---

<div class="post-metadata">

**Author:** ![pgundlach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b9e5f3/32.png) [@pgundlach](https://www.ruby-forum.com/u/pgundlach)\
**Post date:** [June 26, 2007, 3:09pm UTC](https://www.ruby-forum.com/t/cant-log-in-with-current-release/107731/8 "2007-06-26T15:09:38Z")

</div>

John W. Long wrote:

> Aitor Garay-Romero wrote:
> 
> > There is a bug in current release that prevents the default user to be  
> > created when using sqlite3.
> 
> It works fine with the version I’m using (3.3.7). Could you do a little  
> investigation on this and see if you can figure out what the problem is  
> with the source? I’m happy to push changes in, but I’m not experiencing  
> this problem myself.

When I change setup.rb (lib/radiant) so that the attributes hash in  
create\_admin\_user has an email field as well, the admin user gets  
created. (line 39 in setup.rb)

```
  attributes = {
    :name => name,
    :login => username,
    :password => password,
    :password_confirmation => password,
    :admin => true,
    :email => "removed_email_address@domain.invalid"
  }

```

This is of course just a quick workaround.

Patrick

---

<div class="post-metadata">

**Author:** ![pgundlach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b9e5f3/32.png) [@pgundlach](https://www.ruby-forum.com/u/pgundlach)\
**Post date:** [June 26, 2007, 2:08am UTC](https://www.ruby-forum.com/t/cant-log-in-with-current-release/107731/9 "2007-06-26T02:08:04Z")

</div>

Aitor Garay-Romero wrote:

> There is a bug in current release that prevents the default user to be  
> created when using sqlite3.

It works fine with the version I’m using (3.3.7). Could you do a little  
investigation on this and see if you can figure out what the problem is  
with the source? I’m happy to push changes in, but I’m not experiencing  
this problem myself.

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)
