I am just learning Ruby language. I downloaded SQLite3 database using
gem - "gem list" shows that SQLite3 is installed.
My question - how to create a database? I tried to do it from a DOS
prompt - it didn't work.
Thanks,
Zalek
I am just learning Ruby language. I downloaded SQLite3 database using
gem - "gem list" shows that SQLite3 is installed.
My question - how to create a database? I tried to do it from a DOS
prompt - it didn't work.
Thanks,
Zalek
I am just learning Ruby language. I downloaded SQLite3 database using
gem - "gem list" shows that SQLite3 is installed.
No, that shows that the SQLite3 *gem* is installed. Which doesn't
mean you have SQLite3 itself on your system. Figuring that out is
a good first step
My question - how to create a database? I tried to do it from a DOS
prompt - it didn't work.
Urk, "DOS prompt"? So, Windows? Best of luck!
(And for the next question, "it didn't work" is not terribly useful in terms
of helping someone troubleshoot a problem...)
HTH,
On Thu, Jun 24, 2010 at 2:35 PM, <ZalekBloom@hotmail.com> wrote:
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
unknown wrote:
I am just learning Ruby language. I downloaded SQLite3 database using
gem - "gem list" shows that SQLite3 is installed.
My question - how to create a database? I tried to do it from a DOS
prompt - it didn't work.Thanks,
Zalek
require 'sqlite3'
db = SQLite3::Database.new( "test.db" )
sql = <<SQL
create table the_table (
a varchar2(30),
b varchar2(30)
);
SQL
db.execute_batch( sql )
-------
Of course, you should have sqlite3 installed. there should be some
command called "sqlite3" in your path, if it is.
to open a db, do:
sqlite3 new.db
You should get a prompt. Type "help".
See: http://sqlite-ruby.rubyforge.org/sqlite3/faq.html
--
Posted via http://www.ruby-forum.com/\.
Well, I tried from DOS:
create database
gem create database
and other combinations.
Anyway - I understand I need to install SQLite3 first.
Thanks,
Zalek
On Thu, 24 Jun 2010 17:51:55 -0500, Hassan Schroeder <hassan.schroeder@gmail.com> wrote:
On Thu, Jun 24, 2010 at 2:35 PM, <ZalekBloom@hotmail.com> wrote:
I am just learning Ruby language. I downloaded SQLite3 database using
gem - "gem list" shows that SQLite3 is installed.No, that shows that the SQLite3 *gem* is installed. Which doesn't
mean you have SQLite3 itself on your system. Figuring that out is
a good first stepMy question - how to create a database? I tried to do it from a DOS
prompt - it didn't work.Urk, "DOS prompt"? So, Windows? Best of luck!
(And for the next question, "it didn't work" is not terribly useful in terms
of helping someone troubleshoot a problem...)HTH,
1) gem install sqlite3-ruby
Download and copy latest sqlite3.dll from sqlite3.org into a directory
in the PATH. If you're not familiar with DOS command prompts, search
for tutorials on internet.
You have sqlite3-ruby documentation here:
http://rdoc.info/projects/luislavena/sqlite3-ruby
On Jun 24, 11:14 pm, ZalekBl...@hotmail.com wrote:
On Thu, 24 Jun 2010 17:51:55 -0500, Hassan Schroeder
<hassan.schroe...@gmail.com> wrote:
>On Thu, Jun 24, 2010 at 2:35 PM, <ZalekBl...@hotmail.com> wrote:
>> I am just learning Ruby language. I downloaded SQLite3 database using
>> gem - "gem list" shows that SQLite3 is installed.>No, that shows that the SQLite3 *gem* is installed. Which doesn't
>mean you have SQLite3 itself on your system. Figuring that out is
>a good first step>> My question - how to create a database? I tried to do it from a DOS
>> prompt - it didn't work.>Urk, "DOS prompt"? So, Windows? Best of luck!
>(And for the next question, "it didn't work" is not terribly useful in terms
>of helping someone troubleshoot a problem...)>HTH,
Well, I tried from DOS:
create database
gem create databaseand other combinations.
Anyway - I understand I need to install SQLite3 first.
--
Luis Lavena