Bug 828607 - Fedora's patched bundler does not add bigdecimal, io-console or json to the $LOAD_PATH by default.
Summary: Fedora's patched bundler does not add bigdecimal, io-console or json to the $...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: rubygem-bundler
Version: 17
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Vít Ondruch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-05 01:31 UTC by postmodern
Modified: 2012-06-05 06:33 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-06-05 06:33:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description postmodern 2012-06-05 01:31:53 UTC
Description of problem:

Since Fedora split bigdecimal, io-console and json out of Ruby's stdlib, and into /usr/share/gems and /usr/lib/gems/exts, rubygem-bundler had to be patched to support these new directories. However, these libraries have not yet been officially removed from Ruby stdlib. Thus the majority of Ruby projects do not define dependencies on them, and expect them to be requirable with no additional configuration. 

Currently, rubygem-bundler will only allow a Ruby project to require bigdecimal, io-console or json, if there are no dependencies on them in the project's gemspec file. This makes Ruby development very difficult on Fedora 17.

Proposed Solution:

Always add /usr/lib/gems/exts/*/{lib,ext} and /usr/share/gems/gems/*/lib to $LOAD_PATHS and never remove them. This will satisfy the expectation that bigdecimal, io-console and json are still part of Ruby's stdlib.


Version-Release number of selected component (if applicable):
rubygem-bundler-1.0.21


How reproducible:

Steps to Reproduce:
1. yum install rubygem-bundler
2. echo "source :rubygems" > Gemfile
3. bundle install
4. ruby -e "require 'bundler'; Bundler.setup; require 'bigdecimal'"
  
Actual results:
-e:1:in `require': cannot load such file -- bigdecimal (LoadError)

Expected results: bigdecimal is loaded.

Additional info:

Comment 1 postmodern 2012-06-05 02:05:43 UTC
A workaround to this issue is to add symlinks for bigdecimal, io-console and json files into /usr/lib/ruby and /usr/share/ruby. https://gist.github.com/2872017

Comment 2 Vít Ondruch 2012-06-05 06:33:43 UTC
The issue is broader than you think. While your workaround my solve your immediate issues, it does not solve the issue in its whole complexity, as long as it is not handled correctly by Ruby upstream in the first place [1]. In the meantime, please use rubygems packaged by Fedora, which do not suffer by this issues. Thank you.

[1] http://bugs.ruby-lang.org/issues/6124


Note You need to log in before you can comment on or make changes to this bug.