gems: difference between sqlite3 and sqlite3-ruby?
Asked Answered
R

3

13

I accidentally ran:

sudo gem install sqlite3

instead of:

sudo gem install sqlite3-ruby

So now when I run gem list I get:

gem list

*** LOCAL GEMS ***

sqlite3 (0.0.7)
sqlite3-ruby (1.2.5)

What is the difference between the two? And do I need both?

Reber answered 19/2, 2010 at 5:13 Comment(0)
S
1

sqlite3-ruby is the gem you probably need. It is the only sqlite gem I have installed.

sqlite3 (0.0.7) is described here: as SQLite3 FFI bindings for Ruby 1.9

Superordinate answered 19/2, 2010 at 6:40 Comment(2)
ok not sure what ffi is but i have seen that listed in my gems. After a little reading up on ffi, I'm guessing that if I want to develop gems, I might use the sqlite3 bindings?Reber
FFI is a Ruby gem that makes it easy to create Ruby classes that are wrappers for compiled libraries (generally compiled from C, though that's not necessary).Kraska
D
29

As far as I can tell today (June 2011), both gems are the same.

On RubyGems.org sqlite3 and sqlite3-ruby point to the same sqlite3-ruby repository on github.

From the project description on github:

This module allows Ruby programs to interface with the SQLite3 database engine (http://www.sqlite.org). You must have the SQLite engine installed in order to build this module. Note that this module is NOT compatible with SQLite 2.x.

One of the maintainers confirmed the renaming of the gem from sqlite3-ruby to sqlite3 here:

This announcement is to let you know that the sqlite3-ruby gem is being renamed to (drum roll please) "sqlite3".

We will maintain backwards compatibility by releasing an empty "sqlite3-ruby" gem that depends on "sqlite3". The empty sqlite3-ruby gem will contain a post installation message that will inform people to make the switch.

Disabled answered 4/6, 2011 at 16:14 Comment(0)
I
3

When using sqlite3-ruby, you'll get the following output:

Hello! The sqlite3-ruby gem has changed it's name to just sqlite3. Rather than installing sqlite3-ruby, you should install sqlite3. Please update your dependencies accordingly.

Thanks from the Ruby sqlite3 team!

<3 <3 <3 <3

so it seems like 'sqlite3' is the way to go

Imray answered 28/10, 2013 at 10:50 Comment(0)
S
1

sqlite3-ruby is the gem you probably need. It is the only sqlite gem I have installed.

sqlite3 (0.0.7) is described here: as SQLite3 FFI bindings for Ruby 1.9

Superordinate answered 19/2, 2010 at 6:40 Comment(2)
ok not sure what ffi is but i have seen that listed in my gems. After a little reading up on ffi, I'm guessing that if I want to develop gems, I might use the sqlite3 bindings?Reber
FFI is a Ruby gem that makes it easy to create Ruby classes that are wrappers for compiled libraries (generally compiled from C, though that's not necessary).Kraska

© 2022 - 2024 — McMap. All rights reserved.