Forum: Ruby activerecord on cygwin with sqlite3

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.
braver (Guest)
on 2005-12-17 05:08
(Received via mailing list)
I've successfully installed sqlite3-ruby on cygwin (can run a simple
database fetch), but the activerecord test suite fails.  I'm running it
as described in the RUNNING_UNIT_TESTS doc:

$ ~/gems/activerecord-1.13.1
$ rake test_sqlite3
(in /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1)
/usr/bin/ruby -Ilib:test:test/connections/native_sqlite3
"/usr/lib/ruby/gems/1.8
/gems/rake-0.6.2/lib/rake/rake_test_loader.rb"
"test/aaa_create_tables_test.rb"
"test/adapter_test.rb" ... "test/transactions_test.rb"
"test/unconnected_test.rb" "test/validations_test.rb"

../test/../lib/active_record/base.rb:244: undefined method
`cattr_accessor' for ActiveRecord::Base:Class (NoMethodError)
        from
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
        from ./test/../lib/active_record.rb:37
        from ./test/abstract_unit.rb:5
        from ./test/aaa_create_tables_test.rb:2
        from
/usr/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader.rb:5
        from
/usr/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader.rb:5
rake aborted!
Command failed with status (1): [/usr/bin/ruby
-Ilib:test:test/connections/...]

I also noticed that among the targets, there is build/drop tables for
mysql/postgresql, but not sqlite.  Can it be related to the above
problem?

Cheers,
Alexy
braver (Guest)
on 2005-12-18 09:51
(Received via mailing list)
I solved the problem by supplying -rubygems to ruby, by setting
RUBYOPT=-rubygems, before doing rake test_sqlite3.  I wonder why others
don't report that.  You guys test your gems, especially such
foundational ones as activerecord, don't you?  :)
braver (Guest)
on 2005-12-18 10:00
(Received via mailing list)
I solved the problem by supplying -rubygems to ruby, by setting
RUBYOPT=-rubygems, before doing rake test_sqlite3.  The sqlite3-ruby is
installed as a gem.  I wonder why others don't report that.  You guys
test your gems, especially such
foundational ones as activerecord, don't you?  :)
This topic is locked and can not be replied to.