2014-03-30 13 views
-2

我碰到這個中間人package並試圖用bundle exec middleman server運行它,但得到這個早在終端...運行'中間人'時出現這個錯誤是什麼意思?

The source :rubygems is deprecated because HTTP requests are insecure. Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not. 

== The Middleman is loading 
== Port 4567 is unavailable. Either close the instance of Middleman already running on 4567 or start this Middleman on a new port with: --port=4568 

提前感謝!

+1

要麼關閉Middleman的實例已經在4567上運行,或者在一個新的端口上啓動這個Middleman:--port = 4568 –

回答

7

我找到了答案在middleman forum ... 如果你這樣做:

lsof -i: <Port number>在這裏輸入你的端口號;在我的情況4567"

以上,將輸出PID#,然後如果你輸入的是,在下面

kill -9 <PID here>

你就可以重新啓動服務器。

2

第一個錯誤是關於您的Gemfile中的源聲明。

它可能說

source :rubygems

在頂部。此行更改爲

source "https://rubygems.org"

或使用http://rubygems.org如果你沒有安裝OpenSSL的根本。

第二個錯誤表示端口4567上已經有別的東西在運行,這是默認的中間人端口。也許你有另一箇中間人安裝運行。確保要麼關閉一個下降或顯式端口啓動中間人(即必須是免費的,以及課程),如:

bundle exec middleman --port 5000

如果cant'f找到運行中間人例如,嘗試搜索對於可能使用端口ps ax | grep ruby的紅寶石進程。這將爲您提供進程ID,然後您可以使用kill進程:kill <id>。希望有所幫助!

+0

謝謝,像一個魅力一樣工作! –