我正在使用 ruby 1.9.3 和 rvm。我想使用 --ssl 选项运行瘦服务器。我在一些答案中读到运行“thin start --ssl”应该可以解决问题。但是在我的开发环境中,当我运行 thin start --ssl 时,终端运行:
Using rack adapter
Thin web server (v1.5.1 codename Straight Razor)
Maximum connections set to 1024
Listening on 0.0.0.0:3000, CTRL+C to stop
And in my web-browser in localhost:3000:
No data received
Unable to load the webpage because the server sent no data.
Here are some suggestions:
Reload this webpage later.
Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.
当我使用“rails s thin”运行相同的命令时,它可以工作,但会显示不同的消息:
Booting Thin
Rails 3.2.11 application starting in development on http:// 0. 0. 0 .0 :3000
Call with -d to detach
Ctrl-C to shutdown server
我不知道为什么会发生这种情况(可能是因为 rvm),但 Thin 工作正常。我想运行第一个版本“thin start --ssl”,因为我无法在“rails s”命令中设置这个 ssl 选项。