Error while creating model rb file

D

Daniel

Hi..
when I run the command "ruby script\generate model Test".. i get
the following error.


C:\Ruby\cookbook>ruby script\generate model Recipe
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_
adapters/abstract/connection_specification.rb:200:in
`establish_connection': dat
abase configuration specifies nonexistent SQL Server adapter
(ActiveRecord::Adap
terNotFound)
from
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_recor
d/connection_adapters/abstract/connection_specification.rb:192:in
`establish_con
nection'
from
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_recor
d/connection_adapters/abstract/connection_specification.rb:185:in
`establish_con
nection'
from
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:182:i
n `initialize_database'
from
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:84:in
`process'
from
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:42:in
`send'
from
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:42:in
`run'
from ./script/../config/../config/environment.rb:13
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re
quire__'
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re
quire'
from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_suppo
rt/dependencies.rb:147:in `require'
from
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/generate.rb
:1
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re
quire__'
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re
quire'
from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_suppo
rt/dependencies.rb:147:in `require'
from script/generate:3
Reply with your suggestion
Thanks.
 
A

Alain FELER

Daniel a écrit :
Hi..
when I run the command "ruby script\generate model Test".. i get
the following error.


C:\Ruby\cookbook>ruby script\generate model Recipe
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_
adapters/abstract/connection_specification.rb:200:in
`establish_connection': dat
abase configuration specifies nonexistent SQL Server adapter
(ActiveRecord::Adap
terNotFound)
from
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_recor
d/connection_adapters/abstract/connection_specification.rb:192:in
`establish_con
nection'
from
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_recor
d/connection_adapters/abstract/connection_specification.rb:185:in
`establish_con
nection'
from
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:182:i
n `initialize_database'
from
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:84:in
`process'
from
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:42:in
`send'
from
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:42:in
`run'
from ./script/../config/../config/environment.rb:13
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re
quire__'
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re
quire'
from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_suppo
rt/dependencies.rb:147:in `require'
from
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/generate.rb
:1
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re
quire__'
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re
quire'
from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_suppo
rt/dependencies.rb:147:in `require'
from script/generate:3
Reply with your suggestion
Thanks.
Hello,
I am myself a newbie in rails, but I bought the (french translation of
the) "agile web development with rails" book, and I read at the end of
the third chapter of part 1 (excuse my poor translation) : << Working
with Sql Server will be a bit harder. The text wich follows is based on
a note by Joey Gibson, who wrote the Rails driver for Sql Server. If you
did use the one-click install of ruby, you have already nearly every
library needed to work with Sql Server. However, you lack the ADO
module. To install it, follow these steps :
1. find where is ruby (c:\ruby by default) on your box, in which you
should find \ruby\lib\ruby\site_ruby\1.8\dbd. There, create a new
directory named ADO;
2. go to http://ruby-dbi.sourceforge.net and get the last version of the
package Ruby-DBI;
3. unzip the dbi archive in some directory of yours, go in that
directory and then in src\lib\dbd_ado. Copy the ado.rb file from there
to the ado directory created in step 1
The SQL Server pilot works only on windows systems because it needs
WIN32OLE.This is everything I can do for you, except suggesting you make yours
first trials with InstantRails, wich avoids all these problems.
Yours
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,206
Messages
2,571,069
Members
47,675
Latest member
RollandKna

Latest Threads

Top