使用Windows Vista的Ruby On Rails - 最佳设置? [英] Ruby On Rails with Windows Vista - Best Setup?

查看:125
本文介绍了使用Windows Vista的Ruby On Rails - 最佳设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您认为在Win Vista环境中RoR的最佳设置是什么?我已经尝试过radrails eclipse插件,它对我来说似乎太笨重了,我也开始只使用Textpad和命令行,但我习惯于使用一些IDE。

What do you think is the best set-up for RoR in a Win Vista environment? I've tried the radrails eclipse plug-in, and it just seemed too bulky for me, I've also started to just use Textpad and the command line, but I'm used to having somewhat of an IDE to work with.

推荐答案

我不知道最好,因为这是一个主观问题,但我可以告诉你我使用的设置和建议:

I don't know about "best", because that's a subjective question, but I can tell you what setup I use and recommend:

编辑电子文字编辑器

TextMate似乎是Mac上Rails的首选编辑器。 E Text Editor本质上是TextMate for Windows。它的捆绑包与TextMate广泛兼容,包括基本安装中包含的Rails 2包。

Editor: E Text Editor
TextMate seems to be the editor of choice for Rails on Mac. E Text Editor is essentially TextMate for Windows. Its bundles are broadly compatible with TextMate's including the Rails 2 bundle which is included with the basic install.

或者,如果你进入整个Visual Studio生态系统,那么< a href =http://www.rubyinside.com/ruby-in-steel-pe-free-visual-studio-based-ruby-and-rails-ide-for-windows-1228.html\"rel =noreferrer > Ruby in Steel PE 可能是更好的选择。这是一个非常好的一体化软件包,现在实际上附带了(精简版)Visual Studio。

Alternatively, if you're into the whole Visual Studio ecosystem, then Ruby in Steel PE might be a better bet. It's a really nice all-in-one package that actually comes with (a stripped-down version of) Visual Studio now.

环境:运行Ubuntu服务器的 VirtualBox

部署Rails应用程序可能会在最好的时候出现问题;将Windows环境中的Rails应用程序部署到* nix服务器上的情况更糟。此外,在Windows上运行Rails应用程序很慢。运行测试很慢。因此,我使用VirtualBox在我的Windows机器上托管VM,尽可能地反映我的目标部署环境。在我的情况下,我运行Ubuntu Server,因为有一套非常好的分步教程,用于在 SliceHost wiki

Environment: VirtualBox running Ubuntu Server
Deploying a Rails app can be a pain at the best of times; deploying a Rails app from a Windows environment onto a *nix server is even worse. Plus, running Rails apps on Windows is slow. Running your tests is slow. So I use VirtualBox to host a VM on my Windows machine that mirrors my target deployment environment as closely as possible. In my case I run Ubuntu Server because there are a really nice set of step-by-step tutorials for getting up-and-running with a full Ubuntu-based Rails stack on the SliceHost wiki.

以下是使用VM开发的好处:

Here are the benefits of developing using a VM:


  • 我映射了网络驱动器到VM,以便我可以使用E文本编辑器直接从Windows编辑代码。 VM的行为和感觉就像命令行窗口一样。所以你不觉得自己处在一个完全陌生的环境中。

  • 它运行Rails和其他Ruby脚本(比如测试)比在Windows中原生运行它更快

  • 一切都被包含在内,快照,所以我可以试验并一般玩,而不用担心破坏任何东西。如果有什么东西坏了,我只是回到以前的好状态。

  • 它几乎不使用任何RAM。它通常使用少于100MB(它目前使用~43MB,但我没有使用Rails应用程序启动)。相比之下,例如,Firefox通常会占用200MB以上,你会发现运行这样一个基于Linux的虚拟机效率非常高。

  • 我可以在机器之间移动我的环境

  • 我有更强大的部署工作流程

  • 我可以将VM限制为与我将托管的服务器具有完全相同的RAM量。例如,如果我要使用SliceHost 256MB切片,我会将RAM限制为256MB。

  • 我可以为不同的主机构建一个单独的环境。例如,如果我想在Joyent上托管,我可以构建一个Open Solaris VM

  • Gems和其他二进制文件不需要为目标环境重新编译

  • 掌握Rails应用程序可能正在运行的环境是一件好事。看到大多数(如果不是全部)商业Rails主机运行某种* nix衍生产品,你会想要对* nix环境感到满意。

  • I map a network drive to the VM so that I can edit the code on it directly from Windows using E Text Editor. The VM acts and feels just like a command line window. So you don't feel like you're in a completely alien environment.
  • It runs Rails and other Ruby scripts (like tests) faster than running it natively in Windows
  • Everything is contained and snapshottable, so I can experiment and generally play around without worrying about breaking anything. If something does break, I just roll back to a previous good state.
  • It uses hardly any RAM. It will typically use less that 100MB (it's currently using ~43MB, but I don't have a Rails app spun-up). Contrast this with, say, Firefox which will typically be hogging >200MB and you realize that running a Linux-based VM like this is amazingly efficient.
  • I can move my environment between machines
  • I have much more robust deployment workflow
  • I can limit the VM to have exactly the same amount of RAM as the server I'll be hosting on. E.g., if I'm to be using a SliceHost 256MB slice, I would limit the RAM to 256MB.
  • I can build a seperate environment for different hosts. If I wanted to host on Joyent, for example, I could build an Open Solaris VM
  • Gems and other binaries won't need recompiling for your target environment
  • It's "a good thing"™ to get to grips with the environment your Rails app is likely to be running on. Seeing as most, if not all, commercial Rails hosts run some sort of *nix derivative, you're going to want to be comfortable with the *nix environment.

这篇关于使用Windows Vista的Ruby On Rails - 最佳设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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