Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to create model DBIC for Catalyst project with this command: model SomeDB DBIC dbi:SQLite:/tmp/my.db

This command doesn't work since I haven't "Catalyst::Helper::Model::DBIC" module. In order to install it I have to install DBIx::Class::Loader

#   Failed test 'use Catalyst::Helper::Model::DBIC;'
#   at t/01use.t line 5.
#     Tried to use 'Catalyst::Helper::Model::DBIC'.
#     Error:  Can't locate DBIx/Class/ in @INC

So when I try to install DBIx::Class::Loader I get this error report:

Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01use.t ............ 1/3 IMPORTANT: DBIx::Class::DB is DEPRECATED AND *WILL* BE REMOVED. DO NOT USE.
t/01use.t ............ ok   
t/02pod.t ............ skipped: set TEST_POD to enable this test
t/03podcoverage.t .... skipped: Test::Pod::Coverage 1.04 required
t/10sqlite_common.t .. IMPORTANT: DBIx::Class::DB is DEPRECATED AND *WILL* BE REMOVED. DO NOT USE.
loader_test9 has no primary key at /home/michael/.cpan/build/DBIx-Class-Loader-0.21-VH7K9u/blib/lib/DBIx/Class/ line 110.
t/10sqlite_common.t .. 1/26 DBIx::Class::ResultSetProxy::find(): find() expects either a column/value hashref, or a list of values corresponding to the columns of the specified unique constraint 'primary' at t/ line 73
# Looks like you planned 26 tests but ran 5.
# Looks like your test exited with 2 just after 5.
t/10sqlite_common.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 21/26 subtests 
t/11mysql_common.t ... skipped: You need to set the MYSQL_NAME, MYSQL_USER and MYSQL_PASS environment variables
t/12pg_common.t ...... skipped: You need to set the PG_NAME, PG_USER and PG_PASS environment variables
t/13db2_common.t ..... skipped: You need to set the DB2_NAME, DB2_USER and DB2_PASS environment variables

Test Summary Report
t/10sqlite_common.t (Wstat: 512 Tests: 5 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 26 tests but ran 5.
Files=7, Tests=8,  5 wallclock secs ( 0.05 usr  0.01 sys +  0.73 cusr  0.10 csys =  0.89 CPU)
Result: FAIL
Failed 1/7 test programs. 0/8 subtests failed.
make: *** [test_dynamic] Error 255
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports BLBLACK/DBIx-Class-Loader-0.21.tar.gz
Running make install
  make test had returned bad status, won't install without force

Anyone can help me?

share|improve this question
Welcome to Ask Ubuntu! You appear to be installing this from source. Any reason to do so? The DBIx Perl modules are packaged in Ubuntu for your convenience. I'm sure the software you're looking for is listed using the command apt-cache search DBIx Class Perl. Please update your answer with details about why you need to install from source or whether I can put this comment as an answer. – gertvdijk Jan 30 '13 at 23:50
Also, the CPAN page about this module reads: IMPORTANT NOTICE - This module is deprecated in favor of DBIx::Class::Schema::Loader for use with DBIx::Class versions 0.05 and higher.. – gertvdijk Jan 30 '13 at 23:53
I read it and I've update my question. Thanks. – edem Jan 31 '13 at 0:11
Your update only answers half of my requests from my comments. As I've just mentioned: why are you installing from source? The missing file you're stuck on is provided by libdbix-class-schema-loader-perl. So, just do sudo apt-get install libdbix-class-schema-loader-perl and you should be all set. – gertvdijk Jan 31 '13 at 0:13
I've done it. Nevertheless I got the same error "Tried to use 'Catalyst::Model::DBIC'.Error: Can't locate DBIx/Class/ in @INC" Without DBIx::Class::Loader I cannot make a Catalyst Model DBIC – edem Jan 31 '13 at 0:36
up vote 0 down vote accepted

There is no need to use old approach (using script/ model DBIC DBIC dbi:SQLite:db.db) to create Catalyst Model DBIC. The right way is use this command: script/ model DBIC DBIC:Schema dbi:SQLite:db.db

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.