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

Only load "launchy" when it is needed #12

Open
rubiety opened this issue Mar 29, 2011 · 3 comments
Open

Only load "launchy" when it is needed #12

rubiety opened this issue Mar 29, 2011 · 3 comments

Comments

@rubiety
Copy link

rubiety commented Mar 29, 2011

Currently lib/rubygems/commands/read_command.rb has this as the first line, which is run as soon as this file is loaded:

require 'launchy'

This is a problem because:

  1. Since this is a gem plugin, this is effectively required every time you run "rubygems" - that just shouldn't be necessary.
  2. More importantly: since this is being required when requiring rubygems, this is required outside the context of bundler. This is the source of peoples' issues with reported "Already activated 'launchy'" problems, since this is being loaded before bundler even has a chance to initialize.

It would be best if this require line was moved somewhere such that launchy was only required at runtime when actually needed.

Gem plugins have to be very careful of what they do outside of the runtime commands.

@adamsanderson
Copy link
Owner

That makes sense, I'm mostly just developing and using Qwandry these days,
but I should really patch up open_gem.

On Tue, Mar 29, 2011 at 4:36 PM, rubiety <
[email protected]>wrote:

Currently lib/rubygems/commands/read_command.rb has this as the first line,
which is run as soon as this file is loaded:

require 'launchy'

This is a problem because:

  1. Since this is a gem plugin, this is effectively required every time you
    run "rubygems" - that just shouldn't be necessary.
  2. More importantly: since this is being required when requiring rubygems,
    this is required outside the context of bundler. This is the source of
    peoples' issues with reported "Already activated 'launchy'" problems, since
    this is being loaded before bundler even has a chance to initialize.

It would be best if this require line was moved somewhere such that launchy
was only required at runtime when actually needed.

Reply to this email directly or view it on GitHub:
#12

@rubiety
Copy link
Author

rubiety commented Apr 18, 2011

Is there any ETA on a (literally one line) fix for this issue? It continues to cause me quite a few problems as a result of "guard" having open_gem as a dependency... so anyone using guard extensively is probably running into similar issues.

@thibaudgg
Copy link

Hi, FYI guard no more have open_gem as a dependency in the last versions :)

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

No branches or pull requests

3 participants