如何使用 RVM (linux & gedit) 在 Rails3 中浏览 gem 的源代码 [英] How do I browse the source code for a gem in Rails3 with RVM (linux & gedit)

查看:31
本文介绍了如何使用 RVM (linux & gedit) 在 Rails3 中浏览 gem 的源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Ubuntu 中运行 rails3 并使用 gedit 进行编码.我正在使用 RVM.查看我尝试过的 gem 源代码:bundle open jquery-rails

I am running rails3 in Ubuntu and using gedit for coding. I am using RVM. To look at the gem source code I tried: bundle open jquery-rails

这不起作用,因为我没有设置编辑器.将 gedit 设置为编辑器后它仍然不起作用,因为 gedit 无法传递目录.我想它只适用于文件.太糟糕了:(.

That doesn't work since I hadn't setup an editor. After setting gedit as the editor it still doesn't work because gedit can't be passed directories. I guess it only works with files. Too bad :(.

nathan.f77 对此问题的回答(Lookup Gem 或打包在 Rails3 应用程序中的插件代码)似乎很有希望,但我没有不能听从他的指示.他们对我来说缺乏足够的细节.

nathan.f77's answer to this question ( Lookup Gem or Plugin code packaged in a Rails3 application ) seems promising, but I wasn't able to follow his instructions. They lacked sufficient detail for me.

浏览我在 rails3 应用程序中使用的 gem 的源文件的一种非常简单的方法是什么?

推荐答案

CubaLibre 的回应让我走到了一半.我从 Ask Ubuntu 中得到的另一块拼图.

CubaLibre's response got me half-way there. The other piece of the puzzle I was able to get from Ask Ubuntu.

以下是使用 Ubuntu 在 gedit 中浏览 gem 代码的步骤.

Here are the steps to browse gem code in gedit using Ubuntu.

一个.从命令行运行:

gnome-open $(bundle show [gem-name])

B.这将在 nautilus 中打开 gem 目录.从那里只需双击您想要查看的文件,它就会在 gedit 中打开.

b. This will open up the gem directory in nautilus. From there just double click on file you'd like to see and it will open up in gedit.

这篇关于如何使用 RVM (linux & gedit) 在 Rails3 中浏览 gem 的源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆