Bug 1207842
Summary: | rails console is unaccessible due to railties gem missing | ||
---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Alex Krzos <akrzos> |
Component: | Appliance | Assignee: | Joe Rafaniello <jrafanie> |
Status: | CLOSED ERRATA | QA Contact: | Thom Carlin <tcarlin> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 5.4.0 | CC: | abellott, akarol, akrzos, jhardy, obarenbo, tcarlin |
Target Milestone: | GA | ||
Target Release: | 5.4.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | 5.4.0.0.19 + 1 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-06-16 12:56:26 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: |
Description
Alex Krzos
2015-03-31 20:22:27 UTC
Alex, can you verify you are running with either bin/rails console or bundle exec rails console? I'm guessing the gem isn't found when you execute the rails executable without being in the "bundle" context. Joe, looks like it requires "bundle" context as you mention: [root@dhcp23-144 vmdb]# bin/rails c -s /opt/rh/cfme-gemset/vmdb/Gemfile not found [root@dhcp23-144 vmdb]# bundler exec bin/rails c -s Loading production environment in sandbox (Rails 3.2.17) Any modifications you make will be rolled back on exit irb(main):001:0> Note, Alex... You found a bug. You should be able to use either bin/rails c or bundle exec rails c. In the former case, the gemset rpm caused us an issue because the bundler binstubs were moved with 5.4 so we can't find the Gemfile. I opened a PR to fix this upstream too as it could have a similar problem: https://github.com/ManageIQ/manageiq/pull/2498 New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/e227258d498ecac33ac1372ab109a933c8a92ec7 commit e227258d498ecac33ac1372ab109a933c8a92ec7 Author: Joe Rafaniello <jrafanie> AuthorDate: Wed Apr 1 15:31:17 2015 -0400 Commit: Joe Rafaniello <jrafanie> CommitDate: Wed Apr 1 15:36:57 2015 -0400 Make the Gemfile's location known from anywhere on appliances. Bundler binstubs residing outside of /var/www/miq/vmdb/bin can't find the application's Gemfile without this environment variable set. https://bugzilla.redhat.com/show_bug.cgi?id=1207842 [skip ci] system/LINK/etc/default/evm_bundler | 1 + 1 file changed, 1 insertion(+) Original report fails: [root@cfme vmdb]# rails c /opt/rh/ruby200/root/usr/share/rubygems/rubygems/dependency.rb:296:in `to_specs': Could not find 'railties' (>= 0) among 146 total gem(s) (Gem::LoadError) from /opt/rh/ruby200/root/usr/share/rubygems/rubygems/dependency.rb:307:in `to_spec' from /opt/rh/ruby200/root/usr/share/rubygems/rubygems/core_ext/kernel_gem.rb:47:in `gem' from /opt/rh/cfme-gemset/bin/rails:22:in `<main>' BUT following https://bugzilla.redhat.com/show_bug.cgi?id=1207842#c4 [root@cfme vmdb]# bin/rails c Loading production environment (Rails 3.2.17) irb(main):001:0> [root@cfme vmdb]# bundle exec rails c Loading production environment (Rails 3.2.17) irb(main):001:0> Thus, verified in 5.4.0.0.22 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://rhn.redhat.com/errata/RHBA-2015-1100.html |