JRuby on Rails with RVM ( on Fedora )

· Read in about 1 min · (109 words) ·

First install RVM and set it up:

sudo yum install rubygem-rvm
rvm-install

To include RVM into your bash shell, add following line to ~/.bashrc:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.

Now install JRuby and use it as default Ruby interpreter:

source ~/.bashrc
rvm install jruby-1.5.6
rvm use jruby-1.5.6

Setup Rails environment:

gem install rails
gem install bundler

Lets create a new Rails application:

rails new rails-app
cd rails-app
bundle install
rails g scaffold Person name:string
rake db:migrate
rails s

Now go to http://localhost:3000/people/

Yay! Your new Rails application is up and running, powered by JRuby ( setup using RVM ).