Any tutorials or blog are available to start with JRuby on Rails
which guide me to the installation and small JRuby on Rails application ?
I have gone through this Walkthroughs And Tutorials(https://github.com/jruby/jruby/wiki/WalkthroughsAndTutorials) link but most of the JRuby on Rails links are broken.
In a 2007 benchmark of Ruby implementations, JRuby was faster than Ruby MRI 1.8 in some tests, but YARV outperformed both of them. As of April 2014, in The Computer Language Benchmarks Game, JRuby 1.7. 4 typically has the same performance as Ruby MRI 2.1. 0, but uses more memory.
The JVM makes different performance trade-offs than MRI Ruby. Notably, an untuned JVM process has a slow start-up time, and with JRuby, this can get even worse as lots of standard library code is loaded on start-up.
JRuby and Rails Installation
The easiest way to set up JRuby is using rvm. The following command installs rvm, the latest version if JRuby, and gets the latest version of rails:
$ curl -L https://get.rvm.io | bash -s stable --autolibs=3 --ruby=jruby --gems=rails
On Windows, you can download an installer which will set up JRuby for you. You then need to install rails by running the following command:
jruby -S gem install rails
Set up a Rails project
JRuby’s wiki page JRuby on Rails is a great collection of resources on the topic; it contains in particular a link to that good blog post: http://blog.rubyrockers.com/2011/03/rails3-application-jruby/
In a nutshell, to create a rails project based on JRuby, use the following command, replacing my_app
with the name of your project:
rails new my_app -m https://www.jruby.org/templates/default.rb
Rails Development
Once your project is set up, any Rails 3 tutorial will do — it is Ruby after all!
Deployment
For deployment, have a look at:
Further Resources
Finally, it is also worth mentioning that Charles Nutter et al's book Using JRuby has a chapter dedicated to JRuby on Rails, and is an invaluable help in JRuby developments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With