“Rails Installation on windows”

rails, Uncategorized

Problem : JSON not installable on WINDOWS , when we do bundle install

Solution :

Assuming you have Ruby and Ruby gems installed
> my current platform: ruby-1.8.6. From the command prompt, type:
gem install pik
> After the successful installation of pik, type:
pik_install C:tools
> Add this to your Path Environmental variables (My Computer > Right Click > Properties > Advanced System Settings > Environmental Variables > Path)

Once you’re done. Open a new command prompt and type:
pik list
It will add the current version of ruby into the list.
Now what’s so special about pik? How it can handle the multiple versions? To see that in action, in command prompt, type:
pik install ruby 1.8.7
pik install ruby 1.9.2
Similarly you can do for 1.9.2

pik list
It will show you the current version of ruby and the other ones.

pik use 187
pik use 192

depending on which version to use

ruby -v
now you can have multiple ruby versions on windows also

Time to install Ruby Devkit

Download  – http://rubyinstaller.org/downloads/

Install under C:/devkit

After extraction, open your command, go inside C:devkit prompt and type:
ruby dk.rb init
This will create the config.yml inside C:/devkit. Now you need to define all the Ruby versions inside that file, so that devkit will create native extensions for them. To do that, open that file and at the end of it, write these lines:
– C:ruby
– C:UsersPC-name.pikrubiesRuby-187-p330
– C:UsersPC-name.pikrubiesRuby-192-p0
Once done save it and from the command prompt, type:
ruby dk.rb install

Now you can do
your bundle install
or rails install

and it should work properly


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s