ar-jdbc and gems misbehave when testing for railtie integration
---------------------------------------------------------------
Key: JRUBY-5188
URL: http://jira.codehaus.org/browse/JRUBY-5188
Project: JRuby
Issue Type: Bug
Components: Projects
Affects Versions: JRuby 1.5.3
Environment: AR-JDBC 0.9.7
Reporter: bob mcwhirter
AR-JDBC tests for the presence of Rails::Railtie to determine if running under
Rails 3 and should perform Railtie integration.
If you have a Rails 2.3.8 application with frozen rails under
RAILS_ROOT/vendor/rails/, but also have Rails 3 in your system gems, AR-JDBC
gets confused.
The LoadError occurs attempting to load rails/railtie, but the Rubygems's
active path searcher will find rails3's Rails::Railtie, and load it. This
results in multiple versions of the Rails stack to attempt initialization, and
fails.
Since Rubygems can be a little too friendly in searching for paths and gems, it
might be smart to test Rails::VERSION or other indicator to determine if
Railties integrations should occur, instead of relying on LoadErrors.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email