Rails服务器在命令行中工作。不在Localhost

时间:2018-06-12 19:32:36

标签: ruby-on-rails postgresql localhost

#include <string>
....
curl_easy_setopt(curl, CURLOPT_URL, "http://localhost/query.php");
std::string buf("q=");
buf += s;
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, buf.c_str());

=&GT;引导美洲狮

=&GT; Rails 5.2.0应用程序在开发中开始

=&GT;运行rails server 以获取更多启动选项

rails server -h

转到[44266] Puma starting in cluster mode... [44266] * Version 3.6.2 (ruby 2.5.1-p57), codename: Sleepy Sunday Serenity [44266] * Min threads: 5, max threads: 5 [44266] * Environment: development [44266] * Process workers: 1 [44266] * Preloading application [44266] * Listening on tcp://localhost:3000 [44266] Use Ctrl-C to stop [44266] - Worker 0 (pid: 44286) booted, phase: 0 ^C[44266] - Gracefully shutting down workers... [44266] === puma shutdown: 2018-06-12 14:28:53 -0500 === [44266] - Goodbye! Exiting

说忘了启动服务器

http://www.localhost3000.org/

3 个答案:

答案 0 :(得分:1)

看起来http://www.localhost3000.org/是一个网站,当您错误地尝试访问本地主机时,有人会帮助您。它不是您自己的服务器响应

如网站所示,请尝试改为http://localhost:3000

答案 1 :(得分:0)

使用此地址localhost:3000。您添加的链接是某人发布的实时网站,作为启动服务器的提醒。

答案 2 :(得分:0)

使用此地址http://localhost:3000,但您仍然可以修改您的网址,请按照以下文章进行操作:Edit localhost