[mongoid] Rails3/Mongoid PSA: update your config/application.rb

97 views
Skip to first unread message

Jacques Crocker

unread,
Apr 26, 2010, 10:44:55 PM4/26/10
to mon...@googlegroups.com
Mongoid public service annoucement (for Rails3 users), you should include the mongoid railtie explicitly in your config/application.rb:

# config/application.rb
require File.expand_path('../boot', __FILE__)

require "action_controller/railtie"
require "action_mailer/railtie"
require "mongoid/railtie"


Also, if you want mongoid generators, please be explicit about it in the config.generators block:

config.generators do |g|
g.orm :mongoid
g.template_engine :haml
g.test_framework :rspec
g.integration_tool :rspec
end

This will work with any current beta mongoid gem. In the next beta however, Mongoid Railtie will not automatically wire up the railtie for you, so better to explicitly include it now as to avoid future breakage.

Thanks!

--
Subscription settings: http://groups.google.com/group/mongoid/subscribe?hl=en

Jacques Crocker

unread,
Apr 29, 2010, 8:00:35 PM4/29/10
to Mongoid
Patch has been added
http://github.com/durran/mongoid/commit/5af1c09d1c66eb0b13c574b224518fc93f1188b4

Also added a patch to the mongoid:config generator so it will add
require 'mongoid/railtie' for you. So hopefully the mongoid
installation process wont be any harder than it is now

http://github.com/durran/mongoid/commit/37acccdc9a4facb1596dc521793d9e79128914e2
Reply all
Reply to author
Forward
0 new messages