Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

install-command doesn't seem to honor gemrc #666

Closed
Mon-Ouie opened this Issue · 8 comments

3 participants

@Mon-Ouie
Collaborator

Using the following gemrc file:

gem: --user-install

install-command still tries to install gems in the system directory, unlike gem install.

@sent-hil

I think it's because Gem::DependencyInstaller.new link which used to install the gem within pry doesn't take into consideration gemrc files.

One idea is to use Gem::ConfigFile.new link to get/parse .gemrc files and manually set the gempath from that to DependencyInstaller. Of course we could parse it manually since it's just an yaml file, but this seems easier.

Suggestions/comments?

@ghost

@sent-hil Yes, that sounds like a good approach. FWIW DependencyInstaller accepts many options, one being install_dir & another being user_install. I think we want to hook into user_install.

@sent-hil

@robgleeson cool, will use that. Should I assume gempath option in .gemrc accepts only one path? I see some examples online with multiple paths, not sure how to handle that.

@Mon-Ouie Could you post your .gemrc?

@sent-hil

sent-hil/pry@a848d62 : this works, but I don't like the doubles ifs.

Also, there're no tests for gem-install?

@sent-hil

@kyrylo Err, I think I read the bug report wrong. I assumed gempath was specified in .gemrc and gem-install was ignoring that. Will see how --user-install is being used by rubygems.

@sent-hil

Can I get a code review on this? sent-hil/pry@c58ad08

If someone knows a better way to do last spec, we can remove the minitest depedency.

Thanks!

@kyrylo
Collaborator

@sent-hil, you shouldn't have deleted your repository.

@kyrylo kyrylo was assigned
@kyrylo kyrylo referenced this issue from a commit
@kyrylo kyrylo Command::InstallCommand: honor ".gemrc" switches
Fix issue #666 (install-command doesn't seem to honor gemrc)

Also, prettify various messages from "install-command".
1a51468
@kyrylo kyrylo closed this
@kyrylo kyrylo referenced this issue from a commit
@kyrylo kyrylo Command::InstallCommand: honor ".gemrc" switches
Fix issue #666 (install-command doesn't seem to honor gemrc)

Also, prettify various messages from "install-command".
5ff295c
@ghost Unknown referenced this issue from a commit
@kyrylo kyrylo Command::InstallCommand: honor ".gemrc" switches
Fix issue #666 (install-command doesn't seem to honor gemrc)

Also, prettify various messages from "install-command".
bd1eeed
@strcmp strcmp referenced this issue from a commit
@kyrylo kyrylo Command::InstallCommand: honor ".gemrc" switches
Fix issue #666 (install-command doesn't seem to honor gemrc)

Also, prettify various messages from "install-command".
074fe0e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.