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 7927485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:19:35+00:00 2026-06-03T19:19:35+00:00

I am trying to initialise mongoid from a rails 3.2 application using ruby-1.9.2 with

  • 0

I am trying to initialise mongoid from a rails 3.2 application using ruby-1.9.2 with the following command:

rails g mongoid:config

When I issue the command, I get the following error:

/Users/paulcowan/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/rubygems_integration.rb:143:in
block in replace_gem': railties is not part of the bundle. Add it to
Gemfile. (Gem::LoadError)
from /Users/paulcowan/.rvm/gems/ruby-1.9.2-p290/bin/rails:18:in
‘

My gem file looks like this:

source 'https://rubygems.org'

gem 'rails', '3.2.3'

group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'

# structures
gem 'json',                 '~> 1.6.3'
gem 'rabl',                 '~> 0.5.1'

# use thin instead of WEBrick
gem 'thin'

# MongoDB..
gem 'bson_ext'
gem 'mongoid'

gem "haml", ">= 3.1.4"
gem "haml-rails", ">= 0.3.4", :group => :development
gem "bootstrap-sass", ">= 2.0.1"

gem 'inherited_resources'

group :development, :test do
  gem 'guard'
  gem 'growl'
  gem 'rspec-rails', '2.8.1'
  gem 'webrat', '0.7.3'
  gem 'factory_girl_rails', '1.7.0'
  gem 'rdoc', '~> 3.12'
  gem "database_cleaner"
  gem "mongoid-rspec"
  gem "pry-rails", "~> 0.1.6"
end

group :test do
  gem 'jasminerice', :git => "https://github.com/bradphelan/jasminerice.git", :branch => 'master'
  gem 'guard-jasmine', :git => "https://github.com/netzpirat/guard-jasmine.git", :branch => 'master'
  gem 'capybara',          '~> 1.1.2'
  gem 'fivemat'
end
  • 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-06-03T19:19:38+00:00Added an answer on June 3, 2026 at 7:19 pm

    I had various bundler/gem problems with a fresh Rails 3.2.3 project followed by your Gemfile. I was able to get past it by removing Gemfile.lock and rerunning ‘bundle install’. The log of what I did is attached and it includes excising ActiveRecord. Hope that this helps.

    $ ruby -v
    ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0]
    $ rails new free-11479-mongoid-rails-g
    $ cd free-11479-mongoid-rails-g
    
    Gemfile as per user
    
    $ bundle install
    You have requested:
      json ~> 1.6.3
    
    The bundle currently has json locked at 1.7.1.
    Try running `bundle update json`
    
    $ bundle update json
    Bundler could not find compatible versions for gem "multi_json":
      In Gemfile:
        rabl (~> 0.5.1) ruby depends on
          multi_json (~> 1.0.3) ruby
    
        guard-jasmine (>= 0) ruby depends on
          multi_json (1.3.4)
    
    $ rm Gemfile.lock
    $ bundle install
    $ rails g mongoid:config
         create  config/mongoid.yml
    ---------
    Assuming that you want to excise ActiveRecord...
    
    dereference ActiveRecord
    
        config/application.rb
            #config.active_record.whitelist_attributes = true
        config/environments/development.rb
            #config.active_record.mass_assignment_sanitizer = :strict
            #config.active_record.auto_explain_threshold_in_seconds = 0.5
        config/environments/development.rb
            #config.active_record.mass_assignment_sanitizer = :strict
        test/test_helper.rb
          #fixtures :all
    
    $ rm database.yml
    
    config/application.rb
        #require 'rails/all'
        require "action_controller/railtie"
        require "action_mailer/railtie"
        require "active_resource/railtie"
        require "rails/test_unit/railtie"
    
    $ rake test # passes
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting the following error when trying to Initialise the Module using Unity
I'm trying create an immutable object and initialise it from xml config file in
I am trying to initialize NSDictionary but it gives me following error: Program received
QVariant (needed for QSettings class) supports creation from QMap<QString, QVariant> But trying to initialise
I am trying to get the following loop working to fill an array of
I am trying to get a Java app using spring-security to talk to a
I'm trying to get a value from a function which is a URLLoader COMPLETE
I'm trying to get a Silverlight 4 unit test to work (using the framework
I am trying to initialise a FileInputStream object using a File object. I am
I am using trying to get my head round unit testing with DI/Mocks (Ninject/Moq)

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.