So someone at my work created a web application in JRuby a while ago, and I'm tasked with...
- Understanding the code
- Running the JRuby web application locally
- Determining whether to fix it up or rewrite it, add functionality, etc.
I'm completely new to JRuby and am kind of struggling with the basics. I'm staring at the code I pulled, containing the folders app, bin, config, lib, script, test, etc. and also containing a Gemfile, Gemfile.lock, a Rakefile, etc. I have no clue how to run this thing locally...
From what I can tell so far, there are a few interacting systems here. They are: JRuby, Ruby, Java, Rails, Gem, Rake, and Bundler. What I am struggling with is how they all work together.
JRuby - My understanding is that, with JRuby, you develop with the Ruby programming language, and it uses the Java Virtual Machine because of whatever benefits therein that I'm unaware of.
Ruby - Ruby has a framework specifically for building web applications, called Rails, which utilizes an MVC framework for ease in creating web applications. JRuby can work off of straight Ruby or Rails.
Rake - I'm not too sure what Rake is. I think it's basically Make. You call rake on a Rakefile and it can perform whatever tasks you specify.
Gem - I think gems are a way of packaging Ruby web applications (rake and bundler are gems?). I'm pretty baffled by this point. I think gem is a command line tool to package a Ruby web application, at which point you refer to it as a "gem."
Bundler - Very lost by this point. I think you define a Gemfile (unsure how Gemfile.lock is used), and use bundler to bundle all of the gems from this Gemfile together. Then you can just include all of these in your app with "require 'bundler/setup'"... although I think you have to require any gems that you defined in your Gemfile again in the app anyways?