[英]How to run a rails application in another computer while still coding in my own computer?
I have an iMac and when develop in Ruby on Rails I run everything on it: MySQL server, Redis service, ElasticSearch service, guard, and, of course, the proper rails server
. 我有一台iMac,在Ruby on Rails上进行开发时,我会在其上运行所有内容:MySQL服务器,Redis服务,ElasticSearch服务,Guard,当然还有适当的
rails server
。 By doing so, my computer runs pretty slow. 这样,我的计算机运行非常慢。
So I just bought a CPU and install linux in it, along with MySQL, Redis & ElasticSearch. 因此,我刚刚购买了一个CPU并在其中安装了Linux,以及MySQL,Redis和ElasticSearch。 Now I connect to that services from my iMac and it runs way faster.
现在,我从iMac连接到该服务,并且运行速度更快。
However, Rspec/Guard still takes ages to load/run. 但是,Rspec / Guard仍然需要一段时间才能加载/运行。 So, how do I make the linux server to take the hit and actually run this programs while I keep editing the code in my mac?
因此,当我继续在Mac中编辑代码时,如何使linux服务器获得成功并实际运行该程序?
I know it may be a crude way and i haven't tested it 我知道这可能是一种粗略的方式,但我尚未对其进行测试
Place your project in Dropbox folder on your machine and have it open on the second computer 将项目放在计算机上的Dropbox文件夹中,并在第二台计算机上将其打开
Run it on the quick machine. 在快速计算机上运行它。 You can use following command to access it through ip address on the computers in same network
您可以使用以下命令通过同一网络中的计算机上的IP地址访问它
rails server -b 192.168.1.12 -p 8000 rails服务器-b 192.168.1.12 -p 8000
When saving code it should sync from one machine to another, may have slight delay for syncing 保存代码时,它应该从一台计算机同步到另一台计算机,可能会略有延迟
or set up Vagrant. 或设置流浪汉。
Thats the only ways I can see. 那就是我能看到的唯一方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.