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

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

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

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


当前回答

神奇的决定!在学习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演示,它看起来非常棒。

其他回答

Railscasts shmailcasts… 1. 想想你想要开发的应用类型。 2. 花20分钟整理一些用户流程 3.带着你的项目去阅读“使用Rails进行敏捷Web开发”的前几章 4. 在windows或mac电脑上安装Netbeans和rails。两者都是一样的。 5. 开发你的应用 6. 在开发过程中,请查阅大量在线参考资料。

我的公司已经开发了三年的知识管理和决策支持平台mavenlive.com。在过去的几年里,我们学到了很多关于rails的知识,下面是我的一些建议。

Switch to Mac! The tools that are available to you and the development environment on Mac allows you to be far more productive than on Windows. railcasts.com has a wealth of informative screencasts from beginner to expert. You can always find new and more efficient ways of doing things from Ryan's posts. Scaling Rails screencasts coupled with NewRelic has provided powerful insight into the performance of our application and allows us to develop effectively while keeping our eyes open for future scalability issues.

我写了一篇名为“Rails入门——我希望知道的事情”的文章,许多人认为这篇文章很有帮助。

基础知识:

使用Rails进行敏捷开发(书籍) 用于Windows上快速ruby/rails环境的InstantRails Aptana作为IDE 用于版本控制的Subversion

在线教程很不错,但很分散。为了更全面的理解,你可以花30美元买一本书。

这里有很多好意见。我要加上这里没有的。我的经验:

Rails on Windows is easy to get going with RailsInstaller, especially if you're using SQLite. If you want to use Ruby gems which need C extensions (e.g. RMagick), installation is difficult and unpredictable. PostgreSQL is a pain to install on Windows, and a pain to hook up to Rails. git doesn't work quite right on Windows. IDEs are bulky (Aptana). Notepad++ is good enough. Rails on Ubuntu is easy, and gems requiring C libraries just work. If your computer is powerful enough, use VirtualBox or VMWare Player, and use an Ubuntu Virtual Machine.

设置资源

本页面展示了如何在Ubuntu 11.10上安装Ruby/Rails/PostgreSQL。 如果你不喜欢RVM(我不喜欢),使用rbenv。RVM和rbenv是用于管理多个Ruby版本的工具,包括JRuby、Rubinius等。

用于开发/测试的实时部署

实时部署可以让你的朋友试用你的应用。它也可以让你更容易与需要回调到Rails服务器的web服务交互(如PayPal IPN或Twilio)。 Heroku.com是我最喜欢部署的地方。 localtunnel.com是一个很好的实用工具,可以将一个公开可见的URL指向本地Rails服务器。(我只在基于windows的Rails服务器上使用它)。

学习

试试网上的教程。 使用stackoverflow.com来提问。 使用“raise Exception, params”。to_s”在你的控制器中停止应用程序,打印出驱动你的控制器的所有参数。这让我对如何在Rails应用程序中来回传输数据有了最深刻的了解。 使用Rails控制台(“Rails控制台”)检查数据,并在将代码片段嵌入模型或控制器之前试用它们。

我在Mac OS上使用RoR和textmate编程,这很棒。

我建议“Programming Ruby 1.9”(The Pickaxe Book) for Ruby and Agile Web Development with Rails”来学习Rails,两者都是由Pragmatic Bookshelf出版的。

好运!