Named Gem sets #16

Open
vertiginous opened this Issue Sep 29, 2009 · 12 comments

Projects

None yet

7 participants

@vertiginous
Owner

RVM supports this:

http://rvm.beginrescueend.com/gemsets/

this would simply set a different GEM_HOME, if given the -m switch.

@charley

Just installed pik for this exact reason. Same version of ruby, one with "clean" gems and one with a whole lot of added and updated gems. I can't add them both to pik, since it appears to be keying off of the actual ruby version string. This seems to be a good feature to have.

@vertiginous
Owner

This isn't going to make it into the next release, but I'll get it in in the following release.

@vertiginous
Owner

In the interim, you could try something like this (untested):

In your current version, run

>pik config gem_home=C:\some\path
>gem install list of clean gems

when you're done testing:

>pik default

Let me know if it works for you.

@vertiginous
Owner

I left out a step:

>pik config gem_home=C:\some\path
>pik switch 186 #   (same version)
>gem install list of clean gems
@charley

ok cool deal, i'll definitely try it out, thanks for the quick response, and great work on the project

@vertiginous
Owner

I've started a gem_sets branch to work on this. I want to make Pik's gemsets compatible with RVM, so that you can develop on Windows, and deploy to Linux.

So, if your project were called pufferfish:
pik gems pufferfish
gem install lots of cool gems
pik gems dump

Then on the linux box:

rvm gems load pufferfish.gems
@jethar

I like this tool quite a lot. Any updates on teh progress of gem sets support. Is it available in pik now

@andrewcrook

I would love to see this feature

@nathanprobst

In case anyone is interested, I've just tried a simplistic work-around. So far, so good...

cd %HOMEPATH%\.pik\rubies
xcopy /s Ruby-193-p0 Ruby-193-p0@<gemset-name>

Now edit %HOMEPATH%.pik\config.yml, cloning the entry you copied from and adding the "@" where appropriate:

"193: ruby 1.9.3p0 (2011-10-30) [i386-mingw32]": 
  :path: !ruby/object:Pathname 
    path: C:/Users/Nathan/.pik/rubies/Ruby-193-p0/bin
"193@<gemset-name>: ruby 1.9.3p0 (2011-10-30) [i386-mingw32]": 
   :path: !ruby/object:Pathname 
    path: C:/Users/Nathan/.pik/rubies/Ruby-193-p0@<gemset-name>/bin

Then at the command line...

pik list
* 193: ruby 1.9.3p0 (2011-10-30) [i386-mingw32]
  193@<gemset-name>: ruby 1.9.3p0 (2011-10-30) [i386-mingw32]

pik switch 193@<gemset-name>

pik list
  193: ruby 1.9.3p0 (2011-10-30) [i386-mingw32]
* 193@<gemset-name>: ruby 1.9.3p0 (2011-10-30) [i386-mingw32]

That's it! Of course, YMMV. Post back if you improve this on this hack!

@EdJones

Thanks, nathanprobst! That was sweet and easy; seemed to work. (Takes awhile, and adds 86MB per 3.2 gemset, but...works!)

@Foxandxss

This feature would rock. I tried the above trick but I have doubts:

My rails instalation is in C:\Ruby193 and C:\Ruby193\bin is on the path. How do you have ruby on that folder? And how to copy your ruby installation and make it works? Because you have your path for one instalation, so.. do I need to set the path for every new ruby installation?

@EdJones

Foxandxss, nathan's solution has worked just as advertised.

The one thing is, some gems will require devkit. If you use it, you'll also have to add the new ruby location to the \devkit\config.yml

- C:/Ruby187
- C:\Users\Ed\.pik\rubies\Ruby-192-p136
- C:\Users\Ed\.pik\rubies\Ruby-193-p0
- C:\Users\Ed\.pik\rubies\Ruby-193-p0@cf32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment