开发者

How can i use pik in win7?

I am using w开发者_如何学Cindows for rails.I installed pik for maintaining different versions of ruby. But is there any possibility to create gemsets in PIK as in RVM?If not then how can i install different versions of rails?

Please help me..Thanks in advance!!!


Pik saved my life. I've been using rails 2.3.8 at work. I wanted to try the new rails 3.1 for my personal use. They told me to install RailsInstaller. But that screwed up all my rails 2.3.8 settings. So here's what I did.

  1. I went to rubyinstaller. Downloaded installer for versions Ruby 1.8.7-p302 and Ruby 1.9.2-p290 installed them.

  2. I installed both versions of ruby

  3. then i installed the gem pik (see https://github.com/vertiginous/pik)

  4. Now, I can switch between Ruby 1.8.7 and 1.9.2 using pik easily pik 187 (switches to ruby 1.8.7)

  5. So, I switched to ruby 1.8.7. and then installed rails 2.3.8
    gem install rails -v 2.3.8

  6. then i said pik 192 which switched the ruby to 1.9.2. Then i said gem install rails -v 3.1.0

  7. Now to use rails 2.3.8 all I have to do is say pik 187. Not only it switches ruby to 1.8.7 it also switches rails to 2.3.8

I am not a Ruby or Rails expert. But the key to remember is that you need to have the right Ruby version selected while installing rails. Meaning, if you're installing rails 3.1.0 make sure your current ruby version is 1.9.2 or higher or whatever version rails 3 works on. Similarly if you want to install rails 2.3.8 make sure your current ruby version is 1.8.7

Hope this helps. And people won't lose sleep because of this, like i did.


As far as I know, pik doesn't have this feature (yet).


As PIK is no longer maintained, see this commit comment. I would suggest to checkout URU to have version support in Windows (also supports linux and OSX)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜