Bug 1225496
| Summary: | gem binaries are installed to <root>/usr/local/bin which is not in the SCL PATH | ||
|---|---|---|---|
| Product: | Red Hat Software Collections | Reporter: | Robin Bowes <robin.bowes> |
| Component: | ruby | Assignee: | Pavel Valena <pvalena> |
| Status: | CLOSED ERRATA | QA Contact: | Iveta Wiedermann <isenfeld> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rh-ruby23 | CC: | dcleal, isenfeld, jorton, pvalena |
| Target Milestone: | rc | ||
| Target Release: | 2.2 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | rh-ruby23-2.2-4.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-05-31 10:27:14 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: | |||
This perl code munges the original enable script to add the local version of the elements added to each of the variables:
perl -e 'while (<>) { if (/^([^=]*=)([^\$]*)(.*)/) { $pre = $1 ; $path = $2 ; $post = $3 ; ($newpath = $path) =~ s/usr/usr\/local/ ; $newpath =~ s/://g ; print "$pre$newpath:$path$post\n" }}' < enable
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2016:1171 |
When I install a ruby gem that contains a binary (eg. fpm) under SCL ruby193, the binary is installed to /opt/rh/ruby193/root/usr/local/bin. But this dir is not added to the PATH when "scl enable ruby193 ..." is used. Version-Release number of selected component (if applicable): ruby193-1.1-9.el6.centos.alt.x86_64 How reproducible: sudo yum -y -q install centos-release-SCL sudo yum -y -q install ruby193 ruby193-ruby-devel gcc tar git sudo scl enable ruby193 "gem install --no-ri --no-rdoc fpm" scl enable ruby193 "fpm --version" Actual results: /var/tmp/sclrQHn9S: line 8: fpm: command not found Expected results: 1.3.3 Additional info: The fix is to add /opt/rh/ruby193/root/usr/local/bin to the PATH in /opt/rh/ruby193/enable All the variables in /opt/rh/ruby193/enable should have an equiavelent "local" component added. The modified file might look something like this: export PATH=/opt/rh/ruby193/root/usr/local/bin:/opt/rh/ruby193/root/usr/bin${PATH:+:${PATH}} export LD_LIBRARY_PATH=/opt/rh/ruby193/root/usr/local/lib64:/opt/rh/ruby193/root/usr/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} export MANPATH=/opt/rh/ruby193/root/usr/local/share/man:/opt/rh/ruby193/root/usr/share/man:${MANPATH} export PKG_CONFIG_PATH=/opt/rh/ruby193/root/usr/local/lib64/pkgconfig:/opt/rh/ruby193/root/usr/lib64/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}