I'm trying to stand up a JRuby/Ruby-on-Rails environment on a Windows VM. As a result, I installed Ruby, Rails and the items from the RailsInstaller download. I then installed JRuby. Everything installed and I see both when I do jruby -v
and ruby -v
.
How do I get my Rails project to recognize JRuby instead of Ruby? Can I achieve this without installing RVM? Should I just install RVM on the Windows VM (which I was trying to avoid, but, maybe I shouldn't)? Do I just put a line in the Gemfile
?
(My very limited experience with JRuby/Ruby-on-Rails is with using RVM on a Unix environment.)
Here's my output when I do a gem env
:
RubyGems Environment:
- RUBYGEMS VERSION: 2.1.9
- RUBY VERSION: 1.9.3 (2014-09-25 patchlevel 392) [java]
- INSTALLATION DIRECTORY: C:/jruby-1.7.16/lib/ruby/gems/shared
- RUBY EXECUTABLE: C:/jruby-1.7.16/bin/jruby.exe
- EXECUTABLE DIRECTORY: C:/jruby-1.7.16/bin
- SPEC CACHE DIRECTORY: C:/Users/user/.gem/specs
- RUBYGEMS PLATFORMS:
- ruby
- universal-java-1.7
- GEM PATHS:
- C:/jruby-1.7.16/lib/ruby/gems/shared
- C:/Users/user/.gem/jruby/1.9
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- "install" => "--no-rdoc --no-ri --env-shebang"
- "update" => "--no-rdoc --no-ri --env-shebang"
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- C:\Windows\system32
- C:\Windows
- C:\Windows\System32\Wbem
- C:\Windows\System32\WindowsPowerShell\v1.0\
- c:\jruby-1.7.16\bin
- C:\RailsInstaller\Git\cmd
- C:\RailsInstaller\Ruby1.9.3\bin
- C:\Program Files\jruby-1.7.16\bin