So I built a dummy Rails-plugin gem...
rails plugin new foo --skip-bundle -O --full
and filled in my .gemspec
as below, including the line
s.add_dependency "rails-assets-sugar"
and added
source "https://rails-assets.org"
to the Gemfile.
Running rake build
gave the error
Could not find gem 'rails-assets-sugar (>= 0) ruby', which is required by gem 'foo (>= 0) ruby', in any of the sources.
After hours, never mind how many, spent gnashing my teeth and poring through interminable DuckDuckGo searches, I gave up and went on IRC freenode
, Thanks to dwradcliffe
, with head-scratching assistance from ddd
, I found The Answer™.
Step 1: Add the Gem as a dependency in the .gemspec
, as normal
s.add_dependency 'rails-assets-sugar'
Step 2: Add the rails-assets
repo to the top of the Gemfile
source "https://rails-assets.org"
Step 3: The Secret Sauce: Add the Gem you want as a normal gem
dependency in the Gemfile
before the gemspec
line
gem "rails-assets-sugar"
Step 4: Rebundle
bundle
Step 5: Build your frakkin' Gem!
rake build
Step 6: Enjoy the endorphin rush from no longer beating your head against the wall after a solid day of doing so.
Thanks, guys!