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

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

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

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


当前回答

试试这本书http://ruby.railstutorial.org/ruby-on-rails-tutorial-book

其他回答

阻力最小的路径:

Have a simple web project in mind. Go to rubyonrails.org and look at their "Blog in 15 minutes" screencast to get excited. Get a copy of O'Reilly Media's Learning Ruby Get a Mac or Linux box. (Fewer early Rails frustrations due to the fact that Rails is generally developed on these.) Get a copy of Agile Web Development with Rails. Get the version of Ruby and Rails described in that book. Run through that book's first section to get a feel for what it's like. Go to railscasts.com and view at the earliest videos for a closer look. Buy The Rails Way by Obie Fernandez to get a deeper understanding of Rails and what it's doing. Then upgrade to the newest production version of Rails, and view the latest railscasts.com videos.

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

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控制台”)检查数据,并在将代码片段嵌入模型或控制器之前试用它们。

在我的职业生涯中,我已经从c#转向了Ruby和RoR,在我的个人生活中,我发现linux对开发来说更有吸引力一些。特别是现在我已经开始使用git,在linux上的实现更加清晰。

目前我正在双启动,接近于全职运行Ubuntu。我在开发环境中使用gedit和各种插件。从2010年底开始,我开始推动使用Vim进行开发,甚至在OS X上使用Textmate。

大量的Rails开发人员正在使用mac,这实际上让我开始思考这个方向。

虽然我还没有尝试过,但是Ruby in Steel为您提供了一个Visual Studio世界中的Ruby IDE,如果您感兴趣的话,IronRuby是Ruby的. net版本。

就书籍而言,Pragmatic Programmers的《Programming Ruby》(也被称为Pickaxe)是学习Ruby的实际教材。我咬紧牙关,买了那本书和《Rails敏捷Web开发》;这两本书都很棒。

窥码截屏和PDF书籍也很适合入门;每次9美元的截屏费用很难出错。我其实买了五瓶装的。

还可以查看以下内容:

官方铁路指南 Railscasts railsapi.com或Ruby on Rails - APIdock 红宝石秀 面向僵尸的Rails Softies on Rails -面向。net开发者的Ruby on Rails Rails播客 Rails最佳实践

在过去的一个月里,我已经浏览了Rails和Rails Envy播客的积压,它们提供了许多主题的精彩见解,甚至是关于一般的软件开发。

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

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.

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