Summary: | Bundler needs dependency info in installed gemspecs | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Petteri Räty (RETIRED) <betelgeuse> |
Component: | [OLD] Development | Assignee: | Gentoo Ruby Team <ruby> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://github.com/carlhuda/bundler/issues/issue/251 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 304165 | ||
Bug Blocks: | 335247 |
Description
Petteri Räty (RETIRED)
![]() I've just added bundler 1.0.3 to the tree, and as far as I know it takes a different approach to bundling things, so I'm wondering if this problem is still valid with bundler 1.0.3. Could you test it? It appears to be working. It seems bundler downloads the .gem files if they don't exist. I tested with all ruby nuked and got: betelgeuse@pena ~/test/gentoo-bundler $ bundle /usr/lib/ruby/1.8/fileutils.rb:243:in `mkdir': Permission denied - /usr/local/lib/ruby/gems (Errno::EACCES) then went on to create: mkdir -p /usr/local/lib/ruby/gems/1.8 betelgeuse@pena ~/test/gentoo-bundler $ bundle Fetching source index for http://rubygems.org/ Enter your password to install the bundled RubyGems to your system: Using rake (0.8.7) Using bundler (1.0.3) Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. betelgeuse@pena ~/test/gentoo-bundler $ bundle show rake /usr/lib/ruby/gems/1.8/gems/rake-0.8.7 betelgeuse@pena ~/test/gentoo-bundler $ qfile /usr/lib/ruby/gems/1.8/gems/rake-0.8.7 dev-ruby/rake (/usr/lib/ruby/gems/1.8/gems/rake-0.8.7) I'm reopening this because bundler still expects dependency info in the .gemspec, at least with 1.0.7. This is evident in Rails 3, which won't work out of the box: $ script/rails script/rails:6:in `require': no such file to load -- rails/commands (LoadError) from script/rails:6 This happens because the default Gemfile that is created as part of a new project only refers to the 'rails' gem, and bundler in turn only adds the referenced gem and its dependencies to the search path. Since in our case the rails gemspec doesn't contain dependencies, the other rails components are not added to the search path. This is fixed in revision 1.27 of ruby-fakegem.eclass, which now tries to install the upstream gemspec file if possible, either by using the metadata distributed with the gem or by using the source gemspec file. We only install our own version as a fallback now. Note that this may require additional changes to packages, and that only packages installed after ruby-fakegem 1.27 get this gemspec. If you run into issues: reinstall the package in question or file a bug for it. |