Jeremy Evans wrote:
> On Apr 17, 11:03 am, Joel VanderWerf <[email protected]> wrote:
>> The sequel console seems to have a problem detecting database type:
>>
>> $ sequel sqlite://t.sqlite
>> URI::InvalidURIError: the scheme sqlite does not accept registry part:
>> t.sqlite (or bad hostname?)
>> /usr/local/lib/ruby/1.8/uri/generic.rb:195:in `initialize'
>>
>> $ cp t.sqlite t.db
>> $ sequel sqlite://t.db
>> Your database is stored in DB...
>> irb(main):001:0>
>>
>> The reason I'm using the .sqlite extension is that the firefox sqlite
>> tool expects it. I don't really care either way, but it seems the ruby
>> tool shouldn't either, as long as you make the url prefix explicit.
> 
> That error is raised by the URI module, not by Sequel.  I'm not sure
> why it's complaining, because it doesn't give me a problem:
> 
>   $ sequel sqlite://t.sqlite
>   Your database is stored in DB...
>   irb(main):001:0>
> 
> What version of ruby are you using?  I'm using:
> 
>   $ ruby -v
>   ruby 1.8.6 (2008-08-11 patchlevel 287) [x86_64-openbsd4.4]

My mistake... the problem isn't the extension, but it may be the 
underscore (which I had removed in my email for simplicity):

$ sequel sqlite://t.sqlite
Your database is stored in DB...
irb(main):001:0>

$ mv t.sqlite t_t.sqlite
$ sequel sqlite://t_t.sqlite
URI::InvalidURIError: the scheme sqlite does not accept registry part: 
t_t.sqlite (or bad hostname?)
/usr/local/lib/ruby/1.8/uri/generic.rb:195:in `initialize'

How is the sqlite URI scheme defined? Is there a regex somewhere?

-- 
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to