在 Windows 上的 VM Vagrant Box 中创建 Ruby on Rails 环境 [英] Creating a Ruby on Rails environment on Windows, in a VM Vagrant Box

查看:40
本文介绍了在 Windows 上的 VM Vagrant Box 中创建 Ruby on Rails 环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Vagrant 是在 Windows 中创建 Rails 环境的好解决方案吗?

我有一个强大的 Windows 8 64 位桌面.我最近用 RoR 做了一个项目并爱上了它.正如我发现的那样,在 Windows 上安装 RoR 简直是无稽之谈;所以我创建了一个双引导到 ubuntu.作为一名创意开发者,我发现在 ubuntu 中完成任何创意"都相当困难,因为我缺乏典型的创意工具.

I have a powerful Windows 8 64bit desktop. I recently did a project with RoR and fell in love with it. As I found out, installing RoR on windows is just bleh; so I created a dual boot to ubuntu. As a creative developer, I find it rather difficult to get any of the "creative" done in ubuntu because of the lack of my typical creative tools.

我读了一些关于名为 Vagrant 的工具;但是,我仍然不确定它是否满足我的要求:adobe suite、sublime text、git、rails、rails 友好的操作系统(mac?/ubuntu)

I read a bit about a tool called Vagrant; however, I'm still unsure if it meets my requirements: adobe suite, sublime text, git, rails, rails friendly OS(mac?/ubuntu)

典型职责:在 photoshop(windows) 中编辑图像,将其拖放到 VM 中的项目资产?典型职责:推/拉到 git;ssh 到 VPS 服务器?

Typical duties: edit an image in photoshop(windows), drop it to project assets in VM? Typical duties: push/pull to git; ssh to VPS server?

另外,我听说您可以在 VM 中安装 mac os,您认为这是一个不错的选择吗?(因为我想尝试他们的新操作系统)

Also, I hear you can install mac os in the VM do you think thats a good option? (because I want to try their new OS)

推荐答案

在 Vagrant 中安装 osx 可能是可能的,但它可能会非常困难,而且它并不是 Vagrant 的真正设计目的.

Installing osx in Vagrant is probably possible but it would likely be quite hard, and its not really what vagrant is designed for.

至于你的其他问题,vagrant 听起来很合适.

As for your other questions vagrant sounds like the perfect fit.

使用 Vagrant,你可以启动一个 ubuntu 虚拟机并开始你的 Rails 设置.然后,您可以将本地计算机上的端口转发到 vm 并加载 rails 站点,就像它在 Windows PC 上本地运行一样.一个快速的谷歌得到这个看起来可能对你有用的流浪盒子 - https://github.com/amaia/rails-starter-box

With Vagrant you could start up an ubuntu vm and get your rails setup going. Then you could just forward a port on your local machine to the vm and load the rails site as if it were running locally on your windows PC. A quick google gets this vagrant box that looks like it might work for you - https://github.com/amaia/rails-starter-box

要使用该站点,您只需在 vm 和本地计算机之间共享一个文件夹,这将允许您使用 Windows 应用程序(Photoshop、sublime)编辑图像和代码,因此您实际上不需要将这些安装在ubuntu 虚拟机,几乎可以正常工作.

To work with the site you can just share a folder between the vm and your local machine which will allow you to edit images and code with your windows apps (Photoshop, sublime) so you don't actually need to install these in the ubuntu vm at all, and can pretty much work as normal.

Git 大同小异……我更喜欢通过 SSH 进入 vagrant box 并在 ubuntu 的命令行上使用 git,但您也可以在 repo 文件夹中的 windows 中轻松使用 gitbash 或 tortoisegit ……嗯.

Git is much the same... I prefer to SSH into the vagrant box and use git on the command line in ubuntu but you can just as easily use gitbash or tortoisegit from windows in the repo folder... works just as well.

这篇关于在 Windows 上的 VM Vagrant Box 中创建 Ruby on Rails 环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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