JRuby on Rails with RVM ( on Fedora )
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 ).
Waseem 7:02 pm on January 29, 2012 Permalink |
Is there any specific reason installing RVM with yum instead of `$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)`?
tuxdna 5:26 am on January 30, 2012 Permalink |
Yes, coz I prefer yum instead of custom scripts
If you like the latest cutting edge RVM, you should use the script you mentioned.
Waseem 5:46 am on January 30, 2012 Permalink
I guess we are different. I love cutting edge.
Michal Papis 10:32 pm on January 31, 2012 Permalink |
you should mention just `jruby` – it will use latest version which is 1.6.6 right now – and includes lots of bugfixes and speeds improvements compared to 1.5.6
as for using yum/apt(package managers) for installing rvm – be careful, we have to support a lot of problems with the packaged version of rvm, and most of the problems is fixed in head/stable rvm
tuxdna 6:56 am on February 1, 2012 Permalink |
@Michal: Noted. Thanks