Spree Rails 应用程序启动错误 'Instance method "open" is already defined in Object'

Spree Rails app startup error 'Instance method "open" is already defined in Object'

在生产环境中尝试 运行 我的 Rails 应用程序而不是开发时会发生此错误:

Instance method "open" is already defined in Object, use generic helper instead or set StateMachines::Machine.ignore_method_conflicts = true.

我是 Rails 的新手,需要一些帮助来解决这个问题。可能导致错误的原因是什么?我应该在哪里查看,或者我应该尝试采取哪些步骤来缩小发生的范围?

我最近从 Ruby 2.2.2 升级到 2.2.4,但是这个错误并没有立即出现。最近对该应用程序的其他更改仅限于 js、css 和 ERB 视图文件。

我的 Gemfile:

source 'https://rubygems.org'

ruby '2.2.4'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.3' #TODO settle on a non-edge Rails once enum prefixing is released
#gem 'rails', github: 'rails/rails'
# Use sqlite3 as the database for Active Record
#gem 'sqlite3'
# 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/sstephenson/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'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Unicorn as the app server
gem 'unicorn'

# 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'

  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'
end

gem 'rails_12factor', group: :production

# group :development do
#   gem 'rails-dev-boost', :git => 'git://github.com/thedarkone/rails-dev-boost.git' #speed up development
#   gem 'rb-inotify', '>= 0.8.8'
# end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
#gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gem 'spree', branch: '3-0-stable'
gem 'spree_gateway', github: 'spree/spree_gateway', branch: '3-0-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '3-0-stable'

gem 'pg'
gem 'spree_i18n', git: 'git://github.com/spree/spree_i18n.git', branch: '3-0-stable'

gem 'spree_yadav_jewelry', :path => 'extensions/spree_yadav_jewelry'
gem 'spree_yadav_diamonds', :path => 'extensions/spree_yadav_diamonds'

gem 'has_scope'
gem 'aws-sdk-v1'
gem 'spree_static_content', github: 'spree-contrib/spree_static_content', branch: '3-0-stable'
gem 'spree_contact_us', github: 'spree-contrib/spree_contact_us', branch: '3-0-stable'
gem 'font-awesome-sass'

这只是一条由状态机引起的警告消息 gem。

这将在 Spree 3.0.8 中修复。抱歉给您带来不便!