FAQ
In following the Catalyst tutorial for section 3. I can't get catalyst to
create the schema folder. I run the following command:

perl scripit/myapp_create.pl model DB DBIC::Schema MyApp::Schema
creat=dynamic dbi:SQLite:myapp.db

I get the following results:

exists "C:\__Catalyst\MyApp\lib\MyApp\Model"
exists "C:\__Catalyst\MyApp\t"
created "C:\__Catalyst\MyApp\lib\MyApp\Model\DB.pm"
created "C:\__Catalyst\MyApp\t\model_DB.t"

but the schema folder and schema.pm file is not created. When I attempt to
run the tets server i get the following message:

C:\__Catalyst\MyApp>perl script/myapp_server.pl
Couldn't instantiate component "MyApp::Model::DB", "Cannot load schema class
'My
App::Schema': Can't locate MyApp/Schema.pm in @INC (@INC contains:
C:/__Catalyst
/MyApp/script/../lib C:/Perl/site/lib C:/Perl/lib .) at
C:/Perl/site/lib/Catalys
t/Model/DBIC/Schema.pm line 295.
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.

Am I missing somthing?

My enviroment is:

Windows XP sp2
ActiveState Perl 5.8.8 v 819
Catalyst modules
???????????????????????????????????????????????????????????????????????????????
?name ?version ?abstract
?area?
???????????????????????????????????????????????????????????????????????????????
?Catalyst-Action-RenderView ?0.08 ?Sensible default end action.
?site?
?Catalyst-Component-InstancePer??0.001001?Moose role to create only one
??site?
?Catalyst-Devel ?1.08 ?Catalyst Development
Tools ?site?
?Catalyst-Model-DBI ?0.20 ?DBI Model Class
?site?
?Catalyst-Model-DBI-SQL-Library ?0.15 ?SQL::Library DBI Model Class
?site?
?Catalyst-Model-DBIC ?0.16 ?(DEPRECATED) DBIC Model
Class ?site?
?Catalyst-Model-DBIC-Plain ?0.02 ?DBIC Model Class
?site?
?Catalyst-Model-DBIC-Schema ?0.21 ?DBIx::Class::Schema Model
Class?site?
?Catalyst-Model-DBIC-Schema-Que??0.05 ?DBIx::Class::QueryLog Model
Cl??site?
?Catalyst-Plugin-ConfigLoader ?0.21 ?Load config files of various
t??site?
?Catalyst-Plugin-StackTrace ?0.09 ?Display a stack trace on the
d??site?
?Catalyst-Plugin-Static-Simple ?0.20 ?Make serving static pages
pain??site?
?Catalyst-Runtime ?5.7015 ?Catalyst Runtime
version ?site?
?Catalyst-View-TT ?0.27 ?Template View Class
?site?
???????????????????????????????????????????????????????????????????????????????

Thanks for your help....
--
View this message in context: http://www.nabble.com/Issue-with-Tutorial-section-3-tp21139137p21139137.html
Sent from the Catalyst Web Framework mailing list archive at Nabble.com.

Search Discussions

  • Kieren Diment at Dec 23, 2008 at 4:41 am

    On 23/12/2008, at 2:50 PM, rpnoble wrote:
    [snip]

    My enviroment is:

    Windows XP sp2
    ActiveState Perl 5.8.8 v 819
    Catalyst modules

    I don't know to what extent you have flexibility with the per
    distribution that you're using, but strawberry perl is probably a
    better solution than activestate at this stage. The only place that
    activestate is better is if your company need commercial support, even
    then there are probably companies in the catalyst community that can
    provide commercial support for catalyst on windows.

    Have a look at http://www.catalystframework.org/calendar/2008/7

    For development I'd recommend getting the perl 5.8 distribution from
    strawberryperl.com and installing a non-portable perl (due to a bug
    with subroutine attributes in perl 5.10 development is hard until
    5.10.1 is released as you get unhelpful error messages - 5.10 (which
    includes portable support) is adequate for deployment though).
  • Rpnoble at Dec 23, 2008 at 7:56 am
    I have found out the issue. I'll post what I did here to help the next
    person.

    What I did wrong
    I followed all steps in Tutorial 3, up to the following step:

    script/myapp_create.pl model DB DBIC::Schema MyApp::Schema create=dynamic
    dbi:SQLite:myapp.db

    what I did not realize was that I left open my SQLite database in SQLlitSpy
    and this locked the database, keeping the create.pl script from reading the
    schema. The output from the create.pl helper script was:

    exists "C:\__Catalyst\MyApp\lib\MyApp\Model"
    exists "C:\__Catalyst\MyApp\t"
    created "C:\__Catalyst\MyApp\lib\MyApp\Model\DB.pm"
    created "C:\__Catalyst\MyApp\t\model_DB.t"

    Notice there is no schema.pm created. I saw that SQLiteSpy was opened, I
    closed it down. I then ran the create.pl helper script again. I got the same
    responce with DB.pm rename .new.

    The solution
    To fix the problem of the Schema folder/directory not being created was to
    delete the MyApp folder and start over. This time without the SQLite databse
    locked. The script/myapp_create.pl model DB DBIC::Schema MyApp::Schema
    create=dynamic dbi:SQLite:myapp.db then created the output expected.

    create.pl output below:
    exists "C:\__Catalyst\MyApp\lib\MyApp\Model"
    exists "C:\__Catalyst\MyApp\t"
    exists "C:\__Catalyst\MyApp\lib\MyApp"
    created "C:\__Catalyst\MyApp\lib\MyApp\Schema.pm"
    created "C:\__Catalyst\MyApp\lib\MyApp\Model\DB.pm"
    created "C:\__Catalyst\MyApp\t\model_DB.t"


    Lesson learned
    The create helper script can not detect that the database is locked and
    therefore skips the Schema creation. Also after the database is unlocked the
    helper script can't re-run with the expected results. It seams to stay in
    the locked state. This means that the create.pl helper can only be run once
    in the build process.

    I'll be making working copies to allow me to roll back any changes/mistakes
    I make.

    I hope this helps the next person. Also is there a method to roll back any
    changes mage by the create.pl helper script?



    rpnoble wrote:
    In following the Catalyst tutorial for section 3. I can't get catalyst to
    create the schema folder. I run the following command:

    perl scripit/myapp_create.pl model DB DBIC::Schema MyApp::Schema
    creat=dynamic dbi:SQLite:myapp.db

    I get the following results:

    exists "C:\__Catalyst\MyApp\lib\MyApp\Model"
    exists "C:\__Catalyst\MyApp\t"
    created "C:\__Catalyst\MyApp\lib\MyApp\Model\DB.pm"
    created "C:\__Catalyst\MyApp\t\model_DB.t"

    but the schema folder and schema.pm file is not created. When I attempt to
    run the tets server i get the following message:

    C:\__Catalyst\MyApp>perl script/myapp_server.pl
    Couldn't instantiate component "MyApp::Model::DB", "Cannot load schema
    class 'My
    App::Schema': Can't locate MyApp/Schema.pm in @INC (@INC contains:
    C:/__Catalyst
    /MyApp/script/../lib C:/Perl/site/lib C:/Perl/lib .) at
    C:/Perl/site/lib/Catalys
    t/Model/DBIC/Schema.pm line 295.
    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.

    Am I missing somthing?

    My enviroment is:

    Windows XP sp2
    ActiveState Perl 5.8.8 v 819
    Catalyst modules
    ???????????????????????????????????????????????????????????????????????????????
    ?name ?version ?abstract
    ?area?
    ???????????????????????????????????????????????????????????????????????????????
    ?Catalyst-Action-RenderView ?0.08 ?Sensible default end action.
    ?site?
    ?Catalyst-Component-InstancePer??0.001001?Moose role to create only one
    ??site?
    ?Catalyst-Devel ?1.08 ?Catalyst Development
    Tools ?site?
    ?Catalyst-Model-DBI ?0.20 ?DBI Model Class
    ?site?
    ?Catalyst-Model-DBI-SQL-Library ?0.15 ?SQL::Library DBI Model Class
    ?site?
    ?Catalyst-Model-DBIC ?0.16 ?(DEPRECATED) DBIC Model
    Class ?site?
    ?Catalyst-Model-DBIC-Plain ?0.02 ?DBIC Model Class
    ?site?
    ?Catalyst-Model-DBIC-Schema ?0.21 ?DBIx::Class::Schema Model
    Class?site?
    ?Catalyst-Model-DBIC-Schema-Que??0.05 ?DBIx::Class::QueryLog Model
    Cl??site?
    ?Catalyst-Plugin-ConfigLoader ?0.21 ?Load config files of
    various t??site?
    ?Catalyst-Plugin-StackTrace ?0.09 ?Display a stack trace on
    the d??site?
    ?Catalyst-Plugin-Static-Simple ?0.20 ?Make serving static pages
    pain??site?
    ?Catalyst-Runtime ?5.7015 ?Catalyst Runtime
    version ?site?
    ?Catalyst-View-TT ?0.27 ?Template View Class
    ?site?
    ???????????????????????????????????????????????????????????????????????????????

    Thanks for your help....
    --
    View this message in context: http://www.nabble.com/Issue-with-Tutorial-section-3-tp21139137p21140874.html
    Sent from the Catalyst Web Framework mailing list archive at Nabble.com.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedDec 23, '08 at 3:50a
activeDec 23, '08 at 7:56a
posts3
users2
websitecatalystframework.org
irc#catalyst

2 users in discussion

Rpnoble: 2 posts Kieren Diment: 1 post

People

Translate

site design / logo © 2022 Grokbase