Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7656467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:46:17+00:00 2026-05-31T12:46:17+00:00

i’m trying to use Mongoid with rails 3.2.2, i’ve added: gem mongoid, ~> 2.4

  • 0

i’m trying to use Mongoid with rails 3.2.2, i’ve added:

gem "mongoid", "~> 2.4"
gem "bson_ext", "~> 1.5"

to my gemfile, run:

bundle install

then

rails g mongoid:config

then edited my application.rb so:

#require "active_record/railtie" commented because of mongoid
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require "sprockets/railtie"

and i have mongoid.yml:

development:
  host: localhost
  database: boards_development

test:
  host: localhost
  database: boards_test

# set these environment variables on your prod server
production:
  host: <%= ENV['MONGOID_HOST'] %>
  port: <%= ENV['MONGOID_PORT'] %>
  username: <%= ENV['MONGOID_USERNAME'] %>
  password: <%= ENV['MONGOID_PASSWORD'] %>
  database: <%= ENV['MONGOID_DATABASE'] %>
  # slaves:
  #   - host: slave1.local
  #     port: 27018
  #   - host: slave2.local
  #     port: 27019

I’ve deleted databse.yml as is said on mongoid docs but when running rails server I get error like this:

matteo@matteo-stable:~/Matteo/Dev/boards$ rails s
=> Booting WEBrick
=> Rails 3.2.2 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.2/lib/rails/railtie/configuration.rb:85:in `method_missing': undefined method `active_record' for #<Rails::Application::Configuration:0x8eb762c> (NoMethodError)
    from /home/matteo/Matteo/Dev/boards/config/environments/development.rb:26:in `block in <top (required)>'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.2/lib/rails/railtie/configurable.rb:24:in `class_eval'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.2/lib/rails/railtie/configurable.rb:24:in `configure'
    from /home/matteo/Matteo/Dev/boards/config/environments/development.rb:1:in `<top (required)>'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `block in require'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.2/lib/rails/engine.rb:571:in `block in <class:Engine>'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.2/lib/rails/initializable.rb:30:in `instance_exec'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.2/lib/rails/initializable.rb:30:in `run'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.2/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.2/lib/rails/initializable.rb:54:in `each'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.2/lib/rails/initializable.rb:54:in `run_initializers'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.2/lib/rails/application.rb:136:in `initialize!'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from /home/matteo/Matteo/Dev/boards/config/environment.rb:5:in `<top (required)>'
    from /home/matteo/Matteo/Dev/boards/config.ru:4:in `require'
    from /home/matteo/Matteo/Dev/boards/config.ru:4:in `block in <main>'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
    from /home/matteo/Matteo/Dev/boards/config.ru:1:in `new'
    from /home/matteo/Matteo/Dev/boards/config.ru:1:in `<main>'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.2/lib/rails/commands/server.rb:46:in `app'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.2/lib/rails/commands/server.rb:70:in `start'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.2/lib/rails/commands.rb:55:in `block in <top (required)>'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.2/lib/rails/commands.rb:50:in `tap'
    from /home/matteo/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.2/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'
matteo@matteo-stable:~/Matteo/Dev/boards$ rails s
=> Booting WEBrick
=> Rails 3.2.2 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
host is not a valid option for Mongo::Connection
[2012-03-16 20:00:08] INFO  WEBrick 1.3.1
[2012-03-16 20:00:08] INFO  ruby 1.9.3 (2012-02-16) [i686-linux]
[2012-03-16 20:00:08] INFO  WEBrick::HTTPServer#start: pid=9936 port=3000
^C[2012-03-16 20:01:03] INFO  going to shutdown ...
[2012-03-16 20:01:03] INFO  WEBrick::HTTPServer#start done.
Exiting

leaving the line about active record i don’t get any error but this:

host is not a valid option for Mongo::Connection

should i install something other?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T12:46:18+00:00Added an answer on May 31, 2026 at 12:46 pm

    You removed ActiveRecord from your app, but you still have its config options. Look in environment.rb and application.rb (and other files under /config) for “active_record”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I want use html5's new tag to play a wav file (currently only supported
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.