在多台笔记本电脑上运行相同的Rails代码,并将数据从所有笔记本电脑保存到同一数据库 [英] Running the same Rails code on multiple laptops and saving the data from all of them to the same Database

查看:89
本文介绍了在多台笔记本电脑上运行相同的Rails代码,并将数据从所有笔记本电脑保存到同一数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在localhost:3000的多台笔记本电脑上运行相同的rails代码。如何保存从不同笔记本电脑提交的数据以保存在单个数据库中。或者,他们将共享同一个数据库,并且如果有人提交了数据,它将自动在其他人的便携式计算机上。另外请考虑不会有任何互联网连接,但是我们可以使用以太网电缆将它们连接。另外,我们正在使用sqllite3。谢谢!!!主机而不是配置中的 localhost。
但是,您可以将sqlite数据库放在ftp / sftp / webdav服务器中,安装为本地文件夹(在Windows上有点复杂),然后尝试使用它,这确实会很慢。


I am trying to run the same rails code on multiple laptops on localhost:3000. How can I save the data submitted from the different laptops to save in a single database. Or, they would share the same database and if someone has submitted data, it would automatically be on the other persons laptop. Also consider that there won't be any internet connection, but we can connect them with Ethernet cables. Also, we are using sqllite3 . Thanks!

解决方案

Probably you would like to use mysql in that case - it is designed to work this way, you just specify remote host instead of 'localhost' in config. However, you can put sqlite database in ftp/sftp/webdav server, mount as local folder (kinda complicated on windows tho), and try to use it, which will work REALLY slow.

这篇关于在多台笔记本电脑上运行相同的Rails代码,并将数据从所有笔记本电脑保存到同一数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆