Bug 828607
| Summary: | Fedora's patched bundler does not add bigdecimal, io-console or json to the $LOAD_PATH by default. | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | postmodern <postmodern.mod3> |
| Component: | rubygem-bundler | Assignee: | Vít Ondruch <vondruch> |
| Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 17 | CC: | vondruch |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-06-05 06:33:43 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
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 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 |
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: