Activerecord on cygwin with sqlite3


#1

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:inrequire’
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


#2

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? :slight_smile:


#3

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? :slight_smile: