2012-02-03 39 views

回答

0

正常情況下:

rails server [mongrel, thin, etc] [options] 
-p, --port=port     Runs Rails on the specified port. 
           Default: 3000 
-b, --binding=ip     Binds Rails to the specified ip. 
           Default: 0.0.0.0 
-c, --config=file    Use custom rackup configuration file 
-d, --daemon      Make server run as a Daemon. 
-u, --debugger     Enable ruby-debugging for the server. 
-e, --environment=name   Specifies the environment to run this server under (test/development/production). 
           Default: development 
-P, --pid=pid     Specifies the PID file. 
           Default: tmp/pids/server.pid 

這裏-p或-P僅支持端口上的WEBrick服務器將運行。我不會寫它來支持代理設置。

1

您可以下載PAC文件並檢查代理服務器的地址。

例如,一個文件,其中包含:

function FindProxyForURL(url, host) { 
    return "PROXY pigsy:8080"; 
} 

會要求您輸入

gem install rails -p http://wolfbyte:[email protected]:8080 

對於更復雜的PAC文件,請使用ruby-pac