我已经安装了gem mailcatcher。当我想运行mailcatcher时,我收到以下错误消息:
$ mailcatcher
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::BASE
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of BASE was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::EXCEPTION_ALL
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of EXCEPTION_ALL was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::EXCEPTION_NaN
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of EXCEPTION_NaN was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::EXCEPTION_INFINITY
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of EXCEPTION_INFINITY was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::EXCEPTION_UNDERFLOW
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of EXCEPTION_UNDERFLOW was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::EXCEPTION_OVERFLOW
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of EXCEPTION_OVERFLOW was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::EXCEPTION_ZERODIVIDE
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of EXCEPTION_ZERODIVIDE was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_MODE
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of ROUND_MODE was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_UP
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of ROUND_UP was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_DOWN
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of ROUND_DOWN was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_HALF_UP
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of ROUND_HALF_UP was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_HALF_DOWN
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of ROUND_HALF_DOWN was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_CEILING
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of ROUND_CEILING was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_FLOOR
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of ROUND_FLOOR was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::ROUND_HALF_EVEN
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of ROUND_HALF_EVEN was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::SIGN_NaN
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of SIGN_NaN was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::SIGN_POSITIVE_ZERO
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of SIGN_POSITIVE_ZERO was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::SIGN_NEGATIVE_ZERO
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of SIGN_NEGATIVE_ZERO was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::SIGN_POSITIVE_FINITE
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of SIGN_POSITIVE_FINITE was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::SIGN_NEGATIVE_FINITE
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of SIGN_NEGATIVE_FINITE was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::SIGN_POSITIVE_INFINITE
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of SIGN_POSITIVE_INFINITE was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::SIGN_NEGATIVE_INFINITE
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of SIGN_NEGATIVE_INFINITE was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::INFINITY
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of INFINITY was here
/Users/romenigld/.rvm/gems/ruby-2.2.3@global/extensions/x86_64-darwin-14/2.2.0-static/bigdecimal-1.2.7/bigdecimal.bundle: warning: already initialized constant BigDecimal::NAN
/Users/romenigld/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121: warning: previous definition of NAN was here
Starting MailCatcher
~~> ERROR: Something's using port 1025. Are you already running MailCatcher?
然后当我尝试使用http://localhost:1080/
向我展示app mailcatcher时。
但是我需要做什么才能使应用程序不再显示此错误?
答案 0 :(得分:2)
似乎在该端口上运行了一些东西。它可以是mailcatcher的另一个实例,或者其他一些进程。
在大多数* nix系统上,您可以使用以下命令搜索占用特定端口的进程:
lsof -i :PORT
例如:
lsof -i :1025
结果将包含PID(进程ID)。你可以用这个来杀死违规的过程。
kill -9 SOME_PID
示例:
kill -9 32487