2016-02-22 6 views
10
mongoid

रूबी संस्करण 2.3.0माणिक असंगत और मणि के साथ संघर्ष

रेल संस्करण 5.0.0.beta2

** GEMFILE **

source 'https://rubygems.org' 
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 
gem 'rails', '>= 5.0.0.beta2', '< 5.1' 
#mongoid gem 
gem 'mongoid', '~> 5.1.0' 
# Use Puma as the app server 
gem 'puma' 
# Use SCSS for stylesheets 
gem 'sass-rails', '~> 5.0' 
# Use Uglifier as compressor for JavaScript assets 
gem 'uglifier', '>= 1.3.0' 
# Use CoffeeScript for .coffee assets and views 
gem 'coffee-rails', '~> 4.1.0' 
# See https://github.com/rails/execjs#readme for more supported runtimes 
# gem 'therubyracer', platforms: :ruby 
# Use jquery as the JavaScript library 
gem 'jquery-rails' 
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks 
gem 'turbolinks' 
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 
gem 'jbuilder', '~> 2.0' 
# Action Cable dependencies for the Redis adapter 
gem 'redis', '~> 3.0' 
# Use ActiveModel has_secure_password 
# gem 'bcrypt', '~> 3.1.7' 
# Use Capistrano for deployment 
# gem 'capistrano-rails', group: :development 
group :development, :test do 
    # Call 'byebug' anywhere in the code to stop execution and get a debugger console 
    gem 'byebug' 
end 
group :development do 
    # Access an IRB console on exception pages or by using <%= console %> in views 
    gem 'web-console', '~> 3.0' 
    # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring 
    gem 'spring' 
end 
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem 
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] 

रन बंडल स्थापित करने के बाद मैं देखता हूं:

Bundler could not find compatible versions for gem "activemodel": 
    In snapshot (Gemfile.lock): 
    activemodel (= 5.0.0.beta2) 

    In Gemfile: 
rails (< 5.1, >= 5.0.0.beta2) was resolved to 5.0.0.beta2, which 
depends on 
activerecord (= 5.0.0.beta2) was resolved to 5.0.0.beta2, which 
depends on 
     activemodel (= 5.0.0.beta2) 

rails (< 5.1, >= 5.0.0.beta2) was resolved to 5.0.0.beta2, which 
depends on 
activerecord (= 5.0.0.beta2) was resolved to 5.0.0.beta2, which 
depends on 
     activemodel (= 5.0.0.beta2) 

    mongoid (~> 4.0.0) was resolved to 4.0.0, which depends on 
     activemodel (~> 4.0) 

    web-console (~> 3.0) was resolved to 3.1.1, which depends on 
     activemodel (>= 4.2) 

bundle update चल रहा है अपने Gemfile में रत्न, जो कि संघर्ष को हल कर सकता है, का उपयोग करके अपने स्नैपशॉट को खरोंच से पुनर्निर्माण करेगा।

+0

क्या आप सुनिश्चित हैं कि त्रुटि प्रदान की गई Gemfile को बंडल करने से है? चूंकि 'मणि' मोंगोइड ',' ~> 5.1.0 '' का कारण नहीं होना चाहिए 'mongoid (~> 4.0.0) को 4.0.0 तक हल किया गया था, जो सक्रिय मॉडल (~> 4.0) ' –

+0

पर निर्भर करता है यह आसान है: mongoid अभी तक रेल 5 के साथ काम नहीं करता है। एक खुली टिकट है और वे इसे मोंगोइड 6 में जोड़ देंगे। Https://jira.mongodb.org/browse/MONGOID-4218 – BroiSatse

+0

मैंने रेलों को नया स्टोर बनाया --स्किप-सक्रिय-रिकॉर्ड बस यह –

उत्तर

19

कुछ दिन पहले की स्थिति के अनुसार, अब आप केवल यह आपके gemfile को जोड़ सकते हैं:

gem 'mongoid', git: 'https://github.com/mongodb/mongoid.git'

+0

हां ऐसा लगता है काम करने के लिए। beta4 को रेल संस्करण को बढ़ावा देना याद रखें (या इसे पढ़ने के दौरान आपके पास नवीनतम संस्करण) –

0

रेल 5 पर मोंगोइड के लिए एक फीचर शाखा है। इसे अपने रत्न में जोड़ें।

gem 'mongoid', git: 'https://github.com/estolfo/mongoid.git', branch: 'MONGOID-4218-rails-5' 
+0

लगता है कि यह 5.0.0.beta4 :( –

+0

@RomanGaufman के साथ अभी तक संगत नहीं है यदि बग को मोंगोइड जेआईआरए ट्रैकर को सूचित किया गया है, तो संगतता तेजी से आ रही है। –

4

मैं एक ही समस्या का सामना करना पड़ा। मैंने mongoid मणि संस्करण को 6.1.0 में बदल दिया और बंडल अद्यतन चलाने के बाद सबकुछ काम करता है।

#mongoid gem 
gem 'mongoid', '~> 6.1.0' 
संबंधित मुद्दे