[Catalyst] Some "How Do I ..." questions

Bill Moseley moseley at hank.org
Wed Apr 27 16:50:56 CEST 2005


On Wed, Apr 27, 2005 at 01:26:41AM -0400, Andy Grundman wrote:
> This usually means it didn't find your database and load any tables. 
> Check lib/ServerDB.pm and make sure the path to the yml file is correct.

That was a different error, and I had fixed that.

    moseley at bumby:~/ServerDB$ fgrep YAML lib/ServerDB.pm 
    use YAML ();
    ServerDB->config( YAML::LoadFile('/home/moseley/ServerDB/ServerDB.yml') );


>  Also check the yml file for correct paths.

    moseley at bumby:~/ServerDB$ cat ServerDB.yml 
    --- #YAML:1.0
    authentication:
      password_field: password
      password_hash: sha
      role_class: ServerDB::M::CDBI::Role
      user_class: ServerDB::M::CDBI::User
      user_field: username
      user_role_class: ServerDB::M::CDBI::UserRole
      user_role_user_field: user
    dsn: dbi:SQLite2:/home/moseley/ServerDB/ServerDB.db
    name: ServerDB
    plucene_dir: '/home/moseley/ServerDB/plucene'
    root: '/home/moseley/ServerDB/root'

Look ok?  BTW -- it would be nice to have a $root variable that can
by set by FindBin or some startup option to allow relocation.

I think I've changed all the paths:

moseley at bumby:~/ServerDB$ fgrep -R /moseley/ .

./lib/ServerDB/Script/CDBI.pm:my $dsn = "DBI:SQLite2:/home/moseley/ServerDB/ServerDB.db";
./lib/ServerDB.pm:ServerDB->config( YAML::LoadFile('/home/moseley/ServerDB/ServerDB.yml') );
./ServerDB.yml:dsn: dbi:SQLite2:/home/moseley/ServerDB/ServerDB.db
./ServerDB.yml:plucene_dir: '/home/moseley/ServerDB/plucene'
./ServerDB.yml:root: '/home/moseley/ServerDB/root'

moseley at bumby:~/ServerDB$ fgrep -R /andy/ .

[nothing]


Still same error:

[Wed Apr 27 07:44:41 2005] [catalyst] [error] Caught exception "Can't locate object method "search" via package "ServerDB::M::CDBI::User" (perhaps you forgot to load "ServerDB::M::CDBI::User"?) at /home/moseley/ServerDB/script/../lib/Catalyst/Plugin/Authentication/CDBI.pm line 248."

Again, I don't have a separate module: ServerDB::M::CDBI::User in the
distribution.

Thanks,


-- 
Bill Moseley
moseley at hank.org




More information about the Catalyst mailing list