Search 代理背后的Twitter小部件

Search 代理背后的Twitter小部件,search,twitter,proxy,widget,Search,Twitter,Proxy,Widget,我试图在一个站点中使用Twitter小部件,该站点的服务器位于我的公司内部,因此位于其代理的后面 我无法直接使用他们提供的代码,因为我无法访问源地址 <script charset="utf-8" src="http://widgets.twimg.com/j/2/widget.js"></script> 我想知道我是否可以制作js的本地副本,以避免这个问题,但是,当我这样做时,我得到: ActionView::WrongEncodingError in Home#

我试图在一个站点中使用Twitter小部件,该站点的服务器位于我的公司内部,因此位于其代理的后面

我无法直接使用他们提供的代码,因为我无法访问源地址

<script charset="utf-8" src="http://widgets.twimg.com/j/2/widget.js"></script>

我想知道我是否可以制作js的本地副本,以避免这个问题,但是,当我这样做时,我得到:

ActionView::WrongEncodingError in Home#index
Your template was not saved as valid UTF-8. Please either specify UTF-8 as the encoding     for your template in your text editor, or mark the template with its encoding by inserting the following as the first line of the template:

# encoding: <name of correct encoding>.
ActionView::主索引中的错误编码错误#
您的模板未保存为有效的UTF-8。请在文本编辑器中指定UTF-8作为模板的编码,或通过插入以下内容作为模板的第一行来标记模板及其编码:
#编码:。
但是编码已经设置好了

我对这东西真的很不熟悉。
请提供帮助。

您得到的错误是因为ruby需要显式编码来正确解析非拉丁-1文件

在每个具有utf-8字符的ruby文件中,您需要第一行,如示例所示:

# encoding: UTF-8
至于你问题中的主要问题,你可以尝试一下,但与twitter的交流可能会受阻。 您应该与系统管理员联系,尝试为您的应用访问twitter