Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Install of rake and then gem that is built using rake in same "bundle install" fails #2107

Closed
crowbot opened this issue Sep 24, 2012 · 7 comments

Comments

@crowbot
Copy link
Contributor

crowbot commented Sep 24, 2012

Installing the bundle shown in this gist produces the error shown.

https://gist.github.com/3775908

The xapian-full-alaveteli gem is built using rake, but bundler is trying to access the rake executable in the temporary location where the rake gem was built - and by this point it has been copied to /usr/local/bin/rake, so is no longer there.

@indirect
Copy link
Member

As you can see from the Bundler output, rake is always installed first, specifically because many gems require rake in order to build themselves. This is the first gem to have this problem, and many other gems that require rake to build work just fine, so I'm inclined to think this is a bug in the build process for the xapian-full-alaveteli gem. Do you have reason to think this is a bug in Bundler?

@crowbot
Copy link
Contributor Author

crowbot commented Sep 25, 2012

Hi, thanks for the quick reply. I've been trying to figure out if it's a bug in bundler, rubygems, or the xapian-full-alaveteli gem - I came to the initial conclusion that I didn't think it could be the xapian-full-alaveteli gem because there doesn't seem to be anything in it's rakefile [1] or gemspec [2] that could be setting the rake executable path. I'm fairly new to bundler - is there anything obviously unusual looking in those files that might cause a problem with bundler?

[1] https://github.com/sebbacon/xapian-full/blob/master/Rakefile

[2] https://github.com/sebbacon/xapian-full/blob/master/xapian-full.gemspec

@indirect
Copy link
Member

Well, the gemspec certainly seems to be non-standard in the sense that it contains the line s.extensions = ["Rakefile"]. According to the gemspec specification, that array is supposed to contain "extconf.rb-style files" that will be "executed directly". Rakefiles aren't designed to be executed, they're designed to be loaded by the rake command. So this gem seems to be doing something non-standard, yes.

@crowbot
Copy link
Contributor Author

crowbot commented Sep 26, 2012

OK, great - I'll follow that up. Thanks for your help!

@crowbot
Copy link
Contributor Author

crowbot commented Nov 27, 2012

Having gone into this further, I see that Rakefiles are included in the list of files that can be given as extensions in the Rubygems documentation, so I believe there's nothing non-standard going on with the gemspec itself. I've found the bug in bundler that's causing the issue and submitted a pull request with a spec and fix. #2187

@indirect
Copy link
Member

Closing this since the pull has been merged.

@indirect indirect reopened this Nov 29, 2012
@indirect
Copy link
Member

Uh. I mean opening, apparently. Closing now. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants