简体   繁体   English

如何在仍在我自己的计算机中进行编码的同时在另一台计算机上运行Rails应用程序?

[英]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 我知道这可能是一种粗略的方式,但我尚未对其进行测试

  1. Place your project in Dropbox folder on your machine and have it open on the second computer 将项目放在计算机上的Dropbox文件夹中,并在第二台计算机上将其打开

  2. 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

  3. 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.

相关问题 Python - 如何获取在我的计算机上运行的服务 - Python - how to get the services that run on my computer 如何在另一台安装了qt(linux)的计算机上运行qt程序? - how to run qt program in another computer that has qt installed (linux)? 如何独立于当前计算机使用SSH远程运行程序 - How to remotely run a program with SSH independent of my current computer 在远程计算机上运行脚本时,如何在计算机上发出“哔哔声”? - How to emit a “beep” on my computer while running a script on a remote machine? 如何将我的本地Docker映像导出到tar和另一台计算机上的负载 - How to export my local docker image to a tar and the load on another computer 使用我自己的python脚本向我的计算机进行身份验证 - Using my own python script to authenticate into my computer 如何通过Python在计算机终端中运行命令 - How to Run a Command in the Computer Terminal Through Python 如何搜索我电脑中的所有隐藏文件? - How to search for all the hidden files in my computer? 每当设备插入我的计算机时如何自动运行“sudo modprobe -r ftdi_sio” - How to automatically run 'sudo modprobe -r ftdi_sio' whenever the device is plugged into my computer 尝试运行从另一台计算机复制的程序时,权限被拒绝 - Permission denied when trying to run program copied from another computer
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM