Cloud9 Rails API挑战:允许网络但仍无法呈现控制台 [英] Cloud9 Rails API challenge: allowed network but still cannot render console

查看:104
本文介绍了Cloud9 Rails API挑战:允许网络但仍无法呈现控制台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在与此树屋构建Rails API课程一起关注.我正在使用与问题有关的Cloud9 IDE.我坚持的步骤是通过控制台中的API创建新列表.

I am following along with this Treehouse Build a Rails API course. I am using Cloud9 IDE which I think is related to the problem. The step I am stuck on is creating a new list via the API in the console.

起初,我从网络上收到一条错误消息,提示无法渲染控制台".对此进行搜索之后,我将网络列入了development.rb文件的白名单.错误消息有所不同,因此我相信我已将其正确列入白名单(或至少做了一些事情).但这并没有达到预期的效果,并且错误消息似乎与自己矛盾.

At first I was receiving an error message saying "cannot render console" from the network. After googling this, I whitelisted the network in the development.rb file. The error message is different and so I believe I properly whitelisted it (or at least did something). But it does not have the desired effect and the error message seems to contradict itself.

在2015-09-14 14:53:33 +0000开始为123.456.78.999开机自检"/api/lists"!无法从123.456.78.999渲染控制台!允许的网络:123.456.78.999、127.0.0.0/127.123.123.123,:: 1

我更改了数字,因为我不了解安全性.关键(对我来说,这是个谜)是它说我无法从明显允许的网络(即123.456.78.999 === 123.456.78.999)中渲染控制台.

I've changed the numbers because I am not savvy about security. The point (and to me, the mystery) is that it says I can't render the console from a network that is apparently allowed (i.e., 123.456.78.999 === 123.456.78.999).

对于可能存在问题的任何建议,我将不胜感激.在完成本步骤之前,我不会对本教程进行任何操作.我输入的命令产生了与视频相同的结果.

I would appreciate any advice on what could be the problem. I had no trouble following along with the tutorial until this step; the commands I entered led to the same result as in the videos.

这是我输入的最新命令:

This is the most recent command I've entered:

curl -i -H接受:application/json" -H内容类型:application/json" -X POST -d'{"title":标题将在此处"} https://myapp-me.c9.io/api/lists

到目前为止,输入URL代替"localhost"已经为我工作了,但这也可能与问题有关.

Entering that URL instead of "localhost" has worked for me thus far but it could also be related to the problem.

感谢您提供任何线索,并乐意在需要时发布其他代码.

Thank you for any clues and happy to post additional code if needed.

推荐答案

请添加 config/enviroments/development.rb

config.web_console.whitelisted_ips =   '0.0.0.0/0.0.0.0'

这篇关于Cloud9 Rails API挑战:允许网络但仍无法呈现控制台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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