Hi there I have activerecord working in shoes with sqlite
Shoes.setup do
gem 'activerecord'
end
require 'active_record'
ActiveRecord::Base.establish_connection(:adapter => 'sqlite3',:dbfile =>
'dbname.db')
require 'model_name'
That's all I had to do, sqlite gem was included with shoes (and has been for
a while) as far as I remember.
Regards,
Paul
On Tue, Mar 10, 2009 at 4:43 AM, Cecil Coupe <[email protected]> wrote:
> On Tue, 2009-03-10 at 12:23 +0800, niedh wrote:
> > thanks to Mark Vander Voord
> > I had already install the libsqlite3-dev and sqlite3-ruby
> > when i use sqlite3 without shoes ,it works fine
> >
> > my ruby is not the "apt-get" version, I compiled from the source,is this
> > the problem?
>
> Shoes ruby and gems are different from your system Ruby and Gems. Two
> different Ruby installs, yours and Shoes, they do not share gems. Shoes
> gems have to be installed from within shoes, either from the command
> line "$ shoes -g [gem-name-here]" or with the proper incantations in
> Shoes.setup and requires in the shoes script
>
> Google "shoes activerecord sqlite" might have some clues. Some folks
> claim it works. It's only a clue.
>
> >
> > Mark Vander Voord 写道:
> > > On Ubuntu I believe you need to also install libsqlite3-dev in order
> > > to properly install sqlite3-ruby, like so:
> > >
> > > sudo apt-get install libsqlite3-dev
> > > sudo gem install sqlite3-ruby
> > >
> > > Mark
> > >
> > > On Mon, Mar 9, 2009 at 9:58 PM, niedh <[email protected]
> > > <mailto:[email protected]>> wrote:
> > >
> > > I've use
> > > Shoes.setup do
> > > gem 'activerecord'
> > > end
> > >
> > > to install the activerecord gem ,and got succes.
> > > when i use active record the connect the sqlite3, it says "no
> > > driver for
> > > sqlite3 found",
> > > and I tried to
> > > Shoes.setup do
> > > gem 'sqlite3-ruby'
> > > end
> > >
> > > It does not work,I guess it's because shoes has install it
> > > already,since
> > > i can found it in /tmp/selfxxxxxx/
> > >
> > > I googled and not found a result.
> > > In windows ,it works fine.
> > > what happened to my ubuntu???
> > >
> > > Ubuntu Version : 64bit 8.04
> > > ruby verserion : 1.87 use ruby xxxx
> > > 1.86 use apt-get intall , is ruby1.8 xxxx
> > >
> > > some lib : i've already instal the libsqlite3 xxxx
> > >
> > > any help ??
> > > 3ks
> > >
> > >
> >
>
>