我正在尝试使用Puma Web服务器部署Rails应用程序.当尝试使用配置文件启动Puma服务器时,bundle exec puma -C config/puma.rb我收到一个错误,表明该地址已被使用.
有人知道如何解决这个问题吗?
bundle exec puma -C config/puma.rb
[23699] Puma starting in cluster mode...
[23699] * Version 2.11.3 (ruby 2.0.0-p353), codename: Intrepid Squirrel
[23699] * Min threads: 5, max threads: 5
[23699] * Environment: development
[23699] * Process workers: 2
[23699] * Preloading application
Jdbc-MySQL is only for use with JRuby
[23699] * Listening on tcp://0.0.0.0:3000
/.rvm/gems/ruby-2.0.0-p353/gems/puma-2.11.3/lib/puma/binder.rb:210:in `initialize': Address already in use - bind(2) (Errno::EADDRINUSE)
from /.rvm/gems/ruby-2.0.0-p353/gems/puma-2.11.3/lib/puma/binder.rb:210:in `new'
from /Users/lexi87/.rvm/gems/ruby-2.0.0-p353/gems/puma-2.11.3/lib/puma/binder.rb:210:in `add_tcp_listener'
from /.rvm/gems/ruby-2.0.0-p353/gems/puma-2.11.3/lib/puma/binder.rb:96:in `block …Run Code Online (Sandbox Code Playgroud) 我是Jekyll博客的新手,并试图在本地查看博客
http://localhost:4000
Run Code Online (Sandbox Code Playgroud)
但失败了.
? my-awesome-site > jekyll serve
Notice: for 10x faster LSI support, please install http://rb-gsl.rubyforge.org/
Configuration file: /home/Git/my-awesome-site/_config.yml
Source: /home/Git/my-awesome-site
Destination: /home/Git/my-awesome-site/_site
Generating...
done.
Configuration file: /home/Git/my-awesome-site/_config.yml
jekyll 2.2.0 | Error: Address already in use - bind(2)
Run Code Online (Sandbox Code Playgroud)
我试过了
$ lsof -wni tcp:3000
$ lsof -wni tcp:4000
Run Code Online (Sandbox Code Playgroud)
但他们两个都没有回报.
我的Ruby版本是:
? my-awesome-site > ruby --version
ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]
Run Code Online (Sandbox Code Playgroud)
接下来我该怎么办?我已经重新安装了jekyll,但同样的问题仍然存在.