开发者

How to work with Sqlite?

开发者 https://www.devze.com 2023-01-21 06:06 出处:网络
I want to setup different rails versions with RVM. However, working with the SQLite gives problem. First, doing

I want to setup different rails versions with RVM. However, working with the SQLite gives problem. First, doing

gem list -ra sqlite

gives

*** REMOTE GEMS ***

sqlite-foreig开发者_开发问答ner (0.5.0)
sqlite-ruby (2.2.3 ruby mswin32, 2.2.2 ruby mswin32, 2.2.1 ruby mswin32, 2.2.0 ruby mswin32, 2.1.0 ruby mswin32, 2.0.3)
sqlite3 (0.1.1, 0.1.0, 0.0.8, 0.0.7, 0.0.6, 0.0.5, 0.0.4, 0.0.3, 0.0.2, 0.0.1, 0.0.0)
sqlite3-dotnet (3.7.2.1, 3.7.2.0)
sqlite3-ironruby (0.1.1, 0.1.0)
sqlite3-ruby (1.3.1 ruby x86-mingw32 x86-mswin32-60, 1.3.0 ruby x86-mingw32 x86-mswin32-60, 1.2.5 ruby x86-mingw32 x86-mswin32, 1.2.4, 1.2.3 ruby mswin32 x86-mingw32, 1.2.2 ruby mswin32, 1.2.1 ruby mswin32, 1.2.0 ruby mswin32, 1.1.0 ruby mswin32, 1.0.1 ruby mswin32, 1.0.0 ruby mswin32, 0.9.0 ruby mswin32, 0.6.0, 0.5.0)
sqlitecache (0.0.1)

I am working with MacOS X 10.6, Sqlite3 3.7.2

Can I work with multiple versions of Sqlite3? What gems would I need in my RVM environment?

Currently:

*** LOCAL GEMS ***

actionmailer (2.2.3, 2.2.2)
actionpack (2.2.3, 2.2.2)
activerecord (2.2.3, 2.2.2)
activeresource (2.2.3, 2.2.2)
activesupport (2.2.3, 2.2.2)
ffi (0.6.3)
haml (2.2.0)
rails (2.2.3, 2.2.2)
rake (0.8.7)
ruby-openid (2.0.4)

And RVM list:

rvm rubies

   ree-1.8.6-20090610 [ x86_64 ]
=> ruby-1.8.6-p399 [ x86_64 ]
   ruby-1.9.2-p0 [ x86_64 ]


you can install multiple sqlite3 packages simultaneously with gem. and you can select the specific gem version with the following lines:

require 'rubygems'
gem 'sqlite3', '=0.1.0'
require 'sqlite3'

To install it type:

gem install sqlite3 -v '0.1.0'

I think you can use any sqlite3 gem with any RVM, but you can check their webpage

0

精彩评论

暂无评论...
验证码 换一张
取 消