jruby / jruby-rack

Rack for JRuby and Java appservers
MIT License
397 stars 137 forks source link

Rails 4 force us to use ActiveRecord? #127

Closed guilleiguaran closed 12 years ago

guilleiguaran commented 12 years ago

Reading in Appraisals file I'm reading this comment:

# TODO Rails 4.0 (once again) forces us to use ActiveRecord :
# Java::OrgJrubyRack::RackInitializationException:
# No such file or directory - [...]/jruby-rack/src/spec/stub/rails40/WEB-INF/config/database.yml

Can you explain me a bit better what's happening?, this maybe something that I can fix in Rails itself before of the release of 4.0

/cc @kares

kares commented 12 years ago

Hey Guillermo, thanks for looking into this ... I'm not sure about the details it's a work I did ~ 2 months ago first on AR-JDBC https://github.com/jruby/activerecord-jdbc-adapter/pull/227 It's merged but on a non-master branch (hopefully - there wasn't much activity despite promised). I was somehow unable to setup a Rails 4.0 without being forced to load (and thus use AR) https://github.com/kares/activerecord-jdbc-adapter/commit/817c84dc6ec14440dca4bfd502df035a2c38ffa2 I did not dig down why, would be really great if you could look into it ...

kares commented 12 years ago

Oh, I'm sorry my comment must sound confusing now, I got a bit confused myself :) ... Just try appraising up Rails master - you'll most likely end up with a minimum of :

appraise "rails40" do
  gem 'rails', :github => 'rails/rails'
  gem 'journey', :github => 'rails/journey'
  gem 'activerecord-deprecated_finders', :require => nil,
      :github => 'rails/activerecord-deprecated_finders'
end

and then you should end up with a Java::OrgJrubyRack::RackInitializationException as mentioned ...