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

installing gems from git references #15

Open
koenhandekyn opened this issue Sep 17, 2012 · 3 comments
Open

installing gems from git references #15

koenhandekyn opened this issue Sep 17, 2012 · 3 comments

Comments

@koenhandekyn
Copy link

when using Bundler, from a Gemfile it's easy to specify a git reference for a gem (as well as local references, http, etc).

would you consider adding support to slimgems to allow installation of a gem from a git reference directly ?

if you like the idea, i can take a look at the code and propose a pull request.

@lsegal
Copy link
Contributor

lsegal commented Sep 19, 2012

Well, yes and no. I do like the idea, but Bundler already exists and can do this. There is an argument for having this behaviour built-in to Ruby, but given that you already have to gem install slimgems, you can just as easily gem install bundler for that support.

I wouldn't be opposed to a pull request, but note that it would likely not be trivial, and likely take a lot of review to make sure we're not inadvertently breaking anything. This would be a fairly big change to internal code AFAIK.

@koenhandekyn
Copy link
Author

Indeed bundler has the functionality, the main drawback is you need a (temporary) Gemfile if you just want to install a gem from a git repo. Based on your estimate on the workload, as we can easily script something together as a workaround (create a temp Gemfile to trigger the install), i'll start with that, and make that available for testing and feedback, and take it then from there.

On 19-sep.-2012, at 06:59, Loren Segal notifications@github.com wrote:

Well, yes and no. I do like the idea, but Bundler already exists and can do this. There is an argument for having this behaviour built-in to Ruby, but given that you already have to gem install slimgems, you can just as easily gem install bundler for that support.

I wouldn't be opposed to a pull request, but note that it would likely not be trivial, and likely take a lot of review to make sure we're not inadvertently breaking anything.


Reply to this email directly or view it on GitHub.

@lsegal
Copy link
Contributor

lsegal commented Sep 19, 2012

Why does it need to be temporary? Having a file that specifies your dependencies is a good thing, you should definitely want to keep that file around permanently.

If you want to just one-off a gem installation from git, you don't need Bundler at all. You can write a script like the following:

#!/usr/bin/bash
git clone $2 tmp-install
cd tmp-install
gem build $1.gemspec
gem install $1
cd ..
rm -rf tmp-install

Then just ./git-gem-install gemname git://giturl

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

2 participants