2013-06-18 34 views
13

Tôi có lỗi sau khi tôi cố gắng tạo đường ray tạo mongoid: config Không thể tìm thấy máy phát điện mongoid: config. Nếu tôi chỉ định đá quý 'mongoid', '3.1.4', nó mang lại cho tôi những điều sau đây:Không thể tìm thấy máy phát điện mongoid: config

Bundler không thể tìm thấy phiên bản tương thích cho gem "activemodel": Trong Gemfile: mongoid (= 3.1.4) x86 mingw32 phụ thuộc vào activemodel (~> 3.2) x86 mingw32

rails (= 4.0.0.rc2) x86-mingw32 depends on 
    activemodel (4.0.0.rc2) 

Xin vui lòng giúp. Cảm ơn bạn!

GemFile: đá quý 'đường ray', '4.0.0.rc2'

gem 'mongoid' 
gem 'mongoid-paperclip' 
gem 'bson_ext' 

GemFile.lock

GEM 

    specs: 
    actionmailer (4.0.0.rc2) 
     actionpack (= 4.0.0.rc2) 
     mail (~> 2.5.3) 
    actionpack (4.0.0.rc2) 
     activesupport (= 4.0.0.rc2) 
     builder (~> 3.1.0) 
     erubis (~> 2.7.0) 
     rack (~> 1.5.2) 
     rack-test (~> 0.6.2) 
    activemodel (4.0.0.rc2) 
     activesupport (= 4.0.0.rc2) 
     builder (~> 3.1.0) 
    activerecord (4.0.0.rc2) 
     activemodel (= 4.0.0.rc2) 
     activerecord-deprecated_finders (~> 1.0.2) 
     activesupport (= 4.0.0.rc2) 
     arel (~> 4.0.0) 
    activerecord-deprecated_finders (1.0.3) 
    activesupport (4.0.0.rc2) 
     i18n (~> 0.6, >= 0.6.4) 
     minitest (~> 4.2) 
     multi_json (~> 1.3) 
     thread_safe (~> 0.1) 
     tzinfo (~> 0.3.37) 
    arel (4.0.0) 
    atomic (1.1.9) 
    bson (1.9.0) 
    bson_ext (1.9.0) 
     bson (~> 1.9.0) 
    builder (3.1.4) 
    climate_control (0.0.3) 
     activesupport (>= 3.0) 
    cocaine (0.5.1) 
     climate_control (>= 0.0.3, < 1.0) 
    coffee-rails (4.0.0) 
     coffee-script (>= 2.2.0) 
     railties (>= 4.0.0.beta, < 5.0) 
    coffee-script (2.2.0) 
     coffee-script-source 
     execjs 
    coffee-script-source (1.6.2) 
    durran-validatable (2.0.1) 
    erubis (2.7.0) 
    execjs (1.4.0) 
     multi_json (~> 1.0) 
    hike (1.2.3) 
    i18n (0.6.4) 
    jbuilder (1.4.2) 
     activesupport (>= 3.0.0) 
     multi_json (>= 1.2.0) 
    jquery-rails (3.0.1) 
     railties (>= 3.0, < 5.0) 
     thor (>= 0.14, < 2.0) 
    json (1.8.0) 
    leshill-will_paginate (2.3.11) 
    mail (2.5.4) 
     mime-types (~> 1.16) 
     treetop (~> 1.4.8) 
    mime-types (1.23) 
    minitest (4.7.4) 
    mongo (1.9.0) 
     bson (~> 1.9.0) 
    mongoid (1.0.6) 
     activesupport (>= 2.2.2) 
     durran-validatable (>= 2.0.1) 
     leshill-will_paginate (>= 2.3.11) 
     mongo (>= 0.18.2) 
    mongoid-paperclip (0.0.8) 
     paperclip (>= 2.3.6) 
    multi_json (1.7.7) 
    paperclip (3.4.2) 
     activemodel (>= 3.0.0) 
     activerecord (>= 3.0.0) 
     activesupport (>= 3.0.0) 
     cocaine (~> 0.5.0) 
     mime-types 
    polyglot (0.3.3) 
    rack (1.5.2) 
    rack-test (0.6.2) 
     rack (>= 1.0) 
    rails (4.0.0.rc2) 
     actionmailer (= 4.0.0.rc2) 
     actionpack (= 4.0.0.rc2) 
     activerecord (= 4.0.0.rc2) 
     activesupport (= 4.0.0.rc2) 
     bundler (>= 1.3.0, < 2.0) 
     railties (= 4.0.0.rc2) 
     sprockets-rails (~> 2.0.0) 
    railties (4.0.0.rc2) 
     actionpack (= 4.0.0.rc2) 
     activesupport (= 4.0.0.rc2) 
     rake (>= 0.8.7) 
     thor (>= 0.18.1, < 2.0) 
    rake (10.0.4) 
    rdoc (3.12.2) 
     json (~> 1.4) 
    sass (3.2.9) 
    sass-rails (4.0.0.rc2) 
     railties (>= 4.0.0.beta, < 5.0) 
     sass (>= 3.1.10) 
     sprockets-rails (~> 2.0.0) 
    sdoc (0.3.20) 
     json (>= 1.1.3) 
     rdoc (~> 3.10) 
    sprockets (2.10.0) 
     hike (~> 1.2) 
     multi_json (~> 1.0) 
     rack (~> 1.0) 
     tilt (~> 1.1, != 1.3.0) 
    sprockets-rails (2.0.0) 
     actionpack (>= 3.0) 
     activesupport (>= 3.0) 
     sprockets (~> 2.8) 
    thor (0.18.1) 
    thread_safe (0.1.0) 
     atomic 
    tilt (1.4.1) 
    treetop (1.4.14) 
     polyglot 
     polyglot (>= 0.3.1) 
    turbolinks (1.2.0) 
     coffee-rails 
    tzinfo (0.3.37) 
    uglifier (2.1.1) 
     execjs (>= 0.3.0) 
     multi_json (~> 1.0, >= 1.0.2) 

PLATFORMS 
    x86-mingw32 

DEPENDENCIES 
    bson_ext 
    coffee-rails (~> 4.0.0) 
    jbuilder (~> 1.2) 
    jquery-rails 
    mongoid 
    mongoid-paperclip 
    rails (= 4.0.0.rc2) 
    sass-rails (~> 4.0.0.rc2) 
    sdoc 
    turbolinks 
    uglifier (>= 1.3.0) 
+4

see: http://stackoverflow.com/questions/15512683/comparability-issue-rails-4-beta-ruby-2-0-0-mongoid –

+0

Jesse Bây giờ làm việc – Eugene

Trả lời

16

Đối với Rails 4 bạn cần Mongoid 4, kể từ phiên bản này vẫn chưa chính thức phát hành, bạn có thể sử dụng các chi nhánh chủ từ github. Thêm phần này vào Gemfile của bạn:

gem 'mongoid', '~> 4.0.0.rc1', github: 'mongoid/mongoid' 

Sau đó chạy bó cài đặt

Sau đó chạy thành công bạn có thể sử dụng

rails g mongoid:config 

để tạo ra một tập tin cấu hình.

3

Tôi tin rằng đá quý bson không còn cần thiết nữa. Đây là những gì giải quyết vấn đề cho tôi.

Di gem 'bson_ext' từ Gemfile bạn

Bạn sẽ cũng đã phải rebundle bundle install

Thần bạn sẽ có thể để chạy cấu hình

Hy vọng rằng sẽ giúp.

+0

Không có ý tưởng tại sao, nhưng loại bỏ bson_ext cố định vấn đề cho tôi. – kaboom

5

này làm việc cho tôi:

gem 'rails', '4.0.3' 

gem 'mongoid', github: 'mongoid/mongoid' 

gem 'bson_ext' 
Các vấn đề liên quan