jruby

Which ruby interpreter are you looking forward to?

There are multiple Ruby implementations in the works right now. Which are you looking forward to and why? Do you actively use a non-MRI implementation in production? Some of the options include: Ruby MRI (original 1.8 branch) YARV (official 1.9) JRuby Rubinius IronRuby MagLev (Thanks Julian) ...

Problem installing warbler gem on linux

> jruby -S gem install warbler JRuby limited openssl loaded. gem install jruby-openssl for full support. Successfully installed warbler-0.9.11 1 gem installed Installing ri documentation for warbler-0.9.11... Installing RDoc documentation for warbler-0.9.11... > jruby -S warble <snip>/jruby-1.1.4/bin/warble:1: undefined method `warble' f...

UI design alternatives with Groovy/JRuby/Jython or other JVM languages ?

For a developer in the Java eco-system, there is a handful of choices when it comes to UI design. The best known are: Swing (preferred when used with Netbeans and its GUI builder) Eclipse's SWT (mostly preferred for Eclipse plug-ins) Now, are there any frameworks or design alternatives to this which target JRuby / Groovy / Jython or ...

Is it possible to compile a Rails app to a Java VM JAR file?

Essentially the only thing I can deploy to my deployment machine is a JAR file. I can't install JRuby, nor can I install Glassfish or Tomcat. Is it possible to package up a Rails application (including Rails, vendored, of course) to a JAR file such that I can do c:\my_server> java rails_app.jar and have it run WEBRick or Mongrel wit...

Differences between Ruby VMs

What are the advantages/disadvantages of the major Ruby VMs (things like features, compatibility, performance, and quirks?) I know there are also some bonus features like being able to use Java interfaces through JRuby, too. Those would also be helpful to note. Does any VM have a clear advantage at this point, and in what contexts? ...

How do I find my PID in Java or JRuby on Linux?

I need to find the PID of the current running process on a Linux platform (it can be a system dependent solution). Java does not support getting the process ID, and JRuby currently has a bug with the Ruby method, Process.pid. Is there another way to obtain the PID? ...

How can I determine if a different process id is running using Java or JRuby on Linux?

I need to see if a given process id is running, and it must work in either Java or JRuby (preferably a Ruby solution). It can be system dependent for Linux (specifically Debian and/or Ubuntu). I already have the PID I am looking for, just need to see if it is currently running. UPDATE: Thanks for all the responses everyone! I appr...

What's the best way to deploy a JRuby on Rails application to Tomcat?

I'm looking at ways to deploy a Ruby on Rails app (running on JRuby) to a Tomcat instance for testing. The tomcat instance is running on a Solaris server that I can SSH to. I've looked at using Capistrano, but there doesn't seem to be a lot out there about using it to deploy to Tomcat, or even about running it under JRuby, and I keep hi...

JRuby on Rails vs. Ruby on Rails, what's difference?

I'm looking to try out JRuby and JRuby on Rails. I'm having trouble finding information on what's difference between JRuby on Rails and Ruby on Rails. What's the differences I need to look out for? ...

Preserving JRuby gems between upgrades

When installing one of JRuby's frequent upgrades, I need to re-install my gems, as they normally reside in the jruby install directory. I know it doesn't have to be this way. Could someone post some instructions or point to a web page on how to avoid this? Keep in mind, I'm not wanting to share gems with a C-Ruby install. Just share ...

Groovy advantages over Jython or Jruby?

Why would I choose to use Groovy when I could use Jython or Jruby? Does the language provide any inherent advantages to make up for the fact that Jython and Jruby skills are applicable to their parent languages outside of the JVM? Keep in mind that I purposely keeping this question generic, but if there are any advantages that exist in...

JRuby and Java objects

Please tell me if it's possible to do the following thing : create an instance of a specific class in Java pass it to JRuby to do something with it continue using the "modified" version in Java Please provide a small working example if it's not too much to ask . EDIT : turns out embedding was the simplest way to achieve this . More ...

Rails Schema creation problem

I am using Jruby and rails 2.2.2. My problem is I have a migration that is not being correctly written to the database schema. Here is my migration: class CreateNotes < ActiveRecord::Migration def self.up create_table(:notes, :options => 'ENGINE=MyISAM') do |t| t.string :title t.text :body t.timestamps e...

Java/JRuby on Rails vs .NET 3.5... feel like I'm doing it wrong

I'm planning to develop a web-services (SOAP to C++ client) in Java with Metro/Hibernate and front it up with a web-site written in JRuby on Rails, connecting Java modules through JRuby and generally through a database. I already wrote some code and set up everything. Now, I've heard that .NET 3.5 is really powerful and after some read...

Can I import Java class files into JRuby?

The documentation seems to suggest that in order for me to import Java classes into JRuby, that they must be in a JAR file: "In order to use resources within a jar file from JRuby the jar file must either be on the classpath or you can make it available with the require method" (http://wiki.jruby.org/wiki/Calling_Java_from_JRuby#Require...

JRuby on Rails deployment

I need to host a JRuby on Rails app on Mongrel. The problem is that I need to support mutual authentication. I know that I could just host it behind a Apache with mod_proxy use mod_ssl to pass the cred or part of the cred as a request header to rails. But I want the whole stack to be Java. Is there a Java application server that can do m...

Conditional gem dependencies

Is it possible to conditionally set a dependency on a gem at install time? Here's my situation which will hopefully clarify the question. There is a gem I maintain that depends on the json gem. However, I frequently use jruby which has a port of the json gem that's called json-jruby. To work around this I have to build two separate gems...

Asynchronous alarm signal

I'm looking for a portable interface to POSIX alarm(2) (or similar) in Ruby. That's to say, I would like to be able to set a background timer to send a signal to the current process after n seconds. I have found some good discussion from 2006 on the ruby-talk list that provides a solution using dl/import, but that's a bit of a hack (alb...

JRuby vs YARV performance ---notable difference?

I've read that the latest version of the Ruby interpreter (YARV) will have substantial performance improvements due to bytecode compilation. My question is has anyone tried running this against JRuby? Any noticable differences in execution on Windows? This link had some good metrics but most were run on Linux...http://antoniocangiano.co...

how to configure tomcat to handle rhtml pages using jruby?

How can I configure tomcat to handle .rhtml pages with jruby? I guess I should mess around with the web.xml file, but I don't know how... (ideally, without rails, just the necessary stuff to use erb for rendering rhtml pages...) ...