jruby

Using cucumber with jruby

I'm working on my company's intranet with cucumber 0.8.5 gherkin 2.1.5 And I'm trying to switch from using ruby 1.8.7 to jruby 1.5.1 However, whenever I try to run cucumber from jruby, I get an error: % jruby -S cucumber /usr/local/src/jruby-1.5.1/lib/ruby/site_rub/1.8/rubygems/custom_require.rb:31:in `require': no such file to lo...

Jruby socket error

Hi all! I'm useing netbeans and Jruby. When I want to build a project I got the following message: SEVERE: library `socket' could not be loaded: java.lang.LinkageError: loader (instance of java/net/URLClassLoader): attempted duplicate class definition for name: "org/jruby/ext/socket/RubySocket" Can anybody help to me what could be th...

typing bin/jruby -S rails myapp I get the output telling me how to use the rails command?

I insalled jruby, and when I type: > bin/jruby -S rails myapp I get: bin/jruby -S rails myapp -d mysql Usage: rails new APP_PATH [options] Options: -r, [--ruby=PATH] # Path to the Ruby binary of your choice # Default: /Users/snad/dev/jruby/jruby-1.5.2/bin/jruby -d, [--database=DATABASE]...

How do I package a rails as a standalone executable.

I've been developing a web application and a lot of customers are asking if they can host the application in their network (for security reasons). I have been looking for a way to package up a rails app into a single executable (with server and all), but haven't been able to find anything. My other requirement is that we distribute it ...

is there any hack to get around jruby( on rails)'s being so slow to start?

Possible Duplicate: How to improve jRuby load time? When developing a site using jruby on rails I find it quite annoying that every time I invoke jrake db:migrate or rails g migration I have to wait a few seconds for the java engine to start... $ time rails -v Rails 3.0.0 real 0m6.947s user 0m10.590s sys 0m0.230s ...

celerity submit form by pressing enter

Hi, I'm trying to use celerity to submit a form. This form has a generated link that is called when the user hits the enter button. How do I trigger this? I know you can submit by finding the link / button and pressing .click(). But I want to submit by pressing enter. I noticed that celerity form objects has a: (Object) submit Submi...

can HTTP multipart/mixed xml part be converted to a Hash when mixed with other parts.

The question is just above the last code snippet. Thank you. (environment details are the end ) posts_controller.rb class PostsController < ApplicationController def create @post = Post.new(params[:post]) respond_to do |format| format.xml { render :xml => @post.to_xml(:include => [ :assets])} end end posts.rb class P...

Compile a jruby on rails application to a jar?

Is there a quick way to pack a jruby on rails application into a jar? Is there an ec2 on rails like virtual appliance for jruby on rails apps? ...

How does JRuby resolve gem paths in a jar file?

I've packaged a custom gem into a jar file which is being referenced by a JRuby script. I'm getting the following error: org.jruby.rack.RackInitializationException: JAR entry gems/sinatra-linkedin-auth-0.0.1-java/lib/sinatra/linkedin-auth.rb not found in /Users/bhaidri/code/nextgen-ui/dist/darwin-war/exploded-war/WEB-INF/lib/linkedin-g...

Fastest SAX-style XML parsers for JRuby

I need to port some simple Ruby program to Windows, and I thought I'd use JRuby to avoid most of the hassle, but there's no libxml for JRuby. What should I use instead? I have gigabytes of XML to process, so I'd prefer if it was fast. ...

JRuby pretty XML generation

Is there any standard-ish library or gem I could use with JRuby for pretty-printing XML documents (newlines, indentation etc.) ? Whitespace is significant on some elements and irrelevant on most, but I need some way to control this; and I need to process gigabytes of XML this way, so it would be nice if it was fast. ...

Super-simple GUIs in JRuby

I'm porting Unix-land Ruby script to JRuby and Windows, and I need to give it very simple user interface. What I need is just selecting input file, select output directory, a few checkboxes or such trivial options, and big process button. There is no UI in Unix version, as this is trivial command line business in Unix world, but command...

How to package JRuby programs for Windows as one-click executables

I'm porting a Ruby program to Windows, and I really need a super-simple package - something that user downloads, unzips, doubles clicks the obvious program file, and it's running. Without having to install JRuby, or even Java if it's possible. Or possibly downloads, runs installer, confirms a few silly questions, and selects obvious pro...

jruby rails 3 and warbler

I am trying to make a deployment war. I have the jdbc-mysql, activerecord-jdbcmysql-adapter and warbler gems installed. I have edited config/database.yml and changed the adapter to jdbcmysql... but I can not even run warble config without getting this error message: Could not find gem 'mysql2 (>= 0, runtime)' in any of the gem sources....

Does jruby compile down to the same bytecode as a java app? can it be obfuscated then?

If jruby can run on tomcat, I'm guessing it compiles down to the same bytecode that a regular java web app would? Does this mean I can use existing obfuscation tools that exist in the java market and use it on a jruby (ruby on rails) web app? ...

jRuby: How to correctly purge old interpreted code?

I've been testing out JRuby as a possible integrated language to a larger system, but I've run into a problem: heap space. Specifically, JRuby holds on to all the objects it uses when parsing code. I'm not talking about perm space here - there are large quantities of org.jruby.internal.runtime.methods.InterpretedMethod instances building...

JRuby: Create Java InputStream or byte[] from RubyString

I have a Java method I want to call from JRuby. The argument I want to pass is just a normal string (org.jruby.RubyString), but the Java method is overloaded to take either: java.io.InputStream byte[] com.google.protobuf.ByteString What's an easy way I can convert my string to an instance of one of those classes? ...

JRuby on Rails app on and JBoss 4.2.0/Tomcat 5.5

My JRuby on rails app works fine on Tomcat 6.0, But when I deploy it on my company's webfarm which is JBoss 4.2.0/Tomcat 5.5 (Servlet API 2.4) It fails with the following stack trace: java.lang.ArrayIndexOutOfBoundsException: 0 at com.kenai.jaffl.provider.jffi.AsmLibraryLoader.generateBufferInvocation(AsmLibraryLoader.java:548) at com....

Accessing private members of an outer class in an inner class: JRuby

I am not able to access an instance variable of the outer class in the inner class. Its a simple swing app that i am creating using JRuby: class MainApp def initialize ... @textArea = Swing::JTextArea.new @button = Swing::JButton.new @button.addActionListener(ButtonListener.new) ... end class ButtonListener def ...

Best dynamic language to pair with Java on a Java project

What is the best dynamic language to pair with Java on a large Java project? We are considering using a dynamic language for tests, controllers, services. Some options are Groovy, JRuby or Jython. What are the pros and cons of each for this? Ideally we'd be able to call Java from the dynamic language as well as call the dynamic langu...