SQLite / Ruby on Windows?

Does anyone have an install-by-copy version of the SQLite Ruby binding at hand?
I'm in sore need of an embeddable SQL database and I admit to being completely
uncapable of compiling Ruby extensions on my Windows box.

David Vallner

Try installing it with RubyGems.

-austin

···

On 9/30/05, david@vallner.net <david@vallner.net> wrote:

Does anyone have an install-by-copy version of the SQLite Ruby binding at hand?
I'm in sore need of an embeddable SQL database and I admit to being completely
uncapable of compiling Ruby extensions on my Windows box.

--
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca

There are three phases:

#1 - Collect underpants
#2 - ??
#3 - Profit!

just kidding ...

Here are the steps to get it working.

#1 Download http://www.sqlite.org/sqlite-3_2_7.zip
#2 Download http://www.sqlite.org/sqlitedll-3_2_7.zip

Unzip and install the resulting files into your C:\Windows\System32
directory

#3 Use "gem" to install the sqlite3 package:

"gem install sqlite3"

… when prompted by the installer, type 2 and press enter. This will install
sqlite3-ruby 1.1.0 (mswin32)

It will run for a bit and should end successfully

You can now use SQLite3

From irb use the following test script:

--SCRIPT--
require 'sqlite3'

db = SQLite3::Database.new( "test.db" )
db.execute( "create table test ( foo int, bar text, baz int );" )
db.execute( "insert into test ( foo, bar, baz ) values ( 1, 'test', 3 );" )
db.execute( "select * from test" ) { |row| puts row.join( ',' ) }
db.execute2( "select * from test" ) { |row| puts row.join( ',' ) }
--SCRIPT--

j.

···

On 9/30/05, Austin Ziegler <halostatue@gmail.com> wrote:

On 9/30/05, david@vallner.net <david@vallner.net> wrote:
> Does anyone have an install-by-copy version of the SQLite Ruby binding
at hand?
> I'm in sore need of an embeddable SQL database and I admit to being
completely
> uncapable of compiling Ruby extensions on my Windows box.

Try installing it with RubyGems.

-austin
--
Austin Ziegler * halostatue@gmail.com
* Alternate: austin@halostatue.ca

--
"http://ruby-lang.org -- do you ruby?"

Jeff Wood

Hello,
Been wanting to try Ruby and Sqlite3...

But step #3 does not work. Gem install says:

Local gem file not found: sqlite3*.gem.

Then, in the attempt to do a remote install, again the complaint is
that sqlite3 could not be found in the repository?

Might I have missed a step here?

Thanks,
Basi

Jeff Wood wrote:

···

There are three phases:

#1 - Collect underpants
#2 - ??
#3 - Profit!

just kidding ...

Here are the steps to get it working.

#1 Download http://www.sqlite.org/sqlite-3_2_7.zip
#2 Download http://www.sqlite.org/sqlitedll-3_2_7.zip

Unzip and install the resulting files into your C:\Windows\System32
directory

#3 Use "gem" to install the sqlite3 package:

"gem install sqlite3"

... when prompted by the installer, type 2 and press enter. This will install
sqlite3-ruby 1.1.0 (mswin32)

It will run for a bit and should end successfully

You can now use SQLite3

From irb use the following test script:

--SCRIPT--
require 'sqlite3'

db = SQLite3::Database.new( "test.db" )
db.execute( "create table test ( foo int, bar text, baz int );" )
db.execute( "insert into test ( foo, bar, baz ) values ( 1, 'test', 3 );" )
db.execute( "select * from test" ) { |row| puts row.join( ',' ) }
db.execute2( "select * from test" ) { |row| puts row.join( ',' ) }
--SCRIPT--

j.

On 9/30/05, Austin Ziegler <halostatue@gmail.com> wrote:
>
> On 9/30/05, david@vallner.net <david@vallner.net> wrote:
> > Does anyone have an install-by-copy version of the SQLite Ruby binding
> at hand?
> > I'm in sore need of an embeddable SQL database and I admit to being
> completely
> > uncapable of compiling Ruby extensions on my Windows box.
>
> Try installing it with RubyGems.
>
> -austin
> --
> Austin Ziegler * halostatue@gmail.com
> * Alternate: austin@halostatue.ca
>
>

--
"http://ruby-lang.org -- do you ruby?"

Jeff Wood

*blush* Silly me didn't notice the mswin binary distro of the extension.

Citát Jeff Wood <jeff.darklight@gmail.com>:

There are three phases:

#1 - Collect underpants
#2 - ??
#3 - Profit!

I -am- intrugued now :stuck_out_tongue_winking_eye:

just kidding ...

Awww...

Unzip and install the resulting files into your C:\Windows\System32
directory

I sincerely hope you're not serious, there's enough banter in that directory
already. I'll have to womble about the ruby installation dir to find out where
does windows look for DLLs, or just hack PATH to include a suitable location
before running the script.

Cheers anyway, that should make the DBMS 301 assignment insanely easier, what
with being able to deploy without installing anything.

try, gem install sqlite3-ruby

···

On 9/30/05, basi <basi_lio@hotmail.com> wrote:

Hello,
Been wanting to try Ruby and Sqlite3...

But step #3 does not work. Gem install says:

Local gem file not found: sqlite3*.gem.

Then, in the attempt to do a remote install, again the complaint is
that sqlite3 could not be found in the repository?

Might I have missed a step here?

Thanks,
Basi

Jeff Wood wrote:
> There are three phases:
>
> #1 - Collect underpants
> #2 - ??
> #3 - Profit!
>
> just kidding ...
>
> Here are the steps to get it working.
>
> #1 Download http://www.sqlite.org/sqlite-3_2_7.zip
> #2 Download http://www.sqlite.org/sqlitedll-3_2_7.zip
>
> Unzip and install the resulting files into your C:\Windows\System32
> directory
>
> #3 Use "gem" to install the sqlite3 package:
>
> "gem install sqlite3"
>
> ... when prompted by the installer, type 2 and press enter. This will install
> sqlite3-ruby 1.1.0 (mswin32)
>
> It will run for a bit and should end successfully
>
> You can now use SQLite3
>
> From irb use the following test script:
>
>
> --SCRIPT--
> require 'sqlite3'
>
> db = SQLite3::Database.new( "test.db" )
> db.execute( "create table test ( foo int, bar text, baz int );" )
> db.execute( "insert into test ( foo, bar, baz ) values ( 1, 'test', 3 );" )
> db.execute( "select * from test" ) { |row| puts row.join( ',' ) }
> db.execute2( "select * from test" ) { |row| puts row.join( ',' ) }
> --SCRIPT--
>
>
> j.
>
> On 9/30/05, Austin Ziegler <halostatue@gmail.com> wrote:
> >
> > On 9/30/05, david@vallner.net <david@vallner.net> wrote:
> > > Does anyone have an install-by-copy version of the SQLite Ruby binding
> > at hand?
> > > I'm in sore need of an embeddable SQL database and I admit to being
> > completely
> > > uncapable of compiling Ruby extensions on my Windows box.
> >
> > Try installing it with RubyGems.
> >
> > -austin
> > --
> > Austin Ziegler * halostatue@gmail.com
> > * Alternate: austin@halostatue.ca
> >
> >
>
>
> --
> "http://ruby-lang.org -- do you ruby?"
>
> Jeff Wood

basi wrote:

Hello,
Been wanting to try Ruby and Sqlite3...

But step #3 does not work. Gem install says:

Local gem file not found: sqlite3*.gem.

Then, in the attempt to do a remote install, again the complaint is
that sqlite3 could not be found in the repository?

Might I have missed a step here?

Here's what works for me:

d:\development>gem install sqlite3

d:\development>"c:\ruby\bin\ruby.exe" "c:\ruby\bin\gem" install sqlite3
Attempting local installation of 'sqlite3'
Local gem file not found: sqlite3*.gem
Attempting remote installation of 'sqlite3'
Select which gem to install for your platform (i386-mswin32)
  1. sqlite3-ruby 1.1.0 (ruby)
  2. sqlite3-ruby 1.1.0 (mswin32)
  3. sqlite3-ruby 1.0.1 (ruby)
  4. sqlite3-ruby 1.0.1 (mswin32)
  5. sqlite3-ruby 1.0.0 (mswin32)
  6. sqlite3-ruby 1.0.0 (ruby)
  7. sqlite3-ruby 0.9.0 (ruby)
  8. sqlite3-ruby 0.9.0 (mswin32)
  9. sqlite3-ruby 0.6.0 (ruby)
  10. sqlite3-ruby 0.5.0 (ruby)
  11. Cancel installation
>

James

···

--

http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys

system32 is the normal place that the system will go looking for DLLs ...
that's how windows works.

if you want to try and go around that, have fun. what I suggested *will*
work.

And if I wasn't serious ... then why would I post it?

j.

···

On 10/5/05, david@vallner.net <david@vallner.net> wrote:

*blush* Silly me didn't notice the mswin binary distro of the extension.

Citát Jeff Wood <jeff.darklight@gmail.com>:

> There are three phases:
>
> #1 - Collect underpants
> #2 - ??
> #3 - Profit!

I -am- intrugued now :stuck_out_tongue_winking_eye:

>
> just kidding ...

Awww...

>
> Unzip and install the resulting files into your C:\Windows\System32
> directory

I sincerely hope you're not serious, there's enough banter in that
directory
already. I'll have to womble about the ruby installation dir to find out
where
does windows look for DLLs, or just hack PATH to include a suitable
location
before running the script.

Cheers anyway, that should make the DBMS 301 assignment insanely easier,
what
with being able to deploy without installing anything.

--
"http://ruby-lang.org -- do you ruby?"

Jeff Wood

That works.
thanks!
basi

Install completed, however, when requiring, I get this:

irb(main):001:0> require 'sqlite3'
=> false
irb(main):002:0> require 'sqlite3-ruby'
LoadError: No such file to load -- sqlite3-ruby
  from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require__'
  from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require'
  from (irb):2
  from
c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0-mswin32/lib/sqlite3/database.rb:237
irb(main):003:0>

Citát Jeff Wood <jeff.darklight@gmail.com>:

system32 is the normal place that the system will go looking for DLLs ...
that's how windows works.

Not since Win2K it isn't, apparently. I confirmed my hunch I read about that in
some documentation. The NT branch of Windows also looks for DLLs in directories
in the PATH environment variable. And possibly in the location of the
executable as well, I haven't tried that.

if you want to try and go around that, have fun. what I suggested *will*
work.

Not on machines I don't have admin privileges on.

So, I guess this is another bit of useless trivia floating around ruby-talk,
anyone deploying applications with DLL dependencies in war conditions might
actually use this.

Aaanyways, thanks again, SQLite works like a charm, and I'm getting ready to
wear my Ruby slippers to school for the first time. Wish me luck Fighting The
System.

David Vallner

PS: The bit about not benig serious was tongue-in-cheek...

Install completed, however, when requiring, I get this:

irb(main):001:0> require 'sqlite3'
=> false

This part is probably because of a bug in RubyGems that I *think* is
being looked at.

Check to see if the Sqlite3 constant (I *think* that's the one) has been added.

irb(main):002:0> require 'sqlite3-ruby'
LoadError: No such file to load -- sqlite3-ruby

This is the name of the gem, not the item to require.

-austin

···

On 10/1/05, basi <basi_lio@hotmail.com> wrote:
--
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca