Archive for the ‘JRuby’ Category
Rubyme opens its doors. August 20th, 2008
I have been working long hours getting this site up and running. The concept was initially drafted after some tutoring work I had done and the difficulty I had in coordinating everything. If you have not yet figured out, the site is called Rubyme (www.rubyme.net). The goal of the site is to provide an easy way for users to find help on anything from specific project difficulties to a more typical tutor style. Currently many of the features are still under heavy development, but the basic functionality is there. I encourage you to sign up and become a tutor. It is a great way to make some money, get exposure, and learn. There will be ongoing patches, so please report any problems to my email address: justin.smestad@gmail.com
Tags: help, Merb, Rails, Ruby, rubyme, tutor
Posted in Development, JRuby, Merb, Rails, Ruby | Comments (0)
JRuby & JTestR in Eclipse August 11th, 2008
Continuing my rampage upon the JRuby community, I have achieved beautiful success with running my tests inside of the eclipse IDE as a JUnit test. Now I have limited knowledge in the JUnit realm and encourage those to improve upon my approach.
In your eclipse Package Manager sidebar, Right Click -#> Run As.. -#> Run Configurations. Go ahead and select ‘JUnit’ and hit the ‘New Launch Configuration’ button.
Fill in the configuration as follows:
* Run a single test Project: your-project-name Test class: org.jtestr.ant.JtestRSuite
Now just open the ‘Arguments’ tab and inside the ‘VM arguments:’ box
-Djtestr.junit.tests=rspec_tests
rspec_tests is the folder where my tests are stored, feel free to change this to something like /test/jtestr/funny_test or whatever structure you store your files in.
I am still trying to figure out a more effecient way to get these test to run under eclipse. Till than I can always fall back on this approach as well as the standard ant task.
Tags: ant, JRuby, JtestR, junit, jvm, RSpec
Posted in Development, JRuby, RSpec | Comments (1)
JtestR - alive and kicking August 10th, 2008
Last week I posted about my JtestR problems and the lack of any solution. Well after some generous help from Ola Bini, JtestR’s lead developer, we found the problem. Apparently, you cannot run your Java application with the jtestr.jar file inside the root directory. The jar must be placed within a subdirectory, otherwise your Ruby runtime will try to include the JtestR.jar file through its require ‘jtestr’ statement. Its an odd quirk, with an easy workaround. Ola Bini has said its fixed in the latest trunk build, but to use the workaround until 0.4 comes out. I would like to thank him for all his help troubleshooting this issue. Cheers!
Tags: JRuby, JtestR, junit, jvm, RSpec, Ruby
Posted in JRuby, RSpec | Comments (0)
JtestR woes. August 7th, 2008
At work, all of our test and behavior driven development is done through the Fit libraries and an application layer called FitNesse. Now these are two tools that really fill a much needed void in the Java development world, however being an avid Ruby supporter I know that is far from the best. I decided to try RSpec and see if it had the chops to replace the dated and lacking Fit library.
It took about a day’s worth of google searching to find the best plan of action. Originally, I wanted to wire up JRuby and RSpec myself, but it seemed to involve too many hoops to be a viable option. Then I ran into JtestR thinking that it would be the end-all solution to my Java testing troubles. I was wrong.
The two days spent trying to get JRuby and JtestR to play nice with my Java project has culminated into an amazingly cryptic stack trace:
[junit] Exception in thread "main" java.lang.RuntimeException: Exception while running
[junit] at org.jtestr.JtestRRunner.execute(JtestRRunner.java:97)
[junit] at org.jtestr.ant.JtestRSuite.run(JtestRSuite.java:376)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:289)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:656)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:558)
[junit] Caused by: org.jruby.exceptions.RaiseException
[junit] Test org.jtestr.ant.JtestRSuite FAILED
Now begins the adventure of asking JtestR’s lead developer, Ola Bini, for help. It seems he is not entirely sure why this problem is occurring which is not very comforting, when I am pitching RSpec as a test replacement for Fitness in a few weeks. I will keep you posted with updates, feel free to follow the mailing list.
Tags: debug, Fit, Fitnesse, Java, JRuby, JtestR, RSpec, stack trace
Posted in JRuby, RSpec | Comments (3)


