【发布时间】:2012-01-07 04:03:28
【问题描述】:
我无法让 Juggernaut/Socket.IO 在 Windows 上运行,所以我尝试让它在 Linux 上运行。我不太了解Linux(或Rails)。我无法让 Socket.io/Juggernaut 在我的 Rails 服务器上工作。它在 OS X 上运行良好(所以我知道它在运行)。
安装完所有东西后,我执行以下操作:
/rails/app/path/rails s
redis-server
juggernaut # output is: info - socket.io started
所以我猜这行得通。现在,当我运行一个使用 Juggernaut 的窗口时,我在 Chrome Javascript 控制台中收到以下错误:
XMLHttpRequest cannot load http://localhost:8080/socket.io/xhr-polling//1322359666443. Origin http://localhost:3000 is not allowed by Access-Control-Allow-Origin.
Resource interpreted as Script but transferred with MIME type text/plain.
Uncaught SyntaxError: Unexpected identifier
软件信息:
- Ubuntu 11.10
- Ruby 1.9.2
- Rails 3.1.1
- NodeJS 0.4.9
- NPM 0.2.19
- Socket.IO v?.? (我今天刚刚运行 npm install socket.io)
- 剑圣诉?.? (我今天刚刚运行 npm install juggernaut)
- 在 Firefox 和 Chrome 中测试
【问题讨论】:
标签: ruby-on-rails ubuntu socket.io juggernaut