jruby

jRuby and Problems with Warbler, RVM, and Tomcat

I've been having a tough time getting jRuby on Rails 3 deployed on Tomcat 6. I got it to work exactly once. I modified my database.yaml and Gemfile to check for jRuby, something like this: if defined?(JRUBY_VERSION) gem 'jdbc-mysql' #gem 'jdbc-sqlite3' gem 'activerecord-jdbc-adapter' gem 'activerecord-jdbcmysql-adapter'...

Accessing protected variables from parent class in JRuby

I'm trying to get at the protected variables that are defined in the parent class I have inherited from. Is this possible? I can't find any documentation saying it is. I've seen tickets that have been closed on earlier versions of JRuby. Any help would be great. Edit: To clarify public class Something { protected float somethingel...

How do set Merb / DataMapper / JRuby / Windows to accept concurrent requests?

I have my site running fine with a simple 'merb' command. I'd like to spawn multiple processes, or threads or whatever, so that a long DB request (or more often, a long PDF building request) doesn't hang everyone else on the server. I've tried to use "merb -c3", but receive an error saying Daemonized mode is not available. Any other ...

Jruby log4j integration.

Hi, I am currently working on integrating Java application General Architecture For Text Engineering (GATE) with Rails application using Jruby architecture. When we worked on integrating Jruby with log4j, I am getting following error : 0 [main] DEBUG Main.class - Hello world gate/Gate.java:80:in <clinit>': java.lang.NoClassDefFoundErr...

XML processing in JRuby without FFI?

What's the best available library right now? I don't really care about features much, as long as it provides something SAX-like at reasonable performance levels (not REXML). ...

JRuby on Rails: Using custom Java classes in your Rails app

I just started with JRuby on Rails and absolutely love it. I know how to use current classes within the Java API in my Rails app, but if I wanted to create a new custom class written in purely Java code, how would I be able to use it in my Rails app? For example, let's say I created Dog.java: class Dog { private String name; publi...

Is there an advantage to running JRuby if you don't know any Java?

I've heard great things about JRuby and I know you can run it without knowing any Java. My development skills are strong, Java is just not one of the tools I know. It's a massive tool with a myriad of accompanying tools such as Maven/Ant/JUnit etc. Is it worth moving my current Rails applications to JRuby for performance reasons alone? ...

What are some alternatives to using Tomcat for Jruby Rack apps??

We're looking at some alternatives to our Tomcat based stack for a JRuby on Rails app. So far I've read about the Trinidad gem, which is actually Tomcat based, and the Glassfish gem. I can't however for either of these find production examples. Both of them it seems allow you to just run the command on command line, which is fine fo...

What reasons would I have for not using JRuby over MRI/YARV?

In Is there an advantage to running JRuby if you don't know any Java?, people were suggesting using JRuby if you just want a better implementation of Ruby than "Ruby" (MRI/YARV). What potential reasons would you have for not using JRuby? Ones that have been mentioned by others are: Performance for short programs. JRuby is described a...

Nokogiri, different results of xpath in JRuby

Hi, I am getting different results from the same xpath expression in nokogiri when using ruby and jruby, In ruby the following xpath expression returns a node while in jruby it returns a nodeset: parent = node.xpath("./ancestor::node()[name(.) = 'div' or name(.) = 'p'][1]") Has anybody else noticed similar behaviour? Thanks Paul ...

Rawr-created jar throws ClassDefNotFoundError

I am trying to use Rawr to turn a simple 3-file Ruby project into an executable jar to be run on Ubuntu. I ran jruby -S rawr install to create the Rakefile and set up the directory layout. All my .rb files are under the src directory at the root of the project. When I run jruby -S rake rawr:jar, it compiles all the Ruby files and creates...

JRuby Debugger Options with simple text editor

Hi, I am developing JRuby on textmate, do I have any debugger options? At the moment I am using puts which is painstaking and drawn out. Is there anyway, I can break during running code in the terminal and check values there? Cheers Paul ...

JVM languages - Ruby Vs. Javascript

Hi all, What are the strengths/weaknesses of Javascript compared to Ruby when running them inside JVM? They'll be used by the users to write code which will be run in server. So, security and performance is very important. (I only need the comparison between JS and Ruby, and there are no direct comparisons anywhere. So please don'...

Developing a Rails app in Netbeans/JRuby but deploying to Ruby (C)

I'm using Netbeans and JRuby to develop a Rails web application. But for deployment, I will be using Heroku. Since Heroku uses the Ruby-C implementation, I was wondering my use of JRuby can cause problems? Is this approach a safe thing to do? ...

JRoR: How to share memory between requests and sessions with a singleton?

For a RoR web project I am building the component stack. Because I want to share some cached business objects between requests and sessions of the same application I planned not to use the Rails/Mongrel shared nothing principle and switch over to JRuby for the first time. (No, I do not want an extra process like memcached). My idea so fa...

jRuby Glassfish v3 dispatcher error

hi all. i have ubuntu 8.10, running glassfish v3 (not prelude). first deployment of any jruby on a glassfish v3 SERVER (not the gem). i have deployed the app using the 'choose folder' method, rather than the asadmin deploy method, though i have also tried that. i get the following error message: #|2010-10-18T16:48:01.643+1100|SEVERE...

Neo4j server setup recommendations

I am setting up a Neo4j based system in jRuby running on glassfish. Glassfish as with most rails systems allows for some mechanism to run multiple instances. In glassfish case there is an internal setting for the thread pool size. My issue is that I am having problems with the Neo4j database being opened more than once and this is ...

Setting up QtJambi connections from JRuby

I've been setting up a Qt gui using QtJambi and JRuby. So far things have gone well. I'm ready to start setting up connections, however, many of the signals don't seem to be visible from jruby. For example, if I print out the methods of QPushButton, I don't see any method called "clicked" for me to build a connection from. I found ...

How to create Windows Service using JRuby?

I know we can create windows service using win32-service gem which is available in Ruby. How we can create a windows service in JRuby, is there any java-specific way which can be re-used ?? ...

How to generate bytecode in Ruby 1.9?

How can I generate byetcode from Ruby 1.9?? My intent is to generate bytecode not the source code and ship it along with my application package. I am aware of the JRuby approach but I am facing certain issues there ...