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

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

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

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


当前回答

其他回答

请注意,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有一个免费的在线课程,课程进行到一半就开始截屏。

神奇的决定!在学习Rails之前,先了解Ruby是非常有用的,所以下面是我对学习Rails的最佳途径的看法:

Learn to Program by Chris Pine - You can read this in an afternoon to get a feel for the Ruby language. The Well Grounded Rubyist by David Black - Like the title says it will give you an excellent grounding in the language. Eloquent Ruby by Russ Olsen - This book is sublime, it reads like a novel. Ruby Best Practices by Gregory Brown - By this point you should be ready for the advanced level of this book. Rails for Zombies - Fun tutorial you can complete in an afternoon. Rails Tutorial by Michael Hartl - Fantastic (and free) tutorial and I have heard his accompanying screencasts are amazing. Agile Web Development with Rails by Sam Ruby - By the time you are finished this you are now a completely capable Rails person!

除了书本之外,最重要的是获得对你所做事情的反馈。要做到这一点,我建议花时间在irc.freenode.net #ruby和#rubyonrails。在stackoverflow上发布你正在做的事情或遇到的麻烦也是非常有用的,因为人们提供的评论、解释和不同的思考方式是非常宝贵的。

你也一定要看看Ruby Rogues播客,他们提供了宝贵的信息,评论员都是Ruby社区里非常受人尊敬的人。为了让你的观看和阅读乐趣(按此顺序),请前往瑞恩·贝茨的《Railscasts》和艾菲恩·贝德福德的《Asciicasts》。

最后,我建议在github上寻找不同的宝石,阅读代码,然后为它们做出贡献。你不必过于雄心勃勃,做大量的重新编码,尤其是在刚开始的时候。只要从一些小事情开始,比如编辑和使README文件更容易阅读。

我不使用IDE,但在Railsconf上我看到了Jetbrains的Rubymine演示,它看起来非常棒。

I have got up to speed with Ruby on Rails fairly quickly via this free online course which is currently being offered by UC Berkeley - Software as a Service - Engineering Long Lasting Software with instruction by Armando Fox and David Patterson. I can't speak highly enough of this course... it really was a privilege to learn Rails from these guys. And there is an active community on the course forums if you run into difficulty along the way. The first offering of the online course has now finished (as of 25 March, 2012) - the next time it will be run will be sometime in September of 2012.

It assumes you are a fairly competent developer and gets you started on ruby in the second week, then Rails runs from the third week up to the end of the course (five weeks). Your assignments are marked by an auto-grader. You get provided with a pre-built Ubuntu VM image with everything you need for development pre-installed on it (e.g. Ruby, Rails, Rake, Gems, RSPec, Cucumber, etc). All you have to do is start up the VM inside the (free) VirtualBox software which runs on MacOSX, Windows and Linux.

这门课有一本推荐教材。在这里……但是你可以在网上看讲座和视频。

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

我的建议是开始——选择一个你通常用来学习mvc风格语言的小项目(例如,一些数据库,可能是一些基本的工作流),然后当你需要学习一个概念时,使用其中的一个(或两个!)

使用Rails进行敏捷Web开发 或 铁路之路

了解它是如何工作的,然后尝试一下。

敏捷Web开发的问题在于它已经过时了,并且场景运行的时间太长,以至于您真的不想只构建一次;Rails方式可能很难遵循,因为它是从参考到学习的跳跃,但如果它是好的,它比敏捷Web开发要好。

但总的来说,它们都是好书,都有利于学习,但它们都没有提供你想要遵循的“教育”路径。所以我读了前者的几章(足以获得基本概念并学习如何引导第一个应用程序——也有一些在线文章可以帮助这一点),然后就开始了,然后每隔几天我就会阅读一些新的东西,或者我用书来理解一些东西。

还有一点:这两本书都是Rails方面的书籍,而不是Ruby方面的书籍,如果您打算编写干净的代码,那么尽早花一天时间学习Ruby语法是值得的。Why's Guide to Ruby是一本很好的书,还有其他的。