Ruby on rails Rails 3.1在Ubuntu11.10上使用Socket.io/Juggernaut
我无法在Windows上运行Juggernaut/Socket.IO,所以我尝试在Linux上运行它。我对Linux(或Rails)了解不多。我无法让Socket.io/Juggernaut在Rails服务器上工作。它在OSX上工作正常(所以我知道它工作正常) 安装完所有内容后,我将执行以下操作:Ruby on rails Rails 3.1在Ubuntu11.10上使用Socket.io/Juggernaut,ruby-on-rails,ubuntu,socket.io,juggernaut,Ruby On Rails,Ubuntu,Socket.io,Juggernaut,我无法在Windows上运行Juggernaut/Socket.IO,所以我尝试在Linux上运行它。我对Linux(或Rails)了解不多。我无法让Socket.io/Juggernaut在Rails服务器上工作。它在OSX上工作正常(所以我知道它工作正常) 安装完所有内容后,我将执行以下操作: /rails/app/path/rails s redis-server juggernaut # output is: info - socket.io started 所以我猜这是可行的。现在
/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
- 轨道3.1.1
- nodejs0.4.9
- 净现值0.2.19
- 插座.输入输出电压?。?(我今天刚刚运行了npm install socket.io)
- 神像五号?。?(我今天刚刚运行了npm安装juggernaut)
- 在Firefox和Chrome中测试