如果使用旧版本的gem,为什么gem要求新版本更改?

时间:2018-04-15 23:46:48

标签: ruby-on-rails ruby elasticsearch graphviz

我对自己的处境感到有些困惑。 这些是我使用的弹性搜索宝石的版本:

source "https://rubygems.org"

ruby "2.3.1"

gem "pg"
gem "rails", "4.2.7.1"

gem "flamegraph"
gem "memory_profiler"
gem "rack-mini-profiler"
gem "stackprof"

# frontend stack: preprocessors, libraries, minifiers, assets
# plus view stack: helpers, builders, etc.
gem "active_link_to"
gem "autoprefixer-rails"
gem "coffee-rails"
gem "flag-icons-rails"
gem "foundation-icons-sass-rails"
gem "foundation-rails"
gem "inline_svg"
gem "jquery-rails", "4.0.4"
gem "jquery-ui-rails", "5.0.5"
gem "masonry-rails"
gem "metamagic"
gem "react-rails"
gem "remotipart"
gem "rinku"
gem "sass-rails"
gem "simple_form"
gem "skim"
gem "slim"
gem "therubyracer", platforms: :ruby
gem "truncate_html"
gem "uglifier"

source "https://rails-assets.org" do
  gem "rails-assets-autosize"
  gem "rails-assets-dropzone"
  gem "rails-assets-jquery-bar-rating"
  gem "rails-assets-jquery-cascading-dropdown"
  gem "rails-assets-jquery-placeholder"
  gem "rails-assets-jquery-ui"
  gem "rails-assets-lite-uploader"
  gem "rails-assets-lodash"
  gem "rails-assets-pnotify"
  gem "rails-assets-rangeslider.js"
  gem "rails-assets-sachinchoolur--lightGallery"
  gem "rails-assets-selectize"
  gem "rails-assets-timepicker"
end

# all other gems
gem "active_model_serializers"
gem "activeadmin", git: "https://github.com/activeadmin/activeadmin"
gem "addressable"
gem "breadcrumbs_on_rails"
gem "countries"
gem "decent_exposure"
gem "deep_merge", require: "deep_merge/rails_compat"
gem "devise"
gem "elasticsearch-model"
gem "elasticsearch-rails"
gem "friendly_id"
gem "interactor"
gem "kaminari"
gem "newrelic_rpm"
gem "oj"
gem "puma"
gem "rabl"
gem "rack-canonical-host"
gem "rack-cors"
gem "responders"
gem "rollbar"
gem "seedbank"
gem "validate_url"

# services
gem "activerecord-postgres-earthdistance"
gem "carrierwave"
gem "fog"
gem "fog-aws"
gem "mini_magick"
gem "pundit"
gem "sitemap_generator"

gem "omniauth"
gem "omniauth-facebook"
gem "omniauth-google-oauth2"

gem "pgbackups-archive"

group :data_migration do
  gem "chronic"
  gem "mysql"
end

group :staging, :production do
  gem "rails_12factor"
end

group :test do
  gem "capybara"
  gem "capybara-webkit"
  gem "codeclimate-test-reporter", require: false
  gem "database_cleaner"
  gem "email_spec"
  gem "formulaic"
  gem "launchy"
  gem "shoulda-matchers"
  gem "test_after_commit"
  gem "webmock", require: false
end

group :development, :test, :staging do
  gem "factory_girl_rails"
  gem "faker"
end

group :development, :test do
  gem "awesome_print"
  gem "brakeman", require: false
  gem "bundler-audit"
  gem "byebug"
  gem "dotenv-rails"
  gem "fuubar"
  gem "pry-rails"
  gem "rails_best_practices"
  gem "rspec-rails"
  gem "rubocop"
  gem "scss_lint", require: false
end

group :development do
  gem "bullet"
  gem "foreman"
  gem "letter_opener"
  gem "quiet_assets"
  gem "rails-erd"
  gem "slim-rails"
  gem "web-console"
end

但是rspec测试失败,失败消息是

  

在5.0中删除[string]类型并且自动升级失败,因为自动升级不支持参数[index_analyzer]。

为什么它要我使用升级后的语法,如果我还在使用旧版本,请告诉我有关5个版本的更改?

我知道可以通过升级来解决这个问题,但是,我认为尽管使用了旧版本的宝石,我的代码仍然需要升级,这很奇怪。

提前感谢您的任何想法!

这是我的Gemfile.lock:

gscSocial

和Gemfile:

  Date       totalReach
  2018-01-01       1069
  2018-01-02       3075
  2018-01-03       2674
  2018-01-04        876

0 个答案:

没有答案