尝试在生产环境中运行我的Rails应用程序时会发生此错误,但不是dev:
实例方法“open”已在Object中定义,请使用通用帮助器或设置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'
答案 0 :(得分:2)
这只是一个由state-machines gem引起的警告信息。
这将在Spree 3.0.8中修复。很抱歉给您带来不便!