Note: this is content from ÜberConf   2012. Please find current event information on our home page.

Platinum Sponsors

Gradleware Heroku Contegix

ÜberConf 2012 Brochure - Download


Westin Westminster
Westin Westminster
10600 Westminster Blvd
Westminster, CO   80020
Map »

Proud Supporter of:


jRuby Workshop

The last decade has seen an explosion in the number of languages targeting the Java runtime. Amongst these, one of the (arguably) strong contenders is JRuby - a 100% Java port of the Ruby language. Ruby aims to make programmers "happy", and with JRuby you can find happiness without having to leave your favorite runtime! JRuby also provides deep integration with Java, allowing you to leverage existing Java libraries while writing code that is succinct, elegant and beautiful.

In this hands-on workshop we will talk about JRuby the language, explore it's syntax and constructs like classes and modules. We will discuss advanced topics like meta-programming and domain specific languages, see how we can write Java applications without writing Java code, and some potential gotchas.

Feel a sense of elation? Already rubbing your hands in glee? Well look no further than this workshop - with lot's of examples and practice code (read: bring a laptop) to work with, you will certainly walk away feeling a sense of euphoria.


Workshop Requirements

This session is a workshop. Please come prepared.

JRuby Workshop Setup

Java

  • Have Java 1.6+ installed
  • To check this simply fire up a command line prompt and run java -version. This is what shows up on my computer

    $ java -version java version "1.6.0_31"
    Java(TM) SE Runtime Environment (build 1.6.0_31-b04-415-11M3635) Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01-415, mixed mode)

  • If you don't have Java installed (or pre 1.6) you can download it here

  • Make sure to run java -version on the command line after installation to make sure that you PATH is set up correctly

JRuby

  • You can download JRuby here
  • NOTE - JRuby 1.7 can leverage some of the newer JVM instructions such as invokeDynamic so it works best with Java 1.7. For this workshop JRuby 1.6.7.2 will also work.
  • After installation, fire up a command prompt and run jruby -v to make sure that your PATH is set up correctly. This is what shows up on my computer

    $ jruby -v
    Listening for transport dt_socket at address: 5005
    jruby 1.6.5.1 (ruby-1.9.2-p136) (2011-12-27 1bf37c2) (Java HotSpot(TM) 64-Bit Server VM 1.6.031) [darwin-x8664-java]

  • Note that it says ruby-1.9.2 as the Ruby version it is using.

  • If it does not say ruby-1.9.2 try export JRUBY_OPTS="--1.9" on your command line and then try jruby -v again. This will force JRuby to be Ruby 1.9 compatible.

RVM or rbenv Users (Mac OSX only)

  • You can follow the instructions here to install JRuby alongside any other Rubies you might have installed.
  • Once again, if running jruby -v does not show it as using Ruby 1.9 then try export JRUBY_OPTS="--1.9" and run jruby -v again.

Editor

  • Have any editor installed that you like, and that preferably understands Ruby syntax. Here are a few options (I am personally inclined to - SublimeText and emacs - Both work across all operating systems)

Directory setup

  • Create a directory called jRubyWorkshop (or something like that) somewhere on your computer. Avoid white space in your directory path if you can. C:\jRubyWorkshop is preferable to say C:\Documents and Settings\jRubyWorkshop. For Mac and Linux users anything under your home directory will work.
  • cd to the newly created directory, and create a new file called test_jruby_install.rb. Open it in your favorite text editor and type in the following line

    puts "You have JRuby working with #{RUBY_VERSION}. Woohoo!!"

  • Save the file, go back to the command line, make sure you are in the right directory, and run jruby test_jruby_install.rb. You should see

You have JRuby working with 1.9.2. Woohoo!!

  • You can delete this file if you wish.
  • Now, within the jRubyWorkshop directory, create a lib directory, and a src directory.
  • This is what your tree should look like

    .

    • jRubyWorkshop/
      • lib/
      • src/

iText

  • Awesome. We are almost done. Download iText jar from here, unzip it and put the itextpdf-5.2.1.jar file in your newly created lib directory under the jRubyWorkshop directory.

Feeling ambitious?

  • If you feel like playing around with Ruby prior to coming to the workshop, head over to tryruby.org - It only takes 15 mins :)

Done! Now you are all set for our workshop. Hope to see you guys soon!


About Raju Gandhi

Raju Gandhi

Raju Gandhi is a Java/Ruby developer and a programming language geek. He has been writing software for the better part of a decade in several industries including education, finance, construction and the manufacturing sector. Raju has a graduate degree in Industrial Engineering from Ohio University. In his spare time you will find Raju reading, or watching movies, or playing with yet another programming language. He is affectionately known as looselytyped on Twitter.

More About Raju »



Blogs

Alan Shalloway

Day 15 of 100 Know You Are Managing Time to Market & How To Do It

Posted By: Alan Shalloway on May. 17, 2013

Continuing with the 100 Things You Must Know to Be Effective In Software Development The purpose of development/IT is to deliver value quickly - not just for a team, but for the entire organization. If you reflect on this, it's not about going fast, it



Alan Shalloway

Day 14 of 100 There is more than customer value

Posted By: Alan Shalloway on May. 15, 2013

Continuing with the 100 Things You Must Know to Be Effective In Software Development While adding value to the customer is the ultimate goal, there is more than customer value. There are actually at least five different types of business value: knowing



James Ward

Auto-Refresh for Play Framework Apps

Posted By: James Ward on May. 15, 2013

Over this past weekend I built a little tool for Play Framework app developers which auto-refreshes an app in Chrome when the source code or static assets change. Check out a video demonstration: For information on how to set it up, check out the proje



James Harmon

Android Panel and Kiosk Apps

Posted By: James Harmon on May. 14, 2013

One advantage of doing business in the Chicago area is getting to see lots of manufacturers.  The Midwest still builds stuff.As an Android developer who gets to talk with many of the local companies I've recently noticed a pattern in the Android sp



Alan Shalloway

Day 13 of 100 Systems Thinking From Individual to Organization

Posted By: Alan Shalloway on May. 14, 2013

Hi everyone.  To pick the pace back up I'm going to write either shorter blogs or, as in today, I will take some previous work and mold it into this work.  I appreciate your patience and will get things going agai



James Ward

Securing Single Page Apps and REST Services

Posted By: James Ward on May. 13, 2013

The move towards Single Page Apps and RESTful services open the doors to a much better way of securing web applications. Traditional web applications use browser cookies to identify a user when a request is made to the server. This approach is fundame



Johanna Rothman

Individuals and Interactions With Gil Broza

Posted By: Johanna Rothman on May. 13, 2013

My friend and colleague, Gil Broza, is interviewing me for his Individuals and Interactions virtual training event. My topic? “Focus Keeps You Goin



More Blogs »
 

Themes at ÜberConf

  • Architecture
  • Enterprise Java
  • Java Internals
  • Security - Enterprise & JVM
  • Cloud Computing
  • Languages on the JVM - Groovy, JRuby, Scala & Clojure
  • Java Web Frameworks - Wicket, Tapestry & SpringMVC
  • Build Systems - Maven & Gradle
  • Testing
  • Agility

 

Featured Speaker


 

Registration Includes

  • Four Day - Access Pass
  • All Meals / Snacks –duration of the symposium
  • Session Materials
  • Custom Binder
  • Wi-Fi Access
  • Great Raffle Giveaways
Register Now »
 

Location

Westin Westminster
Westin Westminster
10600 Westminster Blvd
Westminster, CO   80020
View Map