Railsinstaller from railsinstaller.org ships with ruby 1.8.7 by default, but if you want to use ruby 1.9.2, these steps might help you out.
- Download and install railsinstaller (default to C:\RailsInstaller, lets call this ROOT_DIR)
- Download and install Ruby 1.9.2 from rubyinstaller.org (railsinstaller only compatible with ruby from rubyinstaller.org) to ROOT_DIR\ruby192
- Edit file setup_environment.bat on ROOT_DIR\ruby1.8.7 (you can use notepad or notepad++)
- On line 12 in setup_environment.bat, change it to: SET RUBY_DIR=C:\RailsInstaller\Ruby192
- On line 27 change the line to: SET PATH=%RUBY_DIR%\bin;%RUBY_DIR%lib\ruby\gems\1.9.1\bin;%ROOT_DIR%\DevKit\bin;%ROOT_DIR%\Git\cmd;%PATH%
- Save the file
- Open railsinstaller console from Start menu and make sure the loaded ruby version is 1.9.2 by running ‘ruby -v’ command on the console
- Still on the console, go to devkit folder on ROOT_DIR\DevKit by running ‘cd C:\RailsInstaller\DevKit’ command
- Inside the devkit folder run ‘ruby dk.rb init’
- Still inside the devkit folder, run the ‘ruby dk.rb install –force’ command (note the 2 dash before force)
- If nothing went wrong then you should be able to install the various ruby gems that’s available out there (Ex. gem install rails).
- You need to install rails gem again (and any gems that you want to use) because the default rails gem that come with railsinstaller is on the ruby 1.8.7 folder while now you’ll be using the gems in the ruby192 folder.
And that’s it, now you can enjoy railsinstaller with ruby 1.9.2 :D