相关疑难解决方法(0)

jekyll 2.2.0 | 错误:地址已在使用中 - bind(2)

我是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,但同样的问题仍然存在.

jekyll

14
推荐指数
3
解决办法
7915
查看次数

地址已在使用 - bind(2) 用于“0.0.0.0”端口 3000 (Errno::EADDRINUSE)

首先,我知道这里已经列出了这个错误,但问题是不同的。

我有一个 Rails 4 应用程序,我曾经在 Puma 上运行过。

然后,我的一个朋友开发了该应用程序,并建议我们改用 Foreman。

所以,我曾经rails s在终端中在本地运行该应用程序。

现在,我应该用foreman start.

问题是,几乎每次我尝试启动该应用程序时,都会出现以下错误:

foreman start
08:42:28 web.1  | started with pid 3398
08:42:28 web.1  | [3398] Puma starting in cluster mode...
08:42:28 web.1  | [3398] * Version 2.13.4 (ruby 2.2.1-p85), codename: A Midsummer Code's Dream
08:42:28 web.1  | [3398] * Min threads: 5, max threads: 5
08:42:28 web.1  | [3398] * Environment: development
08:42:28 web.1  | [3398] * Process workers: 2
08:42:28 web.1 …
Run Code Online (Sandbox Code Playgroud)

ruby-on-rails localhost foreman puma ruby-on-rails-4

4
推荐指数
2
解决办法
6669
查看次数