Reputation: 751
I created a custom gem called pdf2html. The gem file is pdf2html-0.1.gem
I placed this file in the vendor directory of rails 3 project.
My Gemfile entry for this gems reads as follows
gem 'pdf2html', '0.1' , :path => 'vendor'
When I run the bundle install command I get the following message regarding this gem
* pdf2html at `vendor` will not be cached.
I tried doing a bundle show on this gem it tells me that it is installed in the vendor directory.
Now when I do a rails console and try to do a require 'pdf2html' I get a "No such file to load error"/
Can someone tell me what I am doing wrong
Thanks Paul
Upvotes: 1
Views: 663
Reputation: 751
I pushed the gem and associated files over to github and then installed it from there using the Gemfile/ bundle install. Now its working fine. I could not figure out how to use the local gem file
Upvotes: 1
Reputation: 211540
I thought the proper way to declare gems was to specify the full path, not the base path, as in:
gem 'pdf2html', '0.1', :path => 'vendor/pdf2html'
The reason it doesn't error out sooner is that the path vendor/
actually exists so there's no immediate problem. It's only when you try to require vendor/pdf2html.rb
, which is missing, that there's an issue raised.
Upvotes: 1