Rails 4 compatibility #35

Merged
merged 5 commits into from Nov 23, 2012

3 participants

@rewritten

Using ActiveSupport::Concern and a railtie makes it future-proof. Tested with a rails 3 app and with a rails 4 app.

@nofxx nofxx merged commit d6c437d into nofxx:master Nov 23, 2012
@nofxx
Owner

Thank you! A lot! Lesson learned.

@MrAndreatta

Please, update the docs! I found the auto loading ORM only here.

Owner

I didn't knew about this.. hehe anyways, fixed mongoid now, wasnt working. Thanks for the heads up!

Worked! But now I am obliged put the mongoId in gem file, even if they do not use it. Is it right?

Error without mongoId:
/Users/andersonandreatta/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in require': cannot load such file -- mongoid/version (LoadError)
from /Users/andersonandreatta/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in
block in require'
from /Users/andersonandreatta/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in load_dependency'
from /Users/andersonandreatta/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in
require'
from /Users/andersonandreatta/.rvm/gems/ruby-1.9.3-p194/gems/devise-2.2.3/lib/devise/rails.rb:34:in block in <class:Engine>'
from /Users/andersonandreatta/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/initializable.rb:30:in
instance_exec'
from /Users/andersonandreatta/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/initializable.rb:30:in run'
from /Users/andersonandreatta/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/initializable.rb:55:in
block in run_initializers'
from /Users/andersonandreatta/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/initializable.rb:54:in each'
from /Users/andersonandreatta/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/initializable.rb:54:in
run_initializers'
from /Users/andersonandreatta/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/application.rb:136:in initialize!'
from /Users/andersonandreatta/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in
method_missing'
from /Users/andersonandreatta/Workspaces/Agivis/eclipse/medcare/medcare-servidor/config/environment.rb:5:in <top (required)>'
from /Users/andersonandreatta/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in
require'
from /Users/andersonandreatta/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in block in require'
from /Users/andersonandreatta/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in
load_dependency'
from /Users/andersonandreatta/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment