Ruby on Rails 使用 IDE 或坚持使用优秀的文本编辑器
我是一位经验丰富的程序员,也是 Ruby on Rails 的热心新采用者。我主要使用 mac、unix 和 textMate 来完成工作。我自己编写了一些小应用程序,并且对编写更复杂的东西的潜力感到兴奋。
我是否应该投入时间和资源来使用(学习)RoR IDE?如果您使用过与我类似的配置以及用于 RoR 的 IDE,请回复。
这不是哪个 IDE 最好,或者 RoR 首选哪个平台的问题。
我更关心的是使用基于一系列不断变化和发展的工具构建的任何 IDE 的成本/收益。
此外,随着我扩大对 Rails 功能的使用,仅使用文本编辑器就能培养对文件结构和目录布局的详细理解,这似乎是一项可以继续发展的好技能。
而且... HTML、CSS 和 ruby 都可以通过具有最基本的格式化功能的文本编辑器进行良好的评估。
从好的方面来说,我发现提供手持操作(模板、自动完成文本等)以使用 RSpec 生成单元测试 (TDD) 的 IDE 很有吸引力,因为这是我经验有限的领域。
我最担心的是,我会致力于使用 IDE,编写应用程序,然后当我以 IDE 人员从未预料到的方式使用 ruby、rails 或其他一些关键组件时陷入困境。过去,使用 IDE 并定期编辑特定 IDE 范式之外的文件或资源让我很烦恼。以前的问题还包括 IDE 无法很好地考虑的语言功能,从而限制了开发灵活性。
我也不确定“本地开发”<->“远程服务器”集成/镜像和版本控制是否最好通过 IDE 界面处理。 git 给我的印象是高效且易于使用。
这里是否有一个进行更大项目的最佳方法,或者这两种方法都可以接受相关的警告吗?我对使用 IDE 的担忧是否过时或有道理?
预先感谢您的评论 -
Perry
附录:这里似乎有一些重叠:使用带有 Rails 的 IDE 会阻碍我吗?
结论:有很多值得深思的地方。谢谢大家。我很高兴我开始使用 Unix 和文本编辑器学习 Ruby 和 RoR。对于 RoR 所处的文本负载环境来说,这是一个很棒的组合。rvm、git、rspec、gem 管理和代码生成都可以通过命令行很好地完成。他们使 Hartl 的 Rails 教程的工作以及使用“The Well Grounded Rubyist”中的示例变得简单。我打算查看 Rubymine 的 30 天免费试用版。我希望 IDE 能够以 (+) 的方式加深我的初步理解。集成单元测试是我决定尝试 IDE 的一个重要因素,因为我偶然发现了 Rspec。我不认为我的时间(或金钱)被浪费在textMate 上。两者都花得很值。
附录 2
我使用 Ruby Mine 30 天了。没关系,我决定坚持使用:
- MacBook Pro
- TextMate
- git
...而且它们都非常好。我可以在测试、编码、浏览和版本控制之间快速切换。 TextMate 的“捆绑包”有时可用作 CSS、Ruby 和 Rails 代码参考。
我还可以补充一点,我的大部分“麻烦”都源于我认为我可以一路上拿起 Ruby。没有。我必须阅读、实验并阅读更多内容。 “掌握”Ruby 确实为我打开了 Rails 的大门。如果你也想提高你的 Ruby,这些对我有帮助:
- The Well Grounded Rubyist
- Meta Programming Ruby
I am an experienced programmer and an enthusiastic new adopter of Ruby on Rails. I'm mostly using a mac, unix, and textMate, to get the job done. I've written some small apps on my own and am excited by the potential to write something more complex.
Should I commit time and resources to using (learning) an IDE for RoR? Please respond if you are someone who has used a configuration similar to mine and an IDE for RoR.
This is not a question about which IDE is the best, or which platform is preferred for RoR.
I'm more concerned with the cost/benefit of committing to any IDE that is built over a broad set of changing and evolving tools.
In addition, the detailed understanding of file structure and directory layout that just using a text editor fosters seems like a good skill to continue to grow as I broaden my use of the features in rails.
And... HTML, CSS, and ruby, are all well assessed with text editors that have the most basic formatting features.
On the plus side, I find IDEs that offer hand holding (templates, autocomplete text, etc.) for generating unit testing (TDD) with RSpec are appealing as this is an area in which I have limited experience.
My big worry is that I'll commit to an IDE, write an application, and then get stuck when ruby, rails, or some other key component I am using updates in a way that the IDE folks never anticipated. Using an IDE and periodically editing files or resources outside the particular IDE paradigm has burned me in the past. Previous gotchas have also included language features that an IDE did not account for well, thereby limiting development flexibility.
I'm also not sure if "local development"<->"remote server" integration/mirroring and version control are best handled through an IDE interface. git has impressed me as efficient and easy to use.
Is there a best approach here for undertaking a larger project, or are both methods O.K. with their associated caveats? Are my concerns about using an IDE outdated or warranted?
Thanks in advance for your comments -
Perry
Addendum: Seems there is some overlap here: Will using an IDE with Rails hinder me?
Conclusion: Lots of good food for thought. Thanks all. I am glad I began my Ruby and RoR learning with unix and a text editor. It's a great combo for the text laden environment that RoR lives in. rvm, git, rspec, gem management, and code generation are all well done from a command line. They made working through Hartl's Rails Tutorial, and playing with examples from "The Well Grounded Rubyist," easy. I am going to check out Rubymine's 30-day free trial. I expect the IDE will add to my initial understanding in (+) ways. Integrated unit testing was a big factor in my decision to try the IDE as I have stumbled with Rspec. I don't think my time (or money) have been wasted with textMate. Both were well spent.
ADDENDUM 2
I used Ruby Mine for 30 days. It was O.K. I did decide to stick with:
- MacBook Pro
- TextMate
- git
... and they are all very good. I can switch very quickly between testing, coding, browsing, and version control. TextMate's 'Bundles' occasionally help as a CSS, Ruby, and Rails code reference.
I might also add that most of my 'troubles' stemmed from thinking I could just pick-up Ruby along the way. Nope. I had to read and experiment and read some more. "Getting" Ruby has really opened up Rails for me. If you too want to improve your Ruby, these helped me:
- The Well Grounded Rubyist
- Meta Programming Ruby
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
大多数红宝石爱好者使用简单的编辑器。您需要的是能够轻松跳转到特定文件、语法突出显示,仅此而已。 Ruby 相当简洁,并且我们的类层次结构相当平坦,因此您通常不需要 IDE 提供的大量功能。
就我个人而言,我使用 vim 和一堆插件,并且发现自己比以前在 Visual 中的工作效率更高工作室岁月。我在促销期间获得了 RubyMine 的许可证,它是一个很棒的 IDE,如果我由于某种原因无法使用编辑器,我可能会使用它。
如果你想要推荐,我会说带有三个插件的 vim - Rails.vim(使 vim 更了解 Rails 及其结构)、Command-T(非常适合在文件之间快速跳转)和 NERDTree - 一个基于图形树的文件浏览器。
就像我之前说的,无论你选择什么,这些功能都是最重要的,所以即使你不使用 vim,也要确保你选择的编辑器可以做这些事情。尤其是 CommandT,通过击键即可模糊查找文件,这将为您在职业生涯中节省无数时间点击 GUI 文件浏览器的时间。
Most rubyists use a plain editor. What you need is the ability to jump to specific files easily, syntax highlighting, and really thats about it. Ruby is fairly succinct, and our class hierarchies are fairly flat, so you dont usually end up needing a lot of what an IDE offers.
Personally, I use vim with a bunch of plugins, and find myself more productive then I ever was in my Visual Studio years. I picked up a license for RubyMine awhile back during a sale, it is a fantastic IDE, and would probably use it if I couldnt use an editor for some reason.
If you want a recommendation, I would say vim with three plugins - Rails.vim (make vim more aware of rails and its structure), Command-T (great for jumping around between files quickly), and NERDTree - a graphical tree based file browser.
Like I said early, those capabilities are the most important thing for whatever you choose, so even if you dont go vim, make sure the editor you choose can do those things. CommandT especially, being able to fuzzy-find files at a keystroke will save you endless hours of clicking through gui file browsers over the course of your career.
如果您使用的是 Textmate,则无需更改。那有你需要的一切。只要确保获得正确的 ruby/rails 包就可以了。
但最好的选择是在 IDE 上尝试一个项目,然后在 TM 上尝试一个项目。看看哪个最适合您。
If you are using Textmate, no need to change. That has everything you need. Just make sure to get the proper ruby/rails bundles and you should be good to go.
But the best bet would be to try a project on an IDE and then one on TM. See which works best for you.
Ruby 不是静态类型语言,因此您无法从 IDE 自动完成中获得很多好处。一些 Ruby IDE 尝试对此进行智能处理(RubyMine、NetBeans 等),并且做得不错,但速度慢得令人难以忍受。
您会发现,一旦您使用了 TextMate 提供的快捷方式,您就不会错过您的 IDE。
至于手持方式,请查看 Railscasts 和 Rails 指南。我想您会发现,花时间在这两个网站上将满足您入门所需的 80-90% 的“惯例”。
Ruby is not a statically typed language so much of the benefit you gain from an IDE auto-completion isn't available. A few Ruby IDEs try to be intelligent about this (RubyMine, NetBeans, etc) and do a fair job but their unbearably slow.
You'll find that once you've committed to the shortcuts that TextMate provides, you won't miss your IDE.
As far as hand-holding goes, check out Railscasts and Rails Guides. I think you'll find that spending time on those two sites will fill in 80-90% of the "conventions" you'll need to get started.