ruby on rails PIK gemset like RVM gemset?

。_饼干妹妹 提交于 2019-12-11 04:33:23

问题


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!


回答1:


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.



来源:https://stackoverflow.com/questions/15794915/ruby-on-rails-pik-gemset-like-rvm-gemset

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!