使用Rails部署时,localhost:3000链接显示空白页 [英] localhost:3000 links showing a blank page when deployed with Rails

查看:228
本文介绍了使用Rails部署时,localhost:3000链接显示空白页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以前一直在使用Rails应用程序,服务器工作正常. 我关闭它并制作了一个新的 https://bitbucket.org/ScarletMcLearn/sample_app

I've been working on a rails app previously, the server worked fine. I closed it and made a new one https://bitbucket.org/ScarletMcLearn/sample_app

现在启动服务器时, http://localhost:3000

and now when I started the server, the http://localhost:3000, http://localhost:3000/static_pages/home, and anything else remains blank.

我已经尝试使用Google搜索并阅读了一些Stackoverflow上的其他帖子,但是这些帖子对我没有帮助.我正在使用Mac-如果有帮助.

I've tried Googling and reading some other Stackoverflow posts, but they aren't working for me. I'm using a Mac - if it helps.

真的希望您能在这里为我提供帮助,因为我是Rails的新手,因此感谢您提供简单的说明.所有文件都在Bitbucket链接中.

Really hope you can help me out here, I'm new in Rails, hence simple instructions appreciated. All files are in the Bitbucket link.

感谢您的阅读. :D

Thanks for the read. :D

部署Rails服务器之后:

After deploying rails server:

Macs-MacBook-Pro:sample_app mac $ rails服务器 =>引导彪马 => Rails 5.0.0.1应用程序在 http://localhost:3000 上开始开发 =>运行rails server -h获得更多启动选项Puma以单模式启动... *版本3.4.0(红宝石2.3.0-p0),代号:Owl Bowl Brawl *最小线程数:5,最大线程数:5 *环境:发展 *在tcp://localhost:3000上监听使用Ctrl-C停止

Macs-MacBook-Pro:sample_app mac$ rails server => Booting Puma => Rails 5.0.0.1 application starting in development on http://localhost:3000 => Run rails server -h for more startup options Puma starting in single mode... * Version 3.4.0 (ruby 2.3.0-p0), codename: Owl Bowl Brawl * Min threads: 5, max threads: 5 * Environment: development * Listening on tcp://localhost:3000 Use Ctrl-C to stop

推荐答案

已经在本地主机上运行了以前的服务器:3000

There is already a previous server running on localhost:3000

在您的应用中,转到:

tmp/pids/server.pid

tmp/pids/server.pid

删除该文件中的数字并保存.

Delete the number inside that file and save it.

现在退出您的Rails服务器 并运行rails server -p 4000(除3000以外的任何值).

Now quit your rails server And run rails server -p 4000(anything else than 3000).

并转到该新地址 https://localhost:4000 .

OR

重新启动计算机(您不想走这种邪恶的道路).

这篇关于使用Rails部署时,localhost:3000链接显示空白页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆