-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Git Gems Don't Load DevKit Under Windows And Fail #1120
Comments
I have no idea what DevKit does to make gems work, but I'm sure Bundler doesn't do it for git gems. They're not gems. If you need DevKit to load your gems, I think you need to build a gem and put it in vendor/cache. |
So after several hours of research I've determined what is going on and the potential solution. DevKit uses
In the RubyGems installer process it iterates through its list of pre-install hooks and runs them before building extensions and generating bins (rubygems/installer.rb). If the pre-install hooks were run, then native extensions for git sourced gems would build properly under windows. I modified source.rb to include those lines, and was able to successfully build warhammerkid/rocket-amf:
Since there doesn't seem to be an easy way to determine that the user needs the pre-install hooks to be run because DevKit needs to load, I'm not entirely comfortable submitting a patch that runs all the pre-install hooks. I didn't see anything that appeared to suggest that anyone besides the DevKit teams was using the pre-install hooks, so it's probably reasonable to assume that starting to run them won't cause problems, but I couldn't be sure. If you'd like, I'll submit a patch that runs the pre and post install hooks, but I didn't want to do the work if it would be rejected because it might break things. |
A patch sounds great. Thanks for figuring it out! On Apr 13, 2011, at 7:42 PM, warhammerkid reply@reply.github.com wrote:
|
When is this fixing going in? |
To write the tests, I need to evaluate some ruby code that establishes the pre-install or post-install hooks before
|
As soon as I have time to review it. On Jun 29, 2011, at 5:45 AM, soulnafein reply@reply.github.com wrote:
|
Steps:
gem 'rdiscount', :git => 'https://github.com/rtomayko/rdiscount.git'
bundle install
Notes:
DevKit appears to be properly loaded if you just do
gem 'rdiscount'
in your Gemfile, but for gems that are loaded from git, DevKit doesn't load and it fails.The text was updated successfully, but these errors were encountered: