-
Type: Bug
-
Resolution: Done
-
Priority: Blocker - P1
-
Affects Version/s: 2.5.0
-
Component/s: None
-
None
-
Environment:$ bundle update mongoid
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies....
Using rake 12.0.0
Using concurrent-ruby 1.0.5 (was 1.0.4)
Using i18n 0.9.3 (was 0.8.0)
Fetching minitest 5.11.2 (was 5.10.1)
Installing minitest 5.11.2 (was 5.10.1)
Using thread_safe 0.3.6 (was 0.3.5)
Using tzinfo 1.2.4 (was 1.2.2)
Using activesupport 5.0.1
Using builder 3.2.3
Using erubis 2.7.0
Using mini_portile2 2.1.0
Using nokogiri 1.7.2
Using rails-dom-testing 2.0.2
Using loofah 2.0.3
Using rails-html-sanitizer 1.0.3
Using actionview 5.0.1
Using rack 2.0.1
Using rack-test 0.6.3
Using actionpack 5.0.1
Using nio4r 1.2.1
Using websocket-extensions 0.1.2
Using websocket-driver 0.6.5
Using actioncable 5.0.1
Using globalid 0.3.7
Using activejob 5.0.1
Using mime-types-data 3.2016.0521
Using mime-types 3.1
Using mail 2.6.4
Using actionmailer 5.0.1
Using activemodel 5.0.1
Using arel 7.1.4
Using activerecord 5.0.1
Using public_suffix 2.0.5
Using addressable 2.5.0
Using execjs 2.7.0
Using autoprefixer-rails 6.7.2
Using sass 3.4.23
Using bootstrap-sass 3.3.7
Using bson 4.3.0 (was 4.2.1)
Using bundler 1.16.0.pre.3
Using byebug 9.0.6
Using xpath 2.0.0
Using capybara 2.12.0
Using cliver 0.3.2
Using coderay 1.1.1
Using coffee-script-source 1.12.2
Using coffee-script 2.4.1
Using method_source 0.8.2
Using thor 0.19.4
Using railties 5.0.1
Using coffee-rails 4.2.1
Using css_parser 1.4.8
Using debug_inspector 0.0.2
Using diff-lcs 1.3
Using dotenv 2.2.0
Using dotenv-rails 2.2.0
Using factory_bot 4.8.2
Using factory_bot_rails 4.8.2
Using faker 1.7.3
Using ffi 1.9.17
Using font-awesome-rails 4.7.0.1
Using multi_json 1.12.1
Using jbuilder 2.6.1
Using jquery-rails 4.2.2
Using launchy 2.4.3
Using libv8 3.16.14.17 (x86_64-darwin-16)
Using rb-fsevent 0.9.8
Using rb-inotify 0.9.8
Using listen 3.0.8
Using mongo 2.5.0 (was 2.4.1)
Using mongoid 6.0.3
Using rspec-support 3.5.0
Using rspec-core 3.5.4
Using rspec-expectations 3.5.0
Using rspec-mocks 3.5.0
Using rspec 3.5.0
Using mongoid-rspec 1.10.0
Using poltergeist 1.13.0
Using slop 3.6.0
Using pry 0.10.4
Using pry-rails 0.3.4
Using puma 3.7.0
Using sprockets 3.7.1
Using sprockets-rails 3.2.0
Using rails 5.0.1
Using rails-i18n 5.0.3
Using ref 2.0.0
Using roadie 3.2.1
Using roadie-rails 1.1.1
Using rspec-collection_matchers 1.1.3
Using rspec-rails 3.5.2
Using tilt 2.0.6
Using sass-rails 5.0.6
Using simple_form 3.4.0
Using temple 0.7.7
Using slim 3.0.7
Using slim-rails 3.1.1
Using therubyracer 0.12.3
Using uglifier 3.0.4
Using valid_email 0.0.13
Using web-console 3.4.0
Bundler attempted to update mongoid but its version stayed the same
Bundle updated!$ bundle update mongoid The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. Fetching gem metadata from https://rubygems.org/ ......... Fetching gem metadata from https://rubygems.org/ . Resolving dependencies.... Using rake 12.0.0 Using concurrent-ruby 1.0.5 (was 1.0.4) Using i18n 0.9.3 (was 0.8.0) Fetching minitest 5.11.2 (was 5.10.1) Installing minitest 5.11.2 (was 5.10.1) Using thread_safe 0.3.6 (was 0.3.5) Using tzinfo 1.2.4 (was 1.2.2) Using activesupport 5.0.1 Using builder 3.2.3 Using erubis 2.7.0 Using mini_portile2 2.1.0 Using nokogiri 1.7.2 Using rails-dom-testing 2.0.2 Using loofah 2.0.3 Using rails-html-sanitizer 1.0.3 Using actionview 5.0.1 Using rack 2.0.1 Using rack-test 0.6.3 Using actionpack 5.0.1 Using nio4r 1.2.1 Using websocket-extensions 0.1.2 Using websocket-driver 0.6.5 Using actioncable 5.0.1 Using globalid 0.3.7 Using activejob 5.0.1 Using mime-types-data 3.2016.0521 Using mime-types 3.1 Using mail 2.6.4 Using actionmailer 5.0.1 Using activemodel 5.0.1 Using arel 7.1.4 Using activerecord 5.0.1 Using public_suffix 2.0.5 Using addressable 2.5.0 Using execjs 2.7.0 Using autoprefixer-rails 6.7.2 Using sass 3.4.23 Using bootstrap-sass 3.3.7 Using bson 4.3.0 (was 4.2.1) Using bundler 1.16.0.pre.3 Using byebug 9.0.6 Using xpath 2.0.0 Using capybara 2.12.0 Using cliver 0.3.2 Using coderay 1.1.1 Using coffee-script-source 1.12.2 Using coffee-script 2.4.1 Using method_source 0.8.2 Using thor 0.19.4 Using railties 5.0.1 Using coffee-rails 4.2.1 Using css_parser 1.4.8 Using debug_inspector 0.0.2 Using diff-lcs 1.3 Using dotenv 2.2.0 Using dotenv-rails 2.2.0 Using factory_bot 4.8.2 Using factory_bot_rails 4.8.2 Using faker 1.7.3 Using ffi 1.9.17 Using font-awesome-rails 4.7.0.1 Using multi_json 1.12.1 Using jbuilder 2.6.1 Using jquery-rails 4.2.2 Using launchy 2.4.3 Using libv8 3.16.14.17 (x86_64-darwin-16) Using rb-fsevent 0.9.8 Using rb-inotify 0.9.8 Using listen 3.0.8 Using mongo 2.5.0 (was 2.4.1) Using mongoid 6.0.3 Using rspec-support 3.5.0 Using rspec-core 3.5.4 Using rspec-expectations 3.5.0 Using rspec-mocks 3.5.0 Using rspec 3.5.0 Using mongoid-rspec 1.10.0 Using poltergeist 1.13.0 Using slop 3.6.0 Using pry 0.10.4 Using pry-rails 0.3.4 Using puma 3.7.0 Using sprockets 3.7.1 Using sprockets-rails 3.2.0 Using rails 5.0.1 Using rails-i18n 5.0.3 Using ref 2.0.0 Using roadie 3.2.1 Using roadie-rails 1.1.1 Using rspec-collection_matchers 1.1.3 Using rspec-rails 3.5.2 Using tilt 2.0.6 Using sass-rails 5.0.6 Using simple_form 3.4.0 Using temple 0.7.7 Using slim 3.0.7 Using slim-rails 3.1.1 Using therubyracer 0.12.3 Using uglifier 3.0.4 Using valid_email 0.0.13 Using web-console 3.4.0 Bundler attempted to update mongoid but its version stayed the same Bundle updated!
After update my Ruby on Rails Project, testing fail because the database cannot be cleaned after testing. Rspec fails with the following error:
1) Survey::ChildrenSessionRatingScale should have "presence" validator on "relationship" Failure/Error: Mongoid.purge! Mongo::Error::NoServerAvailable: No server is available matching preference: #<Mongo::ServerSelector::Primary:0x70264958470380 tag_sets=[] max_staleness=nil> using server_selection_timeout=30 and local_threshold=0.015 # ./spec/spec_helper.rb:21:in `block (2 levels) in <top (required)>'
I rolled back all update and just updated mongoid. It does not update mongoid itself but the ruby driver mongo from 2.4.1 to 2.5. There must be some code changes that defunct Mongoid.purge! for some reasons.
ENV['RAILS_ENV'] ||= 'test' require File.expand_path('../../config/environment', __FILE__) require 'rspec/rails' require 'rails/mongoid' require 'mongoid-rspec' # ... # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration RSpec.configure do |config| config.include Mongoid::Matchers, type: :model config.before(:suite) do FactoryBot.reload end config.after(:each) do Mongoid.purge! end # ... end
I was not able to investigate this in depth right now but I hope someone sees the problem and can help me with a quick fix.
Greetings Markus
- is duplicated by
-
MONGOID-4513 Mongo::Error::NoServerAvailable: No server is available matching preference
- Closed