学习 Ruby on Rails
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/55574/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Learning Ruby on Rails
提问by Ethan Gunderson
As it stands now, I'm a Java and C# developer. The more and more I look at Ruby on Rails, the more I really want to learn it.
就目前而言,我是一名 Java 和 C# 开发人员。我对 Ruby on Rails 研究得越多,我就越想学习它。
What have you found to be the best route to learn RoR? Would it be easier to develop on Windows, or should I just run a virtual machine with Linux?
您发现什么是学习 RoR 的最佳途径?在 Windows 上开发会更容易,还是应该只在 Linux 上运行虚拟机?
Is there an IDE that can match the robustness of Visual Studio? Any programs to develop that give a good overhead of what to do? Any good books?
是否有可以与 Visual Studio 的健壮性相匹配的 IDE?任何要开发的程序都可以很好地管理要做什么?有什么好书吗?
Seriously, any tips/tricks/rants would be awesome.
说真的,任何提示/技巧/咆哮都会很棒。
采纳答案by Jason Navarrete
I've been moving from C# in my professional career to looking at Ruby and RoR in my personal life, and I've found linux to be slightly more appealing personally for development. Particularly now that I've started using git, the implementation is cleaner on linux.
在我的职业生涯中,我一直从 C# 转向在我的个人生活中研究 Ruby 和 RoR,并且我发现 linux 对个人开发更具吸引力。特别是现在我已经开始使用 git,在 linux 上的实现更加清晰。
Currently I'm dual booting and getting closer to running Ubuntu full time. I'm using gedit with various plugins for the development environment. And as of late 2010, I'm making the push to use Vim for development, even over Textmate on OS X.
目前我正在双启动并且越来越接近全职运行 Ubuntu。我在开发环境中使用带有各种插件的 gedit。到 2010 年底,我正在推动使用 Vim 进行开发,甚至通过 OS X 上的 Textmate。
A large amount of the Rails developers are using (gasp) Macs, which has actually got me thinking in that direction.
大量 Rails 开发人员正在使用(喘气)Mac,这实际上让我想到了这个方向。
Although I haven't tried it, Ruby in Steelgives you a Ruby IDE inside the Visual Studio world, and IronRubyis the .NET flavor of Ruby, if you're interested.
虽然我没有尝试过,但Ruby in Steel为您提供了 Visual Studio 世界中的 Ruby IDE ,如果您有兴趣,IronRuby是 .NET 风格的 Ruby。
As far as books are concerned, the Programming Ruby(also known as the Pickaxe) book from the Pragmatic Programmers is the de-facto for learning Ruby. I bit the bullet and purchased that book and Agile Web Development with Rails; both books have been excellent.
就书籍而言,Pragmatic Programmers的Programming Ruby(也称为 Pickaxe)一书是学习 Ruby 的事实。我硬着头皮买了那本书和《使用 Rails 进行敏捷 Web 开发》;这两本书都很棒。
Peepcodescreencasts and PDF books have also been great for getting started; at $9 per screencast it's hard to go wrong. I actually bought a 5-pack.
Peepcode截屏视频和 PDF 书籍也非常适合入门;每个截屏视频 9 美元,很难出错。我实际上买了一个5包。
Also check out the following:
另请查看以下内容:
- Official Rails Guides
- Railscasts
- railsapi.comor Ruby on Rails - APIdock
- The Ruby Show
- Rails for Zombies
- Softies on Rails- Ruby on Rails for .NET Developers
- Rails Podcast
- Rails Best Practices
- 官方 Rails 指南
- 轨道广播
- railsapi.com或Ruby on Rails - APIdock
- 红宝石秀
- 僵尸铁轨
- Softies on Rails- 面向 .NET 开发人员的 Ruby on Rails
- Rails 播客
- Rails 最佳实践
I've burned through the backlog of Rails and Rails Envy podcasts in the past month and they have provided wonderful insight into lots of topics, even regarding software development in general.
在过去的一个月里,我浏览了 Rails 和 Rails Envy 播客的积压,它们提供了对许多主题的精彩见解,甚至是一般的软件开发。
回答by srboisvert
Beware, the rails world is a massively frustrating mess of outdated and inconsistent documentation and examples. It is maybe one of the fastest moving and most faddish development communities there is. By the time you learn something it will already have changed. Even the books are not consistent in which version of rails they are talking about. Documentation by blogging! enough said.
请注意,rails 世界是一堆令人沮丧的过时且不一致的文档和示例。它可能是目前发展最快、最时尚的开发社区之一。当你学到一些东西的时候,它已经改变了。甚至这些书在他们谈论的 rails 版本中也不一致。通过博客记录!说够了。
I currently do RoR on windows. My advice is to avoid windows if you can. Lots of things don't work and the rails community really really doesn't care about you. The move to Git has really messed me up since it doesn't work very well on windows. A lot of gems will fail because of this (Heroku looks like a cool tool - too bad for me it can't handle window's Git setup). Capistrano is out. It goes on and annoyingly on.
我目前在 Windows 上执行 RoR。我的建议是尽可能避免使用窗户。很多事情都行不通,Rails 社区真的真的不在乎你。迁移到 Git 真的让我一团糟,因为它在 Windows 上不能很好地工作。许多 gem 会因此而失败(Heroku 看起来像一个很酷的工具 - 对我来说太糟糕了,它无法处理窗口的 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.
另外,在您的脑海中,您总是想知道什么时候某些东西不起作用“这是导轨/Windows 问题吗?” 我不确定这是否可以通过使用 linux 来解决,因为 linux 带来了自己的麻烦,例如必须不断升级所有这些不同的依赖项等……如果这是您喜欢的事情,那么它可能是您的不错选择。那些享受系统摆弄的日子已经过去了,我只想继续做我的工作。我打算在家用机器上安装 ubuntu,这样我就可以熟悉像 capistrano 这样的东西,所以我的观点可能会改变。
I'd highly suggest if you are going to do rails dev for any amount of time you seriously consider getting a Mac. If you value your time and sanity it will pay for itself almost instantly. Depending on how you value your time 10 hours of debugging windows/linux setup problems and you have spend as much as a Mac costs anyway.
我强烈建议您是否打算在任何时间内认真考虑购买 Mac 进行 Rails 开发。如果你珍惜你的时间和理智,它几乎会立即收回成本。取决于您对 10 小时调试 windows/linux 设置问题的时间的重视程度,无论如何您已经花费了与 Mac 一样多的费用。
Rails is a joy compared to what it replaces but it is a bit of a pain in that its proponents skip right past a lot of the boring but important stuff like documentation, compatibility issues and community building. It is way more powerful than other frameworks like Django but I sometimes look over at the Django documentation and community and sigh like a guy with a wild sexy girlfriend looking at his friend's plain but sane and stable wife. But then rails adds a feature and I go "Ohhh shiny!"
与它所取代的相比,Rails 是一种乐趣,但它的支持者跳过了许多无聊但重要的东西,如文档、兼容性问题和社区建设,这有点令人痛苦。它比 Django 等其他框架强大得多,但我有时会查看 Django 文档和社区,并像一个拥有狂野性感女友的男人看着他朋友朴素但理智而稳定的妻子一样叹息。但是 Rails 添加了一个功能,我说“哦,闪亮!”
IMO the Rails Screencasts are better than the Peepcode screencasts. RubyPlus also has screencasts, mind you, they are bit rough around the edges. BuildingWebApps has a free online course that starts doing screencasts halfway through.
IMO Rails 截屏视频比 Peepcode 截屏视频更好。RubyPlus 也有截屏视频,请注意,它们的边缘有点粗糙。BuildingWebApps 有一个免费的在线课程,可以在中途开始进行截屏。
回答by Adrian Dunston
Path of least resistance:
阻力最小的路径:
- Have a simple web project in mind.
- Go to rubyonrails.organd 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.comand view at the earliest videos for a closer look.
- Buy The Rails Wayby 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.
- 有一个简单的网络项目。
- 转到rubyonrails.org并查看他们的“15 分钟内的博客”截屏视频,您会很兴奋。
- 获取一份 O'Reilly Media 的Learning Ruby
- 获取 Mac 或 Linux 机器。
(由于 Rails 通常是在这些基础上开发的,因此早期的 Rails 挫折较少。) - 获取使用 Rails进行敏捷 Web 开发的副本。
- 获取该书中描述的 Ruby 和 Rails 版本。
- 通读这本书的第一部分,感受一下它是什么样的。
- 转到railscasts.com并查看最早的视频以仔细查看。
- 购买Obie Fernandez 的The Rails Way以更深入地了解 Rails 及其功能。
- 然后升级到最新的 Rails 生产版本,并查看最新的 railscasts.com 视频。
回答by Kalid
I wrote a post called "Getting Started With Rails -- What I wish I knew"that many people found helpful.
我写了一篇名为“Rails 入门——我希望我知道的事情”的文章,很多人发现它很有帮助。
The basics:
基础知识:
- Agile development with Rails (book)
- InstantRails for quick ruby/rails environment on Windows
- Aptana as the IDE
- Subversion for version control
- 使用 Rails 进行敏捷开发(书籍)
- 用于 Windows 上快速 ruby/rails 环境的 InstantRails
- Aptana 作为 IDE
- 用于版本控制的 Subversion
The online tutorials are decent but scattered. Invest $30 in a book for a more comprehensive understanding.
在线教程不错,但分散。为一本书投资 30 美元以获得更全面的理解。
回答by SiliconChaos
I've found http://railstutorial.org/bookto be a great resource for learning Rails
我发现http://railstutorial.org/book是学习 Rails 的绝佳资源
回答by S?ren Spelling Lund
I really enjoy RubyMine from Jetbrains. It seems like a very full featured IDE something I miss from many of the other alternatives out there. Also for a simple env I enjoy e the text editor. Plain and simple.
我真的很喜欢 Jetbrains 的 RubyMine。它似乎是一个功能非常齐全的 IDE,这是我从许多其他替代品中错过的。同样对于一个简单的 env,我喜欢 e 文本编辑器。干净利落。
回答by Binil Thomas
IDE: NetBeans Book: Agile Web Development With Rails Installation: Instant Rails
回答by Soner G?nül
Data Structures and Algorithms with Object-Oriented Design Patterns in RubyBruno R. Preiss | Published in 2004
Learn to ProgramChris Pine | Pragmatic Bookshelf Published in 2006, 176 pages
Mr. Neighborly's Humble Little Ruby BookJeremy McAnally | Published in 2006, 147 pages
Programming Ruby: A Pragmatic Programmer's GuideDavid Thomas, Andrew Hunt | Addison-Wesley Published in 2000, 608 pages
Rails in a NutshellC. Fauser, J. MacAulay, E. Ocampo-Gooding, J. Guenin | O'Reilly Media Published in 2009, 352 pages
Ruby Best PracticesGregory T. Brown | O'Reilly Media Published in 2009, 328 pages
Ruby Essentials| Techotopia Published in 2007
Ruby on Rails SecurityHeiko Webers | OWASP Published in 2009, 48 pages
Ruby User's GuideMark Slagell | Published in 2005
The Book Of RubyHuw Collingbourne | Published in 2009, 425 pages
The Little Book of RubyHuw Collingbourne | Dark Neon Ltd. Published in 2008, 87 pages
why's (poignant) guide to Rubywhy the lucky stiff | Published in 2008
RubyBruno R. Preiss 中具有面向对象设计模式的数据结构和算法| 2004年出版
学习编程Chris Pine | 实用书架 2006 年出版,176 页
邻居先生的简陋小红宝石书Jeremy McAnally | 2006 年出版,147 页
Ruby 编程:实用程序员指南David Thomas、Andrew Hunt | Addison-Wesley 2000 年出版,608 页
Rails 简介C. Fauser、J. MacAulay、E. Ocampo-Gooding、J. Guenin | O'Reilly Media 2009 年出版,352 页
Ruby 最佳实践Gregory T. Brown | O'Reilly Media 2009 年出版,328 页
红宝石精华| Techotopia 于 2007 年出版
Ruby on Rails 安全性Heiko Webers | OWASP 2009 年出版,48 页
Ruby 用户指南Mark Slagel | 2005年出版
为什么(辛酸)Ruby 指南为什么幸运僵硬?2008年出版
回答by Kevin Pang
There's a very solid ongoing series on NETTUTSright now that you may be interested in.
现在有一个非常可靠的NETTUTS 系列正在进行中,您可能会感兴趣。
回答by wizztjh
http://railsforzombies.org/is a nice one. Introducing an all new way to learn Ruby on Rails in the browser with no additional configuration needed.
http://railsforzombies.org/是一个不错的选择。介绍一种无需额外配置即可在浏览器中学习 Ruby on Rails 的全新方式。

