确定您不是在寻找 /faye 吗?而不是我在 Heroku 上的应用程序
这看起来应该是一个简单的问题。我正在尝试在 Heroku 上托管使用 Faye 的 Rails 3.1 应用程序,但我不断收到以下消息:
您确定不是在寻找 /faye 吗?
我知道这只是 faye 服务器对我的回应。但为什么它不启动我的应用程序,而是将我发送到此? (顺便说一下,我正在关注此应用程序的部分内容)
这是我的 faye.ru
require 'faye'
faye_server = Faye::RackAdapter.new(:mount => '/faye', :timeout => 45)
run faye_server
我还有一个 config.ru,它只是默认的 config.ru 文件。
This seems like it should be a simple problem. I'm trying to host my Rails 3.1 application that uses Faye on Heroku, but I keep getting this:
Sure you're not looking for /faye ?
I understand this is just the faye server responding to me. But why isn't it launching my application, and rather sending me to this? (I'm following parts of this application by the way)
Here's my faye.ru
require 'faye'
faye_server = Faye::RackAdapter.new(:mount => '/faye', :timeout => 45)
run faye_server
I also have a config.ru that's just the default config.ru file.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我很确定这是因为 Heroku 不允许我与 Rails 服务器同时运行 Faye 服务器。我认为唯一真正的解决方案是通过 Heroku 运行单独的 Web 进程,不幸的是,这会花费成本每月约35美元。
如果有人知道如何在每月不花 35 美元的情况下运行这两个进程,请告诉我。
I'm pretty sure this is due to Heroku not allowing me to run the Faye server at the same time as the Rails server. I think the only real solution to this is running a separate web process through Heroku, which unforunately, costs about $35 a month.
If anyone finds out how to run these two processes without shelling out the $35 dollars a month, please let me know.
为 faye 运行另一个 Heroku 项目, https://github.com/ntenisOT/Faye-Heroku -Cedar-RedisToGo
关于SO的其他问题:是否可以在 Heroku 上托管 FAYE?
好吧,您回答了您的问题自己的问题,Heroku 只允许每个 slug 一台服务器。使用免费的 redis 实例,您可能仍然会在 Heroku 上遇到问题。它限制为 5mb。还有pubnub代替pusher,http://www.pubnub.com/pricepubnub有帮助文档。还可以选择在微型实例上免费在 EC2 上运行您的应用程序一年(虽然速度很慢)
另一个很酷但更有效的选择是使用 Torquebox(jruby 应用程序服务器)。您必须找到不同的托管,但它具有内置消息传递。
Run another Heroku project for faye, https://github.com/ntenisOT/Faye-Heroku-Cedar-RedisToGo
Other question on SO: Is it possible to host FAYE, on Heroku?
Well you answered your own question, Heroku is only allowing one server per slug. You may still run into problems on Heroku with the free redis instance. It is limited to 5mb. There is also pubnub instead of pusher, http://www.pubnub.com/price Pubnub has help documentation. There is also the option to run your app on EC2 free for a year on a micro instance (slow though)
Another cool but more work option is to use Torquebox (jruby app server). You would have to find different hosting, but it has inbuilt messaging.