Closed
Description
When I'm trying to connect to sqlite database:
var orm = require('orm');
orm.connect('db',function (err,db) {
if (err) {
throw err;
}
res.render('index');
});
It gets me an error
500 TypeError: Cannot call method 'replace' of undefined
at Object.exports.connect (D:\Dropbox\sites\myblog\node_modules\orm\lib\ORM.js:49:29)
Metadata
Metadata
Assignees
Labels
No labels
Activity
dresende commentedon Jan 21, 2013
What are you actually specifying as connection string?
dresende commentedon Jan 21, 2013
If you're using sqlite (there's obviously no password, duh..), you must specify as:
ashgaliyev commentedon Jan 22, 2013
Here is a full listing
var orm = require('orm');
orm.connect('sqlite://D:/Dropbox/sites/myblog/db',function (err,db) {
});
people is undefined
dresende commentedon Jan 22, 2013
It seems
url.parse()
does not handleD:/...
in the URL, which is actually right. I have to update the url parser. Try this instead:Updates sqlite driver to accept paths with drive letter (win32) (rela…
dresende commentedon Jan 22, 2013
If you use this latest commit, you should be able to do:
Merge pull request #20 from locomote/fix/lm-2855-fix-tests-for-all-dr…