new to Ramaze and Sequel::DatabaseConnectionError: SQLite3::CantOpenException: unable to open database file

139 views
Skip to first unread message

Travis Lindsey

unread,
May 13, 2014, 6:48:38 PM5/13/14
to ram...@googlegroups.com
Hello I'm new to Ramaze and SQL and I'm trying to run a project i pulled from the web. 
Im on a Win7pro machine with MySQL connector 5.6.17, ruby 2.0.0p481, Ramaze

When i try to run:
rake ramaze:pry 
from the project directory i get the following error:

rake aborted!
Sequel::DatabaseConnectionError: SQLite3::CantOpenException: unable to open database file

if i type:
mysql 
in any console i get:
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)


I haven't been able to find any applicable reference through google (or at least a reference I know how to apply to my situation).

Is there something basic I'm missing?

Thanks for any ideas

John

unread,
May 29, 2014, 5:02:34 PM5/29/14
to ram...@googlegroups.com
Hi there.

What are you trying to achieve?

/pagojo

Dave Howell

unread,
May 30, 2014, 6:29:21 PM5/30/14
to ram...@googlegroups.com

On May 13, 2014, at 15:48 , Travis Lindsey <reac...@gmail.com> wrote:

> Hello I'm new to Ramaze and SQL and I'm trying to run a project i pulled from the web.
> Im on a Win7pro machine with MySQL connector 5.6.17, ruby 2.0.0p481, Ramaze

Oh, dear, this is an old message.

> rake aborted!
> Sequel::DatabaseConnectionError: SQLite3::CantOpenException: unable to open database file

So the problem is coming from Sequel. Note that it’s not even *trying* to talk to MySQL. It’s trying to connect to a SQLite database.

> if i type:
> mysql
> in any console i get:
> ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

And that’s a totally different problem. You should talk to a MySQL list about how to get that part working.

> Is there something basic I'm missing?

Probably. :) You should have a file in /model, probably /model/model.rb, with

require 'sequel'
DB = Sequel.connect(‘mysql://localhost/databasename?user=memyselfandi') unless defined? DB

inside, among other things.


I’d say at a guess you’re missing the DB line, which is why Sequel’s just trying to make something up with a default SQLite database. Note that I cannot promise that that’s the correct connect string, since I use Postgres, not MySQL.


Reply all
Reply to author
Forward
0 new messages