Bug 1207842 - rails console is unaccessible due to railties gem missing
Summary: rails console is unaccessible due to railties gem missing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.4.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.4.0
Assignee: Joe Rafaniello
QA Contact: Thom Carlin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-31 20:22 UTC by Alex Krzos
Modified: 2015-06-16 12:56 UTC (History)
6 users (show)

Fixed In Version: 5.4.0.0.19 + 1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-16 12:56:26 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1100 0 normal SHIPPED_LIVE CFME 5.4.0 bug fixes, and enhancement update 2015-06-16 16:28:42 UTC

Description Alex Krzos 2015-03-31 20:22:27 UTC
Description of problem:
railties is missing so rails console can not be opened.

Version-Release number of selected component (if applicable):
5.4.0.0.14

How reproducible:
100%

Steps to Reproduce:
1. attempt to open rails c on 5.4.0.0.14 build
2.
3.


# rails c
/opt/rh/ruby200/root/usr/share/rubygems/rubygems/dependency.rb:296:in `to_specs': Could not find 'railties' (>= 0) among 145 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>'
[root@dhcp23-144 vmdb]# gem list

*** LOCAL GEMS ***

acts_as_list (0.1.9)
acts_as_tree (2.1.0)
akami (1.2.2)
american_date (1.1.0)
amq-protocol (1.9.2)
ancestry (1.2.5)
arel (3.0.3)
awesome_spawn (1.3.0)
aws-sdk (1.56.0)
aws-sdk-v1 (1.56.0)
bcrypt-ruby (3.0.1)
bigdecimal (1.2.0)
binary_struct (2.0.0)
builder (3.0.4)
bundler (1.9.1)
bunny (1.0.7)
CFPropertyList (2.3.1)
color (1.7.1)
commonjs (0.2.7)
daemons (1.2.2)
dalli (2.2.1)
default_value_for (2.0.3)
elif (0.1.0)
erubis (2.7.0)
eventmachine (1.0.7)
excon (0.44.4)
execjs (2.4.0)
ezcrypto (0.7)
facade (1.0.6)
fast_gettext (0.9.2)
ffi (1.9.8)
ffi-vix_disk_lib (1.0.1)
fission (0.5.0)
fog (1.28.0)
fog-atmos (0.1.0)
fog-aws (0.1.1)
fog-brightbox (0.7.1)
fog-core (1.29.0)
fog-ecloud (0.0.2)
fog-json (1.0.0)
fog-profitbricks (0.0.2)
fog-radosgw (0.0.3)
fog-riakcs (0.1.0)
fog-sakuracloud (1.0.0)
fog-serverlove (0.1.1)
fog-softlayer (0.4.1)
fog-storm_on_demand (0.1.0)
fog-terremark (0.0.4)
fog-vmfusion (0.0.1)
fog-voxel (0.0.2)
fog-xml (0.1.1)
foreman_api (0.1.11)
formatador (0.2.5)
gettext_i18n_rails (1.2.1)
gssapi (1.2.0)
gyoku (1.0.0)
haml (4.0.6)
haml-rails (0.4)
highline (1.6.21)
hike (1.2.3)
httpclient (2.5.3.3)
httpi (2.0.2)
i18n (0.7.0)
inflecto (0.0.2)
inifile (3.0.0)
iniparse (1.3.3)
io-console (0.4.2)
io-extra (1.2.8)
ipaddress (0.8.0)
jbuilder (2.0.8)
journey (1.0.4)
jquery-rails (3.1.2)
json (1.8.2, 1.7.7)
kubeclient (0.1.7)
less (2.6.0)
less-rails (2.6.0)
libv8 (3.16.14.7 x86_64-linux)
linux_admin (0.10.0)
little-plugger (1.1.3)
log4r (1.1.8)
logging (1.6.2)
mail (2.5.4)
memoist (0.11.0)
mime-types (1.25.1)
minitest (4.7.5)
more_core_extensions (1.2.0)
multi_json (1.11.0)
net-ldap (0.7.0)
net-ping (1.7.7)
net-scp (1.2.1)
net-sftp (2.0.5)
net-ssh (2.9.2)
netrc (0.10.3)
nokogiri (1.5.11)
nori (2.1.0)
novnc-rails (0.2)
oauth (0.4.7)
open4 (1.3.4)
outfielding-jqplot-rails (1.0.8)
ovirt (0.4.0)
ovirt_metrics (1.0.1)
parallel (0.5.21)
pdf-writer (1.1.8)
pg (0.12.2)
Platform (0.4.0)
polyglot (0.3.5)
psych (2.0.13, 2.0.0)
qpid_messaging (0.20.2)
rack (1.4.5)
rack-cache (1.2)
rack-ssl (1.3.4)
rack-test (0.6.3)
rails-i18n (3.0.1)
rake (10.4.2)
rdoc (4.0.0, 3.12.2)
recursive-open-struct (0.5.0)
ref (1.0.5)
ruby-progressbar (0.0.10)
rubyntlm (0.5.0)
rubyzip (0.9.5)
rufus-lru (1.0.5)
rufus-scheduler (2.0.24)
sass (3.1.20)
savon (2.2.0)
secure_headers (2.0.1)
simple-rss (1.3.1)
snmp (1.1.1)
spice-html5-rails (0.1.5)
sprockets (2.2.3)
sprockets-less (0.6.1)
sprockets-sass (1.2.0)
therubyracer (0.12.1)
thin (1.3.1)
thor (0.19.1)
tilt (1.4.1)
transaction-simple (1.4.0.2)
treetop (1.4.15)
trollop (1.16.2)
tzinfo (0.3.43)
uglifier (2.4.0)
uuidtools (2.1.5)
wasabi (3.1.0)

Comment 2 Joe Rafaniello 2015-03-31 20:54:06 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.

Comment 3 Alex Krzos 2015-03-31 22:44:46 UTC
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>

Comment 4 Joe Rafaniello 2015-04-01 19:50:46 UTC
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

Comment 5 CFME Bot 2015-04-01 21:41:04 UTC
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(+)

Comment 8 Thom Carlin 2015-04-23 21:11:02 UTC
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

Comment 10 errata-xmlrpc 2015-06-16 12:56:26 UTC
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


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