2

I am using windows 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!!!

Kranthi
  • 1,377
  • 1
  • 17
  • 34
  • Refer to this answer: http://stackoverflow.com/questions/3648744/how-to-have-multiple-versions-of-ruby-and-rails-and-their-combinations-on-window/3648801#3648801 – Harish Shetty Jul 21 '11 at 15:59

3 Answers3

3

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.

Jijo
  • 151
  • 7
0

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)

Ray Oei
  • 1,827
  • 1
  • 17
  • 21
0

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