在服务器正常使用控制台上的rails s
启动后,Ruby on rails无法连接到localhost。
情况就是这样:
这是我尝试过的:
$ ruby -v
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin15]
rails -v
Rails 4.2.1
$ telnet localhost 3000
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host
--------------------
rails s
的输出是:
Booting Thin
Rails 4.2.1 application starting in development on localhost:3000
Run rails server -h for more startup options
Ctrl-C to shutdown server
我该如何解决这个问题?