Bug 828607 - Fedora's patched bundler does not add bigdecimal, io-console or json to the $LOAD_PATH by default.
Fedora's patched bundler does not add bigdecimal, io-console or json to the $...
Product: Fedora
Classification: Fedora
Component: rubygem-bundler (Show other bugs)
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Vít Ondruch
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-06-04 21:31 EDT by postmodern
Modified: 2012-06-05 02:33 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-06-05 02:33:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description postmodern 2012-06-04 21:31:53 EDT
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):

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-04 22:05:43 EDT
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 02:33:43 EDT
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.