简体   繁体   中英

ruby on rails PIK gemset like RVM gemset?

I've worked with RVM where I can get gemset's and stuff, but there's no way of getting it with PIK? any idea? I tried looking for a solution but couldn't find one. Hopefully someone has any clue on this issue?

Thanks!

As refer to below link we can use pik on windows instead of rvm as a workaround:

https://github.com/vertiginous/pik/issues/16#issuecomment-3515658

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!

This may useful for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM