就目前而言,我是一名Java和c#开发人员。我对Ruby on Rails看得越多,我就越想学习它。
你发现学习RoR的最佳途径是什么?在Windows上开发会更容易吗,还是应该在Linux上运行虚拟机?
是否有一种IDE可以与Visual Studio的健壮性相匹配?有什么程序可以给我们一个很好的开销吗?有什么好书吗?
说真的,任何建议/技巧/咆哮都很棒。
就目前而言,我是一名Java和c#开发人员。我对Ruby on Rails看得越多,我就越想学习它。
你发现学习RoR的最佳途径是什么?在Windows上开发会更容易吗,还是应该在Linux上运行虚拟机?
是否有一种IDE可以与Visual Studio的健壮性相匹配?有什么程序可以给我们一个很好的开销吗?有什么好书吗?
说真的,任何建议/技巧/咆哮都很棒。
当前回答
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.
这门课有一本推荐教材。在这里……但是你可以在网上看讲座和视频。
其他回答
这里有很多好意见。我要加上这里没有的。我的经验:
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控制台”)检查数据,并在将代码片段嵌入模型或控制器之前试用它们。
我认为来自Peepcode的截屏和短书真的很好。他们有一些截图让你开始学习,当你更深入的时候也会有一些。
现在有一个关于NETTUTS的非常可靠的正在进行的系列,您可能会感兴趣。
我在Mac OS上使用RoR和textmate编程,这很棒。
我建议“Programming Ruby 1.9”(The Pickaxe Book) for Ruby and Agile Web Development with Rails”来学习Rails,两者都是由Pragmatic Bookshelf出版的。
好运!
Ruby: 我用过Learn to programming(在一个周末),Ruby Visual QuickStart(信不信由你) 书是“脱离困境”优秀)。这花了大约一周的时间。
Rails: 我刚刚在一个“积极”的星期里完成了Learn Rails。我觉得我已经掌握了所有的细节。这是我认为重要的2009年!
现在我计划将一本更高级的书与一个真实的项目结合起来。
IDE: VIM与rails插件是伟大的,如果你是一个VIM上瘾。否则,试试上面的建议。
当然,铁路广播等,是有用的大多数最新的东西。