<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hello Hugues,<div><br></div><div>If I put you code in Starman.pl I get a warning in my Vim-editor: </div><div><br></div><div><font face="Menlo"> $all.sqlite requires explicit package name</font></div><div><br></div><div>I have only put reference to the database in the config.yml like so:</div><div><br></div><div><font face="Menlo">plugins:</font></div><div><font face="Menlo"> Database:</font></div><div><font face="Menlo"> driver: "SQLite"</font></div><div><font face="Menlo"> database: "all.sqlite"</font></div><div><br></div><div>Looking at your test I get the idea that I should have mentioned the database also somewhere in Starman.pl?</div><div><br></div><div>Thanks,</div><div>Gert</div><div><br><div><div>On 30 May 2014, at 10:40, Hugues <<a href="mailto:hugues@max4mail.com">hugues@max4mail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
<div text="#000000" bgcolor="#FFFFFF">
Hello Gert <br>
<br>
Are you sur than Starman are able to read your file all.sqlite ?<br>
<br>
if all is ok when you launch ./bin/app.pl, check this point and add
simple test in Starman.pl<br>
<br>
<br>
<pre><code>if (-e $all.sqlite) {
print "database Exists!\n";</code></pre>
<tt>} else {</tt><tt><br>
</tt><tt> print "Error unable to find database\n";</tt><tt><br>
</tt><tt> exit;</tt><tt><br>
</tt><tt>}</tt><br>
<br>
Hugues<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">Le 30/05/2014 10:26, Gert van Oss a
écrit :<br>
</div>
<blockquote cite="mid:B7D1A0F1-9C6D-45DC-A7CB-077F0ABE04A9@me.com" type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
hello Dancers,
<div><br>
</div>
<div>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. </div>
<div><br>
</div>
<div>If, however I startup the app while making use of Starman (I
took guidance of the article on the <a moz-do-not-send="true" href="http://perlmaven.com/getting-started-with-perl-dancer-on-digital-ocean">perlmaven</a> 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.
<div><br>
</div>
<div>The error log gives two lines</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>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</div>
<div><br>
</div>
<div><br>
</div>
<div>these might explain the problem however I have no idea
where to start. Is there someone who had to deal with this
issue?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Gert</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
dancer-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a>
<a class="moz-txt-link-freetext" href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a>
</pre>
</blockquote>
<br>
</div>
_______________________________________________<br>dancer-users mailing list<br><a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>http://lists.preshweb.co.uk/mailman/listinfo/dancer-users<br></blockquote></div><br></div></body></html>