Hello Hugues,
If I put you code in Starman.pl I get a warning in my Vim-editor:
$all.sqlite requires explicit package name
I have only put reference to the database in the config.yml like so:
plugins:
Database:
driver: "SQLite"
database: "all.sqlite"
Looking at your test I get the idea that I should have mentioned the database
also somewhere in Starman.pl?
Thanks,
Gert
On 30 May 2014, at 10:40, Hugues <[email protected]> wrote:
> Hello Gert
>
> Are you sur than Starman are able to read your file all.sqlite ?
>
> if all is ok when you launch ./bin/app.pl, check this point and add simple
> test in Starman.pl
>
>
> if (-e $all.sqlite) {
> print "database Exists!\n";
> } else {
> print "Error unable to find database\n";
> exit;
> }
>
> Hugues
>
>
>
> Le 30/05/2014 10:26, Gert van Oss a écrit :
>> hello Dancers,
>>
>> I’m trying to use Dancer::Plugin::Database. The database is a sqlite-file
>> that only serves as datafile so I’m not writing to the database in my app.
>> If I run my app on the server with the command ‘perl bin/app.pl’ everything
>> works just fine. All data is shown on the pages as expected.
>>
>> If, however I startup the app while making use of Starman (I took guidance
>> of the article on the perlmaven site) I get the message that the app is
>> unable to open the database. Up until now I worked around the problem to
>> store all my data in json-files and create multiple ‘selection/sorts’ by
>> using hashes and arrays but that is becoming a bit difficult to maintain.
>>
>> The error log gives two lines
>>
>> DBI connect('dbname=all.sqlite','',...) failed: unable to open database file
>> at
>> /home/gertmt/perl5/perlbrew/perls/perl-5.20.0/lib/site_perl/5.20.0/Dancer/Plugin/Database/Core.pm
>> line 259.
>>
>> Database connection failed - unable to open database file in
>> /home/gertmt/perl5/perlbrew/perls/perl-5.20.0/lib/site_perl/5.20.0/Dancer/Plugin/Database.pm
>> l. 28
>>
>>
>> these might explain the problem however I have no idea where to start. Is
>> there someone who had to deal with this issue?
>>
>> Thanks,
>> Gert
>>
>>
>>
>>
>> _______________________________________________
>> dancer-users mailing list
>> [email protected]
>> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
> _______________________________________________
> dancer-users mailing list
> [email protected]
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users