Re: Sqlite3 on ubuntu

2009-03-11 Thread Kyle King
ActiveRecord has a built in pure ruby sqlite adapter (which is the  
*only* reason I sometimes use ActiveRecord over Sequel). Perhaps  
you're having include issues. Could you give the following a try?


Shoes.setup do
gem 'activerecord'
end

Shoes.app do
begin
require 'active_record'
require 'active_record/connection_adapters/sqlite3_adapter'
require 'user'

		ActiveRecord::Base.establish_connection(:adapter =  
'sqlite3',:dbfile ='test.db')

para User.find(1).id

rescue Exception
alert $!
end
end

On Mar 11, 2009, at 3:51 AM, niedh wrote:


thanks to Paul
my test code is :
Shoes.setup do
gem 'activerecord'
require 'active_record'
ActiveRecord::Base.establish_connection(:adapter =  
'sqlite3',:dbfile =

'test.db')
require 'user'
end
Shoes.app do
begin
para User.find(1).id
rescue StandardError = e
alert(e)
end
end
ActiveRecord::Base.establish_connection(:adapter =  
'sqlite3',:dbfile =

'test.db')
seems work find,but when User.find(1) it says no driver for sqlite3  
found


thanks to Marc Galbraith
I 'git' the sources,and 'rake' it,but the problem still there


maybe i should try another machin :(

thanks anyway :)

Marc Galbraith 写道:

Hi,

Noticed you are using 64-bit version of Ubuntu, did you build shoes
from source on your system?
Once I did that lots of ruby library problems went away.

Regards,
Marc.

2009/3/10 niedh dianhui@gmail.com  
mailto:dianhui@gmail.com


   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/selfxx/

   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 
   1.86 use apt-get intall , is ruby1.8 

   some lib : i've already instal the libsqlite3 

   any help ??
   3ks







Re: Sqlite3 on ubuntu

2009-03-11 Thread niedh
Thanks all
I fix my problem after compile shoes from the shoes,
thanks to **Marc.** again.
yesterday i compile from source after Marc's advice,and try ,it's not work.
I found the reason today ,because I was still use the old version shoes
bin(which i download from shoes site ,may not work find on my 64bit ubuntu)
,not the newer compile one
:)

Thanks all again
 ActiveRecord has a built in pure ruby sqlite adapter (which is the
 *only* reason I sometimes use ActiveRecord over Sequel). Perhaps
 you're having include issues. Could you give the following a try?

 Shoes.setup do
 gem 'activerecord'
 end

 Shoes.app do
 begin
 require 'active_record'
 require 'active_record/connection_adapters/sqlite3_adapter'
 require 'user'

 ActiveRecord::Base.establish_connection(:adapter = 'sqlite3',:dbfile
 ='test.db')
 para User.find(1).id

 rescue Exception
 alert $!
 end
 end

 On Mar 11, 2009, at 3:51 AM, niedh wrote:

 thanks to Paul
 my test code is :
 Shoes.setup do
 gem 'activerecord'
 require 'active_record'
 ActiveRecord::Base.establish_connection(:adapter = 'sqlite3',:dbfile =
 'test.db')
 require 'user'
 end
 Shoes.app do
 begin
 para User.find(1).id
 rescue StandardError = e
 alert(e)
 end
 end
 ActiveRecord::Base.establish_connection(:adapter = 'sqlite3',:dbfile =
 'test.db')
 seems work find,but when User.find(1) it says no driver for sqlite3
 found

 thanks to Marc Galbraith
 I 'git' the sources,and 'rake' it,but the problem still there


 maybe i should try another machin :(

 thanks anyway :)

 Marc Galbraith 写道:
 Hi,

 Noticed you are using 64-bit version of Ubuntu, did you build shoes
 from source on your system?
 Once I did that lots of ruby library problems went away.

 Regards,
 Marc.

 2009/3/10 niedh dianhui@gmail.com mailto:dianhui@gmail.com

 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/selfxx/

 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 
 1.86 use apt-get intall , is ruby1.8 

 some lib : i've already instal the libsqlite3 

 any help ??
 3ks







Re: Sqlite3 on ubuntu

2009-03-10 Thread Paul McConnon
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 cco...@cableone.net 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 dianhui@gmail.com
   mailto:dianhui@gmail.com 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/selfxx/
  
   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 
   1.86 use apt-get intall , is ruby1.8 
  
   some lib : i've already instal the libsqlite3 
  
   any help ??
   3ks
  
  
 




Re: Sqlite3 on ubuntu

2009-03-10 Thread Marc Galbraith
Hi,

Noticed you are using 64-bit version of Ubuntu, did you build shoes from
source on your system?
Once I did that lots of ruby library problems went away.

Regards,
Marc.

2009/3/10 niedh dianhui@gmail.com

 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/selfxx/

 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 
 1.86 use apt-get intall , is ruby1.8 

 some lib : i've already instal the libsqlite3 

 any help ??
 3ks




Re: Sqlite3 on ubuntu

2009-03-10 Thread niedh
thanks to Paul
my test code is :
Shoes.setup do
gem 'activerecord'
require 'active_record'
ActiveRecord::Base.establish_connection(:adapter = 'sqlite3',:dbfile =
'test.db')
require 'user'
end
Shoes.app do
begin
para User.find(1).id
rescue StandardError = e
alert(e)
end
end
ActiveRecord::Base.establish_connection(:adapter = 'sqlite3',:dbfile =
'test.db')
seems work find,but when User.find(1) it says no driver for sqlite3 found

thanks to Marc Galbraith
I 'git' the sources,and 'rake' it,but the problem still there


maybe i should try another machin :(

thanks anyway :)

Marc Galbraith 写道:
 Hi,

 Noticed you are using 64-bit version of Ubuntu, did you build shoes
 from source on your system?
 Once I did that lots of ruby library problems went away.

 Regards,
 Marc.

 2009/3/10 niedh dianhui@gmail.com mailto:dianhui@gmail.com

 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/selfxx/

 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 
 1.86 use apt-get intall , is ruby1.8 

 some lib : i've already instal the libsqlite3 

 any help ??
 3ks




Sqlite3 on ubuntu

2009-03-09 Thread niedh
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/selfxx/

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 
1.86 use apt-get intall , is ruby1.8 

some lib : i've already instal the libsqlite3 

any help ??
3ks



Re: Sqlite3 on ubuntu

2009-03-09 Thread 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 dianhui@gmail.com 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/selfxx/

 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 
 1.86 use apt-get intall , is ruby1.8 

 some lib : i've already instal the libsqlite3 

 any help ??
 3ks




Re: Sqlite3 on ubuntu

2009-03-09 Thread niedh
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?

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 dianhui@gmail.com
 mailto:dianhui@gmail.com 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/selfxx/

 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 
 1.86 use apt-get intall , is ruby1.8 

 some lib : i've already instal the libsqlite3 

 any help ??
 3ks





Re: Sqlite3 on ubuntu

2009-03-09 Thread Cecil Coupe
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 dianhui@gmail.com
  mailto:dianhui@gmail.com 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/selfxx/
 
  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 
  1.86 use apt-get intall , is ruby1.8 
 
  some lib : i've already instal the libsqlite3 
 
  any help ??
  3ks