pik icon indicating copy to clipboard operation
pik copied to clipboard

Named Gem sets

Open vertiginous opened this issue 14 years ago • 12 comments

RVM supports this:

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

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

vertiginous avatar Sep 29 '09 13:09 vertiginous

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.

charley avatar Oct 08 '09 17:10 charley

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

vertiginous avatar Oct 08 '09 17:10 vertiginous

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 avatar Oct 08 '09 17:10 vertiginous

I left out a step:

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

vertiginous avatar Oct 08 '09 17:10 vertiginous

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

charley avatar Oct 08 '09 20:10 charley

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

vertiginous avatar Nov 08 '09 18:11 vertiginous

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

jethar avatar Aug 16 '10 14:08 jethar

I would love to see this feature

andrewcrook avatar Jul 29 '11 10:07 andrewcrook

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!

nprbst avatar Jan 16 '12 18:01 nprbst

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

EdJones avatar Feb 05 '12 22:02 EdJones

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?

Foxandxss avatar Feb 16 '12 22:02 Foxandxss

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

EdJones avatar Feb 17 '12 01:02 EdJones