sql >> Database teknologi >  >> NoSQL >> MongoDB

Skinner g fejler for mongoide kommandoer

Jeg havde forskellige bundler/perle-problemer med et nyt Rails 3.2.3-projekt efterfulgt af din Gemfile. Jeg var i stand til at komme forbi det ved at fjerne Gemfile.lock og køre 'bundle install' igen. Loggen over, hvad jeg gjorde, er vedhæftet, og den inkluderer excising ActiveRecord. Håber, at dette hjælper.

$ 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



  1. Forstå MongoDB Backup Options

  2. Sender yderligere krukker til Spark via spark-submit

  3. Tilslutning til Mongodb docker container fra en anden docker container

  4. MongoDB og Mongoid i produktion