Thanks for the explanation about the requirement to expose an executable file.

In answer to what I was trying to do:
I came across this when automating patch/build of gems after doing a gem/bundle update.
My initial use case was patching `gem-ctags` to use `ripper-tags`.

I wrote a extremely robust (don't hate me!) shell script to automatically patch and build gems.

If you're interested in what I came up with:
https://gist.github.com/HaleTom/275f28403828b9b9b93d313990fc94f4

Features:

# Work around `patch` returning non-zero if some patch hunks are already applied
# Apply all patches in $patch_dir (in order) to their corresponding gem(s)
# Build a gem only after all patches have been applied
# Only build the gem if it was patched
# Robust error handling

Cheers,
Tom

On 2016-08-19 10:15, Ryan Bigg wrote:
The `gem-ctags` gem does not expose a library file (a file in lib) which
matches that name. It is a RubyGems plugin, and so it doesn’t need to do
that.

Contrast this with `gem which rails`, which, on my machine, shows this path:

/Users/ryanbigg/.gem/ruby/2.3.1/gems/railties-5.0.0/lib/rails.rb

Rails _does_ have a file to expose and so `gem which` works.

Out of curiosity: why are you doing `gem which` in this case?


On August 19, 2016 at 1:03:58 PM, Ravi (Tom) Hale ([email protected]
<mailto:[email protected]>) wrote:

Any idea why my gem-ctags can't be seen by `gem which`?

+ravi@boxy:~/prj/sample_app$ gem uninstall gem-ctags
Successfully uninstalled gem-ctags-1.0.7
+ravi@boxy:~/prj/sample_app$ gem install gem-ctags
Fetching: gem-ctags-1.0.7.gem (100%)
Successfully installed gem-ctags-1.0.7
Parsing documentation for gem-ctags-1.0.7
Installing ri documentation for gem-ctags-1.0.7
Done installing documentation for gem-ctags after 0 seconds
1 gem installed
+ravi@boxy:~/prj/sample_app$ gem list | grep tags
gem-ctags (1.0.7)
ripper-tags (0.3.3)
+ravi@boxy:~/prj/sample_app$ gem which ripper-tags
/home/ravi/.gem/ruby/2.3.1/gems/ripper-tags-0.3.3/lib/ripper-tags.rb
+ravi@boxy:~/prj/sample_app$ gem which gem-ctags
ERROR: Can't find ruby library file or shared library gem-ctags
+ravi@boxy:~/prj/sample_app[1]$

I uninstalled and reinstalled ripper-tags and it can be seen just fine.

Puzzled,
Tom

--
You received this message because you are subscribed to the Google
Groups "Ruby or Rails Oceania" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:rails-oceania%[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at https://groups.google.com/group/rails-oceania.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google
Groups "Ruby or Rails Oceania" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at https://groups.google.com/group/rails-oceania.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby or 
Rails Oceania" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/rails-oceania.
For more options, visit https://groups.google.com/d/optout.

Reply via email to