红宝石开发环境 [英] ruby development environment

查看:88
本文介绍了红宝石开发环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在a)Windows b)linux或c)mac中在rails上开发ruby更好吗?为什么?

is it better to develop ruby on rails in a) windows b) linux or c) mac. why ?

编辑过:

我问这的原因是,我听说在轨道上开发红宝石与在Mac的Rails上使用ruby相比,Windows中的稳定性不佳。 (不确定是否正确)。

the reason why i am asking this is that i heard that developing ruby on rails in windows is not as stable/good compared when you used ruby on rails in mac. (not sure though if that is true or not).

加上David Heinemeier Hansson(Ruby on Rails的创建者)似乎正在使用Mac,因此给人的第一印象是

plus the fact that David Heinemeier Hansson (creator of Ruby on Rails) seems to be using Mac, so initial impressions seems to be Ruby on Rails applications and Mac goes well together.

推荐答案

我强烈建议您不要在Windows上进行开发。为什么?首先,每次升级Windows都会破坏很多东西,大多数gem或插件创建者都不使用Windows,因此他们不关心Windows也不在其上运行测试(有几个大名声持平的人说窗户不是他们的问题,这是你的问题。您会发现* nix与Windows的问题一次又一次地咬您。路径名斜杠,ssh实现中的细微差别,控制台和字体问题,rubygems,capistrano等...

I strongly advise you don't develop on Windows. Why? First, there are a lot of things that break on Windows with every upgrade and the majority of gem or plugin creators don't use windows so they don't care about windows and don't run tests on it(there are several big name people who have flat out said that windows is NOT their problem it's yours). You'll find the *nix vs Windows problems will bite you in the ass again and again. Pathnames slashes, minor differences in ssh implementations, console and font problems, rubygems, capistrano, etc...

一段时间后最终会发生的事情是,您将始终每次您必须调试说这仅在Windows上才是问题吗?的东西时,这种声音就会浮现在脑海中。而且声音很小,这对您来说是一种代价。每天消耗掉部分电池。

What will end up happening after a while is that you will always have this voice in the back of your head every time you have to debug something saying "Is this a problem only on Windows?" and that little voice is a cost to you..using up some of your battery every single day.

Mac的前期费用(不幸的是我没有)更昂贵,而Linux平台花费一两天的时间来获取更昂贵的费用无线工作,但这些都是前期的一次性成本。使用Windows进行Rails开发的不安全感是持续的成本。至少在社区开始拒绝不是真正跨平台的东西之前。

Macs are more expensive in terms of upfront dollars (which sadly I don't have) and linux platforms are more expensive terms of spending a day or two trying to get your wireless to work but those are upfront one time costs. The nagging insecurity of using Windows for Rails development is an ongoing cost. At least until the community starts rejecting things that are not truly cross platform.

以黄瓜为例。由于某种原因,测试框架取决于Windows中不可用的特定控制台配置。因此,要在Windows中使用它,您必须在控制台中更改字体并在控制台中更改代码页。否则,字母 a将从所有输出中消失。为什么?因为它适用于* nix系统,并且可以为您提供漂亮的色彩(即使您忽略Windows,我认为这也是一个巨大的缺陷,而且设计选择也非常差)。

As an example look at cucumber. For some reason a test framework is dependent on a particular console configuration not available in windows. So to use it in Windows you have to change the font in your console and change the code page in your console. Otherwise the letter "a" disappears from all the output. Why? Because it works fine for *nix systems and gives you pretty colours (I think this is a huge flaw and very very poor design choice even if you ignore windows).

您每次您提起窗户问题时,都会感觉就像那个在电梯里放屁的家伙。

You'll also feel like the guy who farted in the elevator every time you bring up a windows issue.

我之所以这么说,是因为有些人目前必须在其开发平台上使用Windows。嘿,那是什么味道?

I say all this as some who has to use windows for his development platform at the moment. Hey, what's that smell?

[后期编辑:Ruby在Windows上也慢了大约3倍。这会影响您始终进行测试的意愿,并会损害TDD反馈周期]

[late edit: Ruby is also about 3 times slower on windows. This will impact your willingness run your tests all the time and hurt your TDD feedback cycle]

这篇关于红宝石开发环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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