[Catalyst] Problem with static model in Tutorial::MoreCatalystBasics
Adam Witney
awitney at sgul.ac.uk
Wed Mar 11 11:23:36 GMT 2009
Hi,
I am new to Catalyst and so working my way through the tutorial.
Everything has been working fine until i reached the "A STATIC
DATABASE MODEL WITH DBIx::Class" section of the MoreCatalystBasics
tutorial.
After generating the static schema files and adding the relationships
as directed, running the test server causes this error:
mrc1-181:MyApp adam$ script/myapp_server.pl
Couldn't instantiate component "MyApp::Model::DB", "Cannot load schema
class 'MyApp::Schema': DBIx::Class::Schema::throw_exception():
DBIx::Class::Row::throw_exception(): Can't locate MyApp/Schema/
Authors.pm in @INC (@INC contains: /Library/WebServer/Documents/
Catalyst/MyApp/script/../lib /Library/Frameworks/R.framework/Resources/
library/RSPerl/perl/darwin-thread-multi-2level /usr/local/install/
Ensembl/ensembl/modules/ /usr/local/install/Ensembl/ensembl-compara/
modules/ /usr/local/lib/perl5/5.8.9/darwin-thread-multi-2level /usr/
local/lib/perl5/5.8.9 /usr/local/lib/perl5/site_perl/5.8.9/darwin-
thread-multi-2level /usr/local/lib/perl5/site_perl/5.8.9 .) at /usr/
local/lib/perl5/site_perl/5.8.9/Class/C3/Componentised.pm line 126.
Compilation failed in require at /usr/local/lib/perl5/site_perl/5.8.9/
Class/C3/Componentised.pm line 126.
Compilation failed in require at /usr/local/lib/perl5/site_perl/5.8.9/
Catalyst/Model/DBIC/Schema.pm line 333.
at script/myapp_server.pl line 55" at script/myapp_server.pl line 55
Compilation failed in require at script/myapp_server.pl line 55.
I think the problem is that my Authors.pm, Books.pm and BookAuthors.pm
were all created in MyApp/Schema/Result/ rather than MyApp/Schema/
which is what the Tutorial seems to expect (as shown by the line "edit
lib/MyApp/Schema/Books.pm")
I'm not sure if this is a DBIx::Class issue or a Catalyst issue. Does
anyone know how to rectify this problem?
DBIx::Class = 0.08012
Catalyst = 5.71000
thanks for any help
adam
More information about the Catalyst
mailing list