Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'irb' gem no longer exists on appliance #408

Closed
simaishi opened this issue Apr 2, 2020 · 12 comments
Closed

'irb' gem no longer exists on appliance #408

simaishi opened this issue Apr 2, 2020 · 12 comments
Assignees
Labels

Comments

@simaishi
Copy link
Contributor

simaishi commented Apr 2, 2020

On master/jansa appliances, irb gem (which is a default gem that should always exist) gets removed by bundle clean --force during appliance build and it doesn't exist.

In ruby 2.6.x, 'irb' became a standard gem, which seems to be causing the removal now.

The workaround for now: gem install irb

@NickLaMuro
Copy link
Member

@simaishi how are you calling IRB?

You shouldn't need to install it, but you now won't be able to do something like bundle exec irb if the Gemfile doesn't include gem "irb" (which is infuriating to me... but I digress...).

Though, I guess I am unsure of what bundle clean --force does, but if it is cleaning up standard gems that seems like a bug in bundler.

@Fryguy
Copy link
Member

Fryguy commented Apr 9, 2020

@simaishi This might be related - rubygems/bundler#6929

Moving to a newer bundler might fix that.

@simaishi
Copy link
Contributor Author

simaishi commented Apr 9, 2020

@simaishi how are you calling IRB?

Since the gem is removed, both irb as well as bundle exec irb fail.

+ [21:00:22] bundle clean --force
Removing bundler (1.17.2)
Removing irb (1.0.0)
Removing rdoc (6.1.2)
Removing xmlrpc (0.3.0)
Removing test-unit (3.2.9)
Removing rake (12.3.2)
Removing power_assert (1.1.3)
Removing net-telnet (0.2.0)
Removing minitest (5.11.3)
Removing did_you_mean (1.3.0)

Some gems have newer versions installed (bundle, rake), so removing the version that came with ruby isn't causing problems.

Of those, bundler, irb and rdoc are "default" gems, and the rest is "bundled" gems in ruby 2.6.5.

There was an issue about removing bundled gem (rubygems/bundler#6648). There it says:

The entire point of the --force option is to confirm that you are okay with potentially removing system gems. If you don't pass --force, we spell out that we are refusing to remove gems you might need in other contexts.

If you don't want to remove system gems, run bundle install --path and then you can run bundle clean without --force.

I'm not sure if "system gems" means default gems + bundled gems...

@simaishi
Copy link
Contributor Author

simaishi commented Apr 9, 2020

@simaishi This might be related - rubygems/bundler#6929

Moving to a newer bundler might fix that.

It might be related, but we're already using the latest bundler, v2.1.4

@jrafanie
Copy link
Member

should we just add irb to the Gemfile?

@carbonin
Copy link
Member

@jrafanie maybe better to add it to https://github.com/ManageIQ/manageiq-appliance/blob/master/manageiq-appliance-dependencies.rb

@jrafanie
Copy link
Member

yeah, I guess we'd have to look at all of the default gems and decide if that's what we want to do with them too.

https://stdgems.org/new-in/2.6/

@carbonin
Copy link
Member

I think it would depend on the gem though, right ... Some would belong in the Gemfile, or more likely, the gem that would actually need them (looking at logger in that case).

irb specifically is an appliance concern (I don't think we actually us it in the application). Maybe it would be a candidate for a development dependency ... sure, but not in the actual app Gemfile.

@Fryguy
Copy link
Member

Fryguy commented Apr 20, 2020

irb specifically is an appliance concern (I don't think we actually us it in the application).

I believe rails console uses it.

@carbonin
Copy link
Member

Oh I would have expected it to be a rails dependency then. Did they not add it when ruby 2.6 was released?

If that's the reason, then I guess it does belong in the manageiq Gemfile.

@Fryguy
Copy link
Member

Fryguy commented Apr 20, 2020

I agree...I'd expect a rails depedency as well

@simaishi
Copy link
Contributor Author

simaishi commented May 28, 2020

Resolved by #415 as we no longer need to run bundle clean --force

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants