就目前而言,我是一名Java和c#开发人员。我对Ruby on Rails看得越多,我就越想学习它。

你发现学习RoR的最佳途径是什么?在Windows上开发会更容易吗,还是应该在Linux上运行虚拟机?

是否有一种IDE可以与Visual Studio的健壮性相匹配?有什么程序可以给我们一个很好的开销吗?有什么好书吗?

说真的,任何建议/技巧/咆哮都很棒。


当前回答

Data Structures and Algorithms with Object-Oriented Design Patterns in Ruby Bruno R. Preiss | Published in 2004 Learn to Program Chris Pine | Pragmatic Bookshelf Published in 2006, 176 pages Mr. Neighborly's Humble Little Ruby Book Jeremy McAnally | Published in 2006, 147 pages Programming Ruby: A Pragmatic Programmer's Guide David Thomas, Andrew Hunt | Addison-Wesley Published in 2000, 608 pages Rails in a Nutshell C. Fauser, J. MacAulay, E. Ocampo-Gooding, J. Guenin | O'Reilly Media Published in 2009, 352 pages Ruby Best Practices Gregory T. Brown | O'Reilly Media Published in 2009, 328 pages Ruby Essentials | Techotopia Published in 2007 Ruby on Rails Security Heiko Webers | OWASP Published in 2009, 48 pages Ruby User's Guide Mark Slagell | Published in 2005 The Book Of Ruby Huw Collingbourne | Published in 2009, 425 pages The Little Book of Ruby Huw Collingbourne | Dark Neon Ltd. Published in 2008, 87 pages why's (poignant) guide to Ruby why the lucky stiff | Published in 2008

其他回答

My first suggestion would be to learn a little about symbols first. Rails isn't the smallest framework ever, and while there's definitely lots to learn, most of it will start to make sense if you have at least a little bit of understanding what makes it different ("special") from other languages. As pointed out, there's no exact analog in any of the major languages, but they're heavily used by Rails, in order to make things read straightforwardly and perform well, which is the reason I brought it up. My very first exposure to Rails was also my first time looking at Ruby (well before 2.0), and the first thing that caught my eye was the goofy :things they were passing around, and I asked, "WTF is that?"

另外,看看RubyQuiz,并在那个网站上阅读其他人的答案。

请注意,rails世界充斥着大量令人沮丧的过时且不一致的文档和示例。它可能是发展最快、最流行的开发社区之一。当你学到一些东西的时候,它已经改变了。甚至书中所讨论的rails版本也不一致。通过博客记录!足够的说。

我目前在windows上做RoR。我的建议是尽量避开窗户。很多东西都不起作用,rails社区真的真的不关心你。迁移到Git真的把我搞得一团糟,因为它在windows上不能很好地工作。很多宝石会因此而失败(Heroku看起来像一个很酷的工具-对我来说太糟糕了,它不能处理window的Git设置)。卡皮斯特拉诺出局了。这种情况继续下去,令人恼火。

Plus, in the back of your mind, you always wonder when something doesn't work "Is it a rails/windows problem?" I am not sure this is solved by using linux because linux brings its own hassles like constantly having to upgrade all those different dependencies, etc...If that's the kind of thing you enjoy it might be an okay choice for you. Those days of enjoying system fiddling are behind me and I just want to get on with doing my work. I am planning on installing ubuntu on a home machine just so i can get familiar with things like capistrano so maybe my opinion will change.

我强烈建议,如果你打算做rails开发,你应该认真考虑购买一台Mac。如果你珍惜你的时间和理智,它几乎会立即得到回报。你花了10个小时调试windows/linux安装问题,这取决于你如何评估你的时间,你花的钱和Mac电脑的钱一样多。

与它所取代的东西相比,Rails是一种乐趣,但它也有点痛苦,因为它的支持者跳过了许多无聊但重要的东西,如文档、兼容性问题和社区建设。它比Django等其他框架强大得多,但有时我在看Django的文档和社区时,会像一个有狂野性感女友的男人看着他朋友平凡但理智稳定的妻子一样叹息。但是后来rails添加了一个特性,我惊叹道:“哦,太棒了!”

在我看来,Rails的截图比Peepcode的截图要好。RubyPlus也有截图,注意,它们有点粗糙。BuildingWebApps有一个免费的在线课程,课程进行到一半就开始截屏。

我的步骤是:

* Agile development with Rails (book)
* Railscasts - very useful, always learn something new.
* And of course the RoR API

0)先学习ruby。这是非常重要的。Rails的一个巨大优势是Ruby:一种非常强大的语言,但也非常容易被误解。在线浏览一些Ruby教程。当在Daily WTF上遇到编码挑战时,用Ruby编写。你会学得很快的。

1)去买《Ruby for Rails》这本书

2)查看Rails教程并订阅“驾驭Rails”博客。

3)在本地建立应用程序。不要使用脚手架。

4)当你在你的应用中安装插件时,去看看插件中的代码(在你的供应商目录中)并学习它。这是学习Ruby和Rails内部知识的最好方法之一。当你不明白某件事是如何运作的,把它贴在这里,有1000人会帮助你。

至于你的其他问题:

是的,您需要在Linux环境中进行开发。您可以在Windows上开发Rails,但这并不意味着应该这样做。许多宝石在Windows上跟不上速度。

NetBeans作为一个IDE工作得很好。如果你用的是Mac电脑,你会因为使用Textmate而获得好评。