jruby

jruby/activerecord-jdbc/tomcat/DB2 ready for enterprise?

I am trying to introduce RoR to my company and I have two ways of doing so in my mind: (1) rails/ibm_db2/passenger/DB2 - which is my preferable way but it is not really supported by company's infrastructure. (2) jruby/activerecord-jdbc/tomcat/DB2 - probably easier way to migrate relying on current infrastructure and java libs IF I have...

Question about deploying a JRuby script

I'm looking to replace MRI with JRuby for some scripts. Would it be enough to provide an ant buildfile and the JRuby jar for them? Would something else be needed ( beside the JDK of course )? EDIT: when I'm saying "the JRuby jar", I'm meaning jruby-complete.jar. ...

Create deployable jruby jar?

I need to compile my jruby application into a standalone jar. How can I do this? ...

java.net is moving to Jruby???

There is a post on http://kenai.com/ from Oracle's Ted Farrell which has an interesting statement: We are in the process of migrating java.net to the kenai technology. Does this mean java.net will be powered by Jruby on rails?? ...

Anyone using JRuby-Rack with Rails 3?

Is anyone else out there running Rails 3 and JRuby-Rack, or Jetty and Rails 3? Any trick to it? I'm going insane with some debugging, and at this point I just want to know that it's possible. ...

Using glassfish gem (or other webserver) with SSL

My goal is to deploy a simple rails application on a windows server using the glassfish gem. I have no trouble getting the glassfish gem to work with regular http, however I now need to add SSL security and I cannot find any links on how to enable https in the glassfish gem. Has anyone succeeded in setting up the glassfish gem to supp...

JFreeChart + JRuby - fill area between two points on domain axis

I'm using JRuby to access JFreeChart. But I can't seem to set a domain marker on the date axis... Can anyone tell me why this is not working? def create_plot rangeaxis = NumberAxis.new rangeaxis.setAutoRangeIncludesZero(true) daxis = DateAxis.new daxis.setRange( Time.at(@dataset['date_start'].to_i) , Time.at(@dataset['d...

jruby rubygems update breaks jgem

Has anyone seen this: ?? No jgem command works at all?? Though jruby -S gem list does work. I'm using jruby 1.3.1 and Sun Java6 jre root@test:/usr/local: jgem --version 1.3.3 root@test:/usr/local: jgem update --system JRuby limited openssl loaded. gem install jruby-openssl for full support. http://wiki.jruby.org/wiki/JRuby_Bui...

Should I try to reuse Ruby code in a Java project?

I'd rather not "reinvent the wheel" and I've found a Ruby project that provides functionality I need in my Java app (there is no preexisting Java project that does what I need - trust me, I've looked). So, best case scenario, I am able to run the Ruby code from my Java code (ala JSR223). However, this Ruby project depends on having seve...

Is it possible to debug unit tests in Ruby on Rails?

So, I just moved to new project that is built on Ruby on Rails. I'm new to it and I'm still learning it. I can debug most of the application code, but it seems I can not debug unit test code and code that is tested. When I run unit testing in debug mode, I can set a breakpoint in unit test class code, for example where fixtures are adde...

How can I stub out a call to super in a imported Java class in JRuby for testing

I am testing Java classes with RSpec and JRuby. How can I stub out a call to super in an imported Java class in my RSpec test? For example: I have 2 Java classes: public class A{ public String foo() { return "bar"; } } public class B extends A public String foo() { // B code return super.foo(); } } I am just t...

JRuby mysterious stack trace

I'm using JRuby 1.4.0 complete jar in one of my projects. I'm executing it from ant via the exec task: java -jar jruby1.4.0.jar script.rb script_params The thing is, on some computers I receive this: [exec] Exception in thread "main" :1: no !/ in spec (IOError) [exec] ...internal jruby stack elided... [exec] from (unknown).(unk...

Invalid SQL while Embedding HSQLDB into a Rails App

I am working on porting a Rails app to JRuby and HSQLDB. My goal is to embed a database and the site within a single JAR file for deployment at customer sites. I have the site working quite well from the JAR, with a few notable problems. When I do the following with a pretty mundane ActiveRecord model: @total = SessionLog.count(:id) ...

Ruby gems gone after after jruby install

Today I installed jruby by downloading it, extracting it to /home/james/jruby-1.4.0 and adding the following line to .bashrc export JRUBY_HOME=/home/james/jruby-1.4.0 export PATH=$JRUBY_HOME/bin:$PATH And then I installed some jruby gems via jruby -S gem install ... Jruby works fine, but this seemed to have cause two problems: 1) W...

Rake uses jruby instead of ruby after jruby install

Hi, I recently installed jruby on a machine that also has ruby installed on it. When I do rake something it now appears to be using the jruby interpreter. I'd like rake to use the ruby interpreter. I'd appreciate any help. ...

What's the easiest way to get the result of an HTTP GET request in using URL in JRuby

I'm attempting to build a Tropo Ruby application and I need to retrieve the result of an HTTPS GET. The Tropo platform doesn't have the httpclient Ruby gem so I can't use that. The Ruby engine used is JRuby so a suggestion has been to make use of the Java URL class to do the request. I've played around with it a little bit and I seem to ...

Why does jruby complain about valid java_opts

I have set my java min/max heap size to be the same as outlined in the Sun Docs for precise heap sizing using the following: -Xms768m -Xmx768m This works fine when I start tomcat, but if I run jruby from the command line it complains saying: Error occurred during initialization of VM Incompatible minimum and maximum heap sizes s...

Cannot load JRubyEngine because org.apache.bsf.util.BSFEngineImpl not found

Hi, I'm trying to use JRuby in a custom application, and I don't seem to be able to load the JRubyEngine object. My class looks like functionally similar to this: public class ScriptEngine { private static ScriptEngine engine = new JRubyEngine(); public void run(final String script, final Map<String,Object> input) { fi...

Extend Google AppEngine User in JRuby?

I'm working with JRuby and DataMapper running on Google AppEngine. I want to add a property to the AppEngine::User like :active_calendar which is a reference to a Calendar kind. I was able to do something in Python this way using a back reference. Are these possible in JRuby? Is this possible? Do I need to subclass the User? Can I even...

JRuby, interfaces and Class#allocate

I'm trying out an experiment where I have an interface in java and implementing (including) it in an ActiveRecord or DataMapper model so that I can use AR or DM as a java ORM. However, both these libraries uses #allocate instead of #new to create instances. This prevents the instance returned from the Ruby script be casted to the interf...