是否有适用于 Ruby 或 Rails 的类似 iPython 的 shell?
我喜欢 iPython,并且正在学习 RoR 以及 Mechanize 等一些库,我希望能够轻松地了解我正在使用的内省内容。我希望能够输入“。” + TAB 并查看。
I love iPython and am learning RoR along with some libraries like Mechanize and I'd like to be able to easily see what I'm working with in terms of introspection. I would like to be able to type "." + TAB and see.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
有一个irb工具可以帮助自动完成
There is an irb tool to help autocomplete
您应该看看 Pry (IRB 替代品和运行时开发者控制台)。它不像当前版本的 IPython 那么先进,但它是我们在 Ruby 中拥有的最先进的开发者控制台。
You should take a look at Pry (an IRB alternative and runtime developer console). It isn't as advanced as the current version of IPython, but it's the most advanced developer console we have in Ruby.
尝试 IRB http://en.wikipedia.org/wiki/Interactive_Ruby_Shell 或 Rails 控制台http://guides.rubyonrails.org/command_line.html。我不知道它们是否有自动完成功能,但它们都是优质工具。
try IRB http://en.wikipedia.org/wiki/Interactive_Ruby_Shell, or the rails console http://guides.rubyonrails.org/command_line.html. I don't know if either of them have autocomplete, but they are quality tools.
有一个由 Ruby 内核支持的 IPython 笔记本。 有关项目的详细信息
There is an IPython notebook backed by Ruby kernel. Details about the project
Wirble 是将其中一些工具整合在一起的一种方便但不经常更新的方法。它不像 iPython 那么完整,但也非常接近了。除此之外,它还引入了
irb/completion
。对于 Rails,您可以执行相同的操作,但使用 Rails 根目录中的
script/console
来启动 irb。Wirble is a convenient, if infrequently-updated way of bringing together some of these tools. It's not quite as complete as iPython, but gets pretty close. Among other things, it pulls in
irb/completion
.For rails, you can do the same, but use
script/console
from your rails' root directory to start irb.