你有一个在Windows下运行的Rails开发环境,你很满意吗?

时间:2021-09-22 23:30:29

My current Rails development environment is Aptana + RadRails plugin on Windows XP and it's a little slow running tests, rake, and generators.

我目前的Rails开发环境是Windows XP上的Aptana + RadRails插件,运行测试,rake和生成器有点慢。

If you've evolved and proven your Windows Ruby on Rails development environment into something you're happy with and is fast, please share the details below.

如果您已经将Windows Ruby on Rails开发环境发展并证明您感到满意且速度很快,请分享以下详细信息。

Many thanks,

Eliot

8 个解决方案

#1


To add on to Omar: instead of dealing with VMWare, you could install Portable Ubuntu, which runs inside Windows. Though you will get a performance hit from doing so, it will give you a Linux environment to work in and you won't have to worry about installing another operating system.

要添加到Omar:您可以安装在Windows内部运行的Portable Ubuntu,而不是处理VMWare。虽然这样做会受到性能影响,但它会为您提供一个Linux环境,您不必担心安装其他操作系统。

#3


Although I work primarily with Ubuntu now, I was using a windows machine with Vim on it. Vim has a plugin called rails.vim. It understands the rails structure very well. These the things I found very useful.

虽然我现在主要使用Ubuntu,但我正在使用带有Vim的Windows机器。 Vim有一个名为rails.vim的插件。它非常了解导轨结构。这些我觉得非常有用的东西。

  1. Navigation between model, controller, unit test, functional test within 3-4 keystrokes using :RModel, RUnittest, :RFunctionaltest, RController.
  2. 使用以下命令在模型,控制器,单元测试,3-4次击键功能测试之间导航:RModel,RUnittest,:RFunctionaltest,RController。

  3. Ability to run a unit/functional/integration test right away using :Rake
  4. 能够使用以下方式立即运行单元/功能/集成测试:Rake

  5. A quick jump to console using :RConsole
  6. 使用以下命令快速跳转到控制台:RConsole

  7. A quick jump to helpers using :RHelper
  8. 使用:RHelper快速跳转到助手

  9. the goto file 'gf' shortcut now behaves in a predictable manner. It even looks up files inside gems you have installed.
  10. goto文件'gf'快捷方式现在以可预测的方式运行。它甚至可以查找已安装的gem中的文件。

The video on the site hardly does any justice to it. If you are not a vim user, then I would suggest E text editor. It is not free but worth every penny you pay.

该网站上的视频几乎没有任何正义。如果您不是vim用户,那么我建议使用E文本编辑器。它不是免费的,但值得你付出的每一分钱。

#4


I am led to believe that Rails (well, Ruby, really) on Windows is generally slow, compared to *n[iu]x, but since I haven't experienced the latter, I remain blissfully ignorant. In particular, there's a lag while the Rails environment loads that is tedious even on a fairly fast (3GHz Xeon) box.

我被引导相信,与* n [iu] x相比,Windows上的Rails(嗯,Ruby,真的)通常很慢,但由于我没有经历过后者,所以我仍然无知。特别是,即使在速度相当快(3GHz Xeon)的盒子上,Rails环境加载也会出现延迟。

On top of that, there's the overhead that an IDE brings. Of the more recent, I've tried NetBeans and RubyMine. Both are very capable and a little slow, compared to my normal working environment of command line and test editor, which pretty much suffice 95% of the time: I find I don't need much IDE support when I'm developing test-first. I still find myself mostly using SciTE, largely because of the "Run" command being easily accessible. With a little tweak to the "require test_helper" line in my tests, a single test execution is no more than a F5 away, and the whole suite available from the command line with a quick "rake".

最重要的是,IDE带来了开销。最近,我尝试过NetBeans和RubyMine。与命令行和测试编辑器的正常工作环境相比,两者都非常强大且有点慢,这在95%的时间内都足够了:我发现在开发测试时我不需要太多的IDE支持。我仍然发现自己大多使用SciTE,很大程度上是因为“Run”命令很容易访问。在我的测试中稍微调整一下“require test_helper”行,单个测试执行不超过F5,整个套件可以从命令行快速“rake”获得。

If I need to debug into the framework to clear up (usually) some misunderstanding on my part, then I currently lean towards NetBeans, where the debugger seems a little more intuitive. I suspect RubyMine may have more power, but I haven't found myself needing it yet.

如果我需要调试到框架来清理(通常)我的一些误解,那么我目前倾向于NetBeans,其中调试器似乎更直观一些。我怀疑RubyMine可能有更强大的功能,但我还没发现自己需要它。

Irrespective of all the above though, the key to performance on Windows is the time to execute `environment.rb' and that's not an easy nut to crack. (Here's hoping I'm totally wrong and I've missed something super-cool, btw.)

不管上述情况如何,Windows上的性能关键是执行`environment.rb'的时间,这不是一个容易破解的问题。 (这里希望我完全错了,我错过了一些非常酷的东西,顺便说一下。)

#5


I would seriously consider against Rails development inside Windows and my reasoning behind it is because you won't be using a Windows machine in production.

我会认真考虑反对Windows内部的Rails开发,我的理由是因为你不会在生产中使用Windows机器。

You will most likely be running some sort of Linux machine because Passenger wont work on Windows, mongrel_cluster (last time I checked) also doesn't run on Windows and IIS is a nightmare. Trust me, consistency between development and production is a huge bonus.

你很可能会运行某种Linux机器,因为Passenger不能在Windows上工作,mongrel_cluster(我上次检查)也不能在Windows上运行,IIS也是一场噩梦。相信我,开发和生产之间的一致性是一个巨大的好处。

If you must run Windows, then I would recommend running Rails inside a Virtual Machine with a Linux distribution of your choice. That way you could use something like e-texteditor (which comes highly recommended as a great alternative to Textmate) and have a Samba share to a git/svn repository on your Virtual Machine.

如果您必须运行Windows,那么我建议您在具有您选择的Linux发行版的虚拟机中运行Rails。这样你可以使用像e-texteditor这样的东西(强烈推荐它作为Textmate的一个很好的替代品),并将Samba共享给你的虚拟机上的git / svn存储库。

Check VMWare Server out and install CentOS / Ubuntu. It's free and will give you an insight into development in Linux which is ultimately where you want to be at.

检查VMWare服务器并安装CentOS / Ubuntu。它是免费的,可以让您深入了解Linux的开发,这最终是您想要的目标。

#6


I'd recommend jruby for windows.

我推荐jruby for windows。

#7


Ruby in Steel isn't bad if you want to use Visual Studio.

如果你想使用Visual Studio,Ruby in Steel也不错。

It's got it's issues, but it's not as "slow" as the eclipse variants I've tried. RadRails so far has the most complete code completion I've seen, as it knows about your models and such far more than Ruby in Steel. Even if it's slow to load the data for it, at least it's there.

它有它的问题,但它并不像我试过的日食变种那么“慢”。到目前为止,RadRails拥有我见过的最完整的代码完成,因为它知道你的模型,而且远远超过Ruby in Steel。即使加载数据的速度很慢,至少它就在那里。

#8


If there are not immutable reasons that you are using Windows XP, you should just switch to Linux. There are none of the weird compatibility issues that arise on Windows. If your application will eventually be deployed to a linux machine, it's easier to develop on. Plus, it would solve your performance issues.

如果您使用Windows XP没有不可改变的原因,则应该切换到Linux。 Windows上没有出现任何奇怪的兼容性问题。如果您的应用程序最终将部署到Linux机器上,那么开发起来会更容易。此外,它还可以解决您的性能问题。

https://help.ubuntu.com/community/RubyOnRails

If there are constrains that make Windows absolutely necessary, please revise and specify.

如果存在使Windows绝对必要的约束,请修改并指定。

#1


To add on to Omar: instead of dealing with VMWare, you could install Portable Ubuntu, which runs inside Windows. Though you will get a performance hit from doing so, it will give you a Linux environment to work in and you won't have to worry about installing another operating system.

要添加到Omar:您可以安装在Windows内部运行的Portable Ubuntu,而不是处理VMWare。虽然这样做会受到性能影响,但它会为您提供一个Linux环境,您不必担心安装其他操作系统。

#2


#3


Although I work primarily with Ubuntu now, I was using a windows machine with Vim on it. Vim has a plugin called rails.vim. It understands the rails structure very well. These the things I found very useful.

虽然我现在主要使用Ubuntu,但我正在使用带有Vim的Windows机器。 Vim有一个名为rails.vim的插件。它非常了解导轨结构。这些我觉得非常有用的东西。

  1. Navigation between model, controller, unit test, functional test within 3-4 keystrokes using :RModel, RUnittest, :RFunctionaltest, RController.
  2. 使用以下命令在模型,控制器,单元测试,3-4次击键功能测试之间导航:RModel,RUnittest,:RFunctionaltest,RController。

  3. Ability to run a unit/functional/integration test right away using :Rake
  4. 能够使用以下方式立即运行单元/功能/集成测试:Rake

  5. A quick jump to console using :RConsole
  6. 使用以下命令快速跳转到控制台:RConsole

  7. A quick jump to helpers using :RHelper
  8. 使用:RHelper快速跳转到助手

  9. the goto file 'gf' shortcut now behaves in a predictable manner. It even looks up files inside gems you have installed.
  10. goto文件'gf'快捷方式现在以可预测的方式运行。它甚至可以查找已安装的gem中的文件。

The video on the site hardly does any justice to it. If you are not a vim user, then I would suggest E text editor. It is not free but worth every penny you pay.

该网站上的视频几乎没有任何正义。如果您不是vim用户,那么我建议使用E文本编辑器。它不是免费的,但值得你付出的每一分钱。

#4


I am led to believe that Rails (well, Ruby, really) on Windows is generally slow, compared to *n[iu]x, but since I haven't experienced the latter, I remain blissfully ignorant. In particular, there's a lag while the Rails environment loads that is tedious even on a fairly fast (3GHz Xeon) box.

我被引导相信,与* n [iu] x相比,Windows上的Rails(嗯,Ruby,真的)通常很慢,但由于我没有经历过后者,所以我仍然无知。特别是,即使在速度相当快(3GHz Xeon)的盒子上,Rails环境加载也会出现延迟。

On top of that, there's the overhead that an IDE brings. Of the more recent, I've tried NetBeans and RubyMine. Both are very capable and a little slow, compared to my normal working environment of command line and test editor, which pretty much suffice 95% of the time: I find I don't need much IDE support when I'm developing test-first. I still find myself mostly using SciTE, largely because of the "Run" command being easily accessible. With a little tweak to the "require test_helper" line in my tests, a single test execution is no more than a F5 away, and the whole suite available from the command line with a quick "rake".

最重要的是,IDE带来了开销。最近,我尝试过NetBeans和RubyMine。与命令行和测试编辑器的正常工作环境相比,两者都非常强大且有点慢,这在95%的时间内都足够了:我发现在开发测试时我不需要太多的IDE支持。我仍然发现自己大多使用SciTE,很大程度上是因为“Run”命令很容易访问。在我的测试中稍微调整一下“require test_helper”行,单个测试执行不超过F5,整个套件可以从命令行快速“rake”获得。

If I need to debug into the framework to clear up (usually) some misunderstanding on my part, then I currently lean towards NetBeans, where the debugger seems a little more intuitive. I suspect RubyMine may have more power, but I haven't found myself needing it yet.

如果我需要调试到框架来清理(通常)我的一些误解,那么我目前倾向于NetBeans,其中调试器似乎更直观一些。我怀疑RubyMine可能有更强大的功能,但我还没发现自己需要它。

Irrespective of all the above though, the key to performance on Windows is the time to execute `environment.rb' and that's not an easy nut to crack. (Here's hoping I'm totally wrong and I've missed something super-cool, btw.)

不管上述情况如何,Windows上的性能关键是执行`environment.rb'的时间,这不是一个容易破解的问题。 (这里希望我完全错了,我错过了一些非常酷的东西,顺便说一下。)

#5


I would seriously consider against Rails development inside Windows and my reasoning behind it is because you won't be using a Windows machine in production.

我会认真考虑反对Windows内部的Rails开发,我的理由是因为你不会在生产中使用Windows机器。

You will most likely be running some sort of Linux machine because Passenger wont work on Windows, mongrel_cluster (last time I checked) also doesn't run on Windows and IIS is a nightmare. Trust me, consistency between development and production is a huge bonus.

你很可能会运行某种Linux机器,因为Passenger不能在Windows上工作,mongrel_cluster(我上次检查)也不能在Windows上运行,IIS也是一场噩梦。相信我,开发和生产之间的一致性是一个巨大的好处。

If you must run Windows, then I would recommend running Rails inside a Virtual Machine with a Linux distribution of your choice. That way you could use something like e-texteditor (which comes highly recommended as a great alternative to Textmate) and have a Samba share to a git/svn repository on your Virtual Machine.

如果您必须运行Windows,那么我建议您在具有您选择的Linux发行版的虚拟机中运行Rails。这样你可以使用像e-texteditor这样的东西(强烈推荐它作为Textmate的一个很好的替代品),并将Samba共享给你的虚拟机上的git / svn存储库。

Check VMWare Server out and install CentOS / Ubuntu. It's free and will give you an insight into development in Linux which is ultimately where you want to be at.

检查VMWare服务器并安装CentOS / Ubuntu。它是免费的,可以让您深入了解Linux的开发,这最终是您想要的目标。

#6


I'd recommend jruby for windows.

我推荐jruby for windows。

#7


Ruby in Steel isn't bad if you want to use Visual Studio.

如果你想使用Visual Studio,Ruby in Steel也不错。

It's got it's issues, but it's not as "slow" as the eclipse variants I've tried. RadRails so far has the most complete code completion I've seen, as it knows about your models and such far more than Ruby in Steel. Even if it's slow to load the data for it, at least it's there.

它有它的问题,但它并不像我试过的日食变种那么“慢”。到目前为止,RadRails拥有我见过的最完整的代码完成,因为它知道你的模型,而且远远超过Ruby in Steel。即使加载数据的速度很慢,至少它就在那里。

#8


If there are not immutable reasons that you are using Windows XP, you should just switch to Linux. There are none of the weird compatibility issues that arise on Windows. If your application will eventually be deployed to a linux machine, it's easier to develop on. Plus, it would solve your performance issues.

如果您使用Windows XP没有不可改变的原因,则应该切换到Linux。 Windows上没有出现任何奇怪的兼容性问题。如果您的应用程序最终将部署到Linux机器上,那么开发起来会更容易。此外,它还可以解决您的性能问题。

https://help.ubuntu.com/community/RubyOnRails

If there are constrains that make Windows absolutely necessary, please revise and specify.

如果存在使Windows绝对必要的约束,请修改并指定。