Forum: Ruby on Rails HELP: undefined method cattr_accessor

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
1cf6bf4dee30fd24d96f007a96ad4d05?d=identicon&s=25 info.ADSD@googlemail.com (Guest)
on 2007-07-17 11:42
(Received via mailing list)
hi to all,

when i try to generate a new model, i get the following error message.

D:\InstantRails\rails_apps\AR_ODBC>ruby script/generate model
amempldept
D:/Projekt/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/connection_adapters/abstract/connection_specification.r
b:14: undefined method `cattr_accessor' for ActiveRecord::Base:Class
(NoMethodError)
from D:/Projekt/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `gem_original_require'
from D:/Projekt/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `require'
from D:/Projekt/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/connection_adapters/abstract_adapter.rb:10

from D:/Projekt/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `gem_original_require'
from D:/Projekt/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `require'
from D:/Projekt/ruby/lib/ruby/gems/1.8/gems/odbc-rails-1.4/lib/
active_record/connection_adapters/odbc_adapter.rb:27
from D:/Projekt/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `gem_original_require'
from D:/Projekt/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `require'
... 6 levels...
from D:/Projekt/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/
generate.rb:1
from D:/Projekt/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `gem_original_require'
from D:/Projekt/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `require'
from script/generate:3

RUBYOPT=-rubygems is set
connection via an spezial odbc driver (not one of the default drivers)

connection via the special driver is posible.

<<
  require 'odbc'
  puts "Starte Verarbeitung ODBC"

  DSN ='ABC'
  USR ='Admin'
  PWD ='password'

  con=ODBC.connect(DSN,USR,PWD)

  puts con
  print "\n"

  sSQL = "SELECT lPortfolioItemId, User.Name, User.FirstName,
Model.Nature.Name FROM amPortfolio WHERE   lPortfolioItemId > 10000
AND lPortfolioItemId<=32729"

  rs = con.prepare(sSQL)
  rs.execute

  rs.columns {|col|
     print(col.name, " --- " )
  }
  print "\n"

   rs.each{ |row|
      row.each { |col|
         print(col, "    ")
      }
   print "\n"
   }

   print "\n"


  puts "Verbindung geschlossen"

  rs.close

  con.disconnect

>>

does someone has an idea....

thx

Achim
499a7ab6960ed39b70f07d3730c421f8?d=identicon&s=25 Enrique Comba Riepenhausen (Guest)
on 2007-07-17 12:24
(Received via mailing list)
Hello everyone!

I am developing a rails application that inside a controller wants to
make a request to a web service. For testing purposes I developed the
web service inside that very same rails application.

When I call the controller this one seems to hang while trying to
connect to the web service. So my question here, and the only logical
explanation I have is:

Is Rails single threaded? (If so I will have to put the sample web
service on another instance of rails...)

Thanks a lot!

Enrique
D167461db018fb93fa36587b3def84cf?d=identicon&s=25 Andreas Kviby (Guest)
on 2007-07-17 12:42
(Received via mailing list)
Hi. Yes rails is single threaded so use diffent instances of mongrel to
run it.

2007/7/17, Enrique Comba Riepenhausen <ecomba@gmail.com>:
>
> Is Rails single threaded? (If so I will have to put the sample web
> service on another instance of rails...)
>
> Thanks a lot!
>
> Enrique
>
> >
>


--
----------------------------------------------------
Andreas Kviby
Telefon 070-352 66 76
E-post akviby@gmail.com
499a7ab6960ed39b70f07d3730c421f8?d=identicon&s=25 Enrique Comba Riepenhausen (Guest)
on 2007-07-17 13:07
(Received via mailing list)
On 17/07/2007, at 12:41, Andreas Kviby wrote:

>
> Hi. Yes rails is single threaded so use diffent instances of
> mongrel to run it.
>

Thanks Andreas, I thought so :)

Cheers,

Enrique
This topic is locked and can not be replied to.