問題類似於Faye setup in production。無法在CloudControl上啓動Faye。 這裏是faye.ru
:
require 'faye'
faye_server = Faye::RackAdapter.new(:mount => '/faye', :timeout => 45)
Faye::WebSocket.load_adapter('thin')
run faye_server
這裏是Procfile
:
web: bundle exec thin start -R config.ru -e $RAILS_ENV -p $PORT
faye: bundle exec thin start -R faye.ru -p 9292
分期日誌:
11/21/14 12:27 PM Deploy ***** Deployed 09c2174cba4b14375779a5160ab7348a62a570b4 *****
11/21/14 12:27 PM Info Started GET "/" for 10.99.3.169 at 2014-11-21 10:27:02 +0000
11/21/14 12:27 PM Info Listening on 0.0.0.0:25143, CTRL+C to stop
11/21/14 12:27 PM Info Maximum connections set to 1024
11/21/14 12:27 PM Info Thin web server (v1.6.3 codename Protein Powder)
11/21/14 12:27 PM Deploy ***** Deployed 09c2174cba4b14375779a5160ab7348a62a570b4 *****
11/21/14 12:27 PM Info Started GET "/" for 10.94.134.23 at 2014-11-21 10:27:01 +0000
11/21/14 12:27 PM Info Listening on 0.0.0.0:12103, CTRL+C to stop
11/21/14 12:27 PM Info Maximum connections set to 1024
11/21/14 12:27 PM Info Thin web server (v1.6.3 codename Protein Powder)
而且myapp.cloudcontrolapp.com是好的,但我不能得到MYAPP .cloudcontrolapp.com:9292/faye.js
如果我用faye啓動rails server localy,我可以: 1. rails s 2. if Rails.env.development? Thread.new do system("rackup faye.ru -s thin -E production") end end
in initializer。 本地日誌:
Thin web server
Maximum connections set to 1024
Listening on 0.0.0.0:9292, CTRL+C to stop
Thin web server
Maximum connections set to 1024
Listening on 0.0.0.0:3000, CTRL+C to stop
與本地主機:9292/faye.js被確定爲localhost:3000是確定
有人能指出我如何開始王菲上cloudControl?謝謝。
謝謝。這應該有一些深刻的原因,但你的決定是完全可以接受的。 – 2014-11-24 09:16:52