简体   繁体   English

在我获得主宰工作之后,如何在轨道上设置带有红宝石的功能性聊天框布局?

[英]How do I set up a functional chat box layout with ruby on rails after I have gotten juggernaut to work?

I just finished implementing juggernaut. 我刚刚完成了剑圣的实施。 I ran both the redis server and juggernaut and they work fine. 我运行了redis服务器和juggernaut,它们工作正常。 I have tested out the local host using irb and texts do appear. 我已经使用irb测试了本地主机并且显示了文本。

I've basically followed the steps on github: https://github.com/maccman/juggernaut 我基本上遵循了github上的步骤: https//github.com/maccman/juggernaut

But now I would like to build the view with ruby on rails and actually be able to use/test the chat room like an actual chat room on any given website instead of writing messages through irb. 但是现在我想在轨道上用ruby构建视图,并且实际上能够像任何给定网站上的实际聊天室一样使用/测试聊天室,而不是通过irb编写消息。

Should I use scaffolding to build the layout/view? 我应该使用脚手架来构建布局/视图吗? Thanks! 谢谢!

I wish I could post up my screenshots but I don't have a high enough reputation. 我希望我可以发布我的截图,但我没有足够高的声誉。

Railscast #260 deals with a similar topic however Ryan chose to use Faye as the messaging server. Railscast#260处理类似的主题,但Ryan选择使用Faye作为消息服务器。 However it should be easy for you to adapt to the example chat application he builds. 但是,您应该很容易适应他构建的示例聊天应用程序。

There is a link to the project source on GitHub here and a text version of the screencast here. 这里有一个指向GitHub上项目源的链接和一个截屏文本版本

Scaffolding may be useful to you here however it may be difficult to stick strictly to the REST conventions, I would attempt to use Rails for the creation of messages and then use Juggernaut to update the messages client side after creation. 脚手架可能对你有用,但是可能很难严格遵守REST约定,我会尝试使用Rails创建消息,然后使用Juggernaut在创建后更新消息客户端。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Rails的Ruby(2.2)中,我如何弹出确认框,然后重定向到另一页 - In Ruby (2.2) on Rails How Do I Have A Confirmation Box Pop Up Then Redirect To Another Page 如何在Ruby On Rails中设置:through ActiveRecord关联? - How do I set up a :through ActiveRecord association in Ruby On Rails? Ruby on Rails 4.0.4:如何设置环境变量? - Ruby on Rails 4.0.4: How do I set up the Environment Variables? 我想用Rails建一个聊天室,我应该使用juggernaut 2还是抽筋? - I want to build a chat room using Rails, should I use juggernaut 2 or cramp? 我应该使用node.js + express还是Rails + Juggernaut建立聊天室? - Should I use node.js + express or Rails + Juggernaut to build a chat room? 如何在rails中设置路由? - How do I set up a route in rails? Ruby on Rails 2.3.8:如何设置我的单元测试,以便在出现错误时,我可以打印当前范围内的所有变量? - Ruby on Rails 2.3.8: How do I set up my unit tests such that when there is an error, I can have all the variables in the current scope printed? 如何在Ruby on Rails上将布局链接到视图页面 - how do I link a layout to a view page on Ruby on Rails 如何在导轨中设置RPush? - how do I set up RPush in rails? 如何测试我在rails中正确设置了多对多关系? - How do I test that I have set up a many to many relationship correctly in rails?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM