3

每次我启动 mailcatcher 时,都会显示“已初始化常量”警告。谁能建议如何解决这个问题?谢谢。下面更新。

/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::BASE
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::EXCEPTION_ALL
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::EXCEPTION_NaN
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::EXCEPTION_INFINITY
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::EXCEPTION_UNDERFLOW
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::EXCEPTION_OVERFLOW
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::EXCEPTION_ZERODIVIDE
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_MODE
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_UP
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_DOWN
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_HALF_UP
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_HALF_DOWN
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_CEILING
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_FLOOR
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_HALF_EVEN
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::SIGN_NaN
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::SIGN_POSITIVE_ZERO
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::SIGN_NEGATIVE_ZERO
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::SIGN_POSITIVE_FINITE
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::SIGN_NEGATIVE_FINITE
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::SIGN_POSITIVE_INFINITE
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::SIGN_NEGATIVE_INFINITE
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::INFINITY
/Users/james/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-13/2.1.0/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::NAN

更新:我有uninstalled gem bigdecimalinstalled gem bigdecimal,没有变化。然后我指定了gem 'bigdecimal', ~> 1.1,仍然没有变化。搜索此错误的地方不多。我正在运行 Ruby 2.1.5 和 Rails 4.2.1。

4

1 回答 1

2

bigdecimal gem 可能有问题。尝试在 Gemfile 中强制使用 v1.1:

gem 'bigdecimal', '~> 1.1'

这个答案

于 2015-05-26T23:45:50.773 回答