Seemingly, there is a path issue when using Rails Engines with Rails
1.1.2. The error appears if you have two different RubyGem version of
Rails installed and want to use vendor rails (1.1.2).
OK, my setup is the following:
- I have the following Gem Rails versions installed: rails (1.1.2,
- I created a new application with “rails test” and set up the
- I created the simplest possible database schema (one table “foos”
with fields “id” and “txt”).
- I created a model class “Foo”
- I got the current Rails from Subversion (http://
- I installed the latest Rails Engines version: http://svn.rails-
- I configured it to run in “edge mode” and made it perform logging
as described in the manual.
Then, I tried to run tests and get errors - ugh!
manuel 20:59:48 test $> ruby test/unit/foo_test.rb
Engines 1.1 require_or_load: application_helper
Engines 1.1 require_or_load: application_api
Loaded suite test/unit/foo_test
Finished in 0.359273 seconds.
NoMethodError: undefined method
clear_connection_cache!' for ActiveRecord::Base:Class /Users/manuel/Development/Rails/test/config/../vendor/rails/ activerecord/lib/active_record/base.rb:1129:inmethod_missing’
1 tests, 1 assertions, 0 failures, 1 errors
It seems that Engines somehow makes the active_support code load
active_record’s fixtures.rb from the Gems.
Of course, it is possible to remove the Rails 1.0 gems but I thought
you would like to know that there seems to be something fishy inside
the Engines path code.