2016-12-01 83 views
0

我收到以下錯誤,當我運行RAILS_ENV=production bundle exec rails ssocket.rb:206:在'綁定':地址已在使用 - 綁定(2)127.0.0.1:3000(錯誤:: EADDRINUSE)

'綁定':地址已在使用 -

我已經嘗試了一些其他職位的綁定(2)127.0.0.1:3000(錯誤:: EADDRINUSE),從那裏我發現下面的命令rails s -p 3001這適用於localhost:3001,但是當我推送到heroku時,出現以下錯誤,當我去我的網址。我猜這可能是我的database.yml文件的問題,因爲它給了我一些問題。

很抱歉,但發生了問題。

導軌-v的Rails 4.2.1
紅寶石-v紅寶石2.2.0p0(2014年12月25日修訂版49005)[x86_64的-darwin15]

的database.yml

default: &default 
 
    adapter: postgresql 
 
    encoding: unicode 
 
    # For details on connection pooling, see rails configuration guide 
 
    # http://guides.rubyonrails.org/configuring.html#database-pooling 
 
    pool: 5 
 

 
development: 
 
    <<: *default 
 
    database: vlog_development 
 

 

 
test: 
 
    <<: *default 
 
    database: vlog_test 
 

 

 
production: 
 
    <<: *default 
 
    database: vlog_production 
 
    username: 
 
    password:

+1

你在heroku上得到同樣的錯誤嗎? ''bind':已經在使用的地址 - bind(2)' – Emu

+0

不,在Heroku中,當我輸入一些數據到一個表單域然後按回車我得到的錯誤是抱歉,但出了問題。 –

+0

https://gentle-fjord-81780.herokuapp.com/apps/texty在這裏試試看,你會看到 –

回答

0
This is because of your default 3000 port is busy.Use command "ps" on terminal 


    PID TTY   TIME CMD 
    4662 pts/5 00:00:00 bash 
    4975 pts/5 00:00:03 ruby 
    4982 pts/5 00:00:00 ps 

Then kill process by command on terminal sudo kill -9 PID. Then start your server again. 
+0

當我運行'''ps'''我得到了不同的東西 –

+0

'''PID TTY TIME CMD 15269 ttys001 0:00.04 /Applications/iTerm.app/Contents/MacOS/iTerm2 --server 15272 ttys001 0:00 。07 -bash''' –

+0

你能否提供完整的錯誤 –

相關問題