jruby

Can JRuby use original Ruby gems?

Hello, I am considering about what is the difference between JRuby on Rails and the original Ruby on Rails for my product? How does it difference in development activity, deployment, support between its original, or scalability? I have read many article. They said JRuby is the same function like Ruby. Does it mean we can use Ruby gems ...

How to use Java's JAR file with Aptana RadRail's JRuby project?

Hello, everyone. I am trying to use Aptana RadRail to work on my JRuby project. A good feature of JRuby is, able to use Java library in the world. but I try to find out how to make this happen with Aptana RadRail IDE. NetBeans is also good IDE, but I like Eclipse-styled. Could you tell me how to make this happen? Do I have to do this vi...

Using JSP tags in JRuby J2EE app

Is there a way to use JSP tags in JRuby apps deployed as J2EE apps? For example, if I have a Sinatra app being called through Rack via a JSP tag, can I use JSP tag libraries inside the Sinatra templates (e.g., Haml)? ...

Can i use Hibernate ORM framework without any restriction in Groovy and/or JRuby ?

Hi, I like Groovy/JRuby simplicity. But in order to use it, i would like to know whether Hibernate ORM framework works same way as in Java language ? Is there some limitation or restriction ? regards, ...

Warbler: Where are my images

I'm using Jruby and Warbler to deploy a Jruby on Rails application to a Tomcat server. I can see all of my images when I deploy the server with Webrick: jruby -S server/script. However, when I create a .war file out of the rails directory using jruby -S warble and deploy to Tomcat, none of my images show up on the tomcat server. I notice...

Is it possible to use jruby to write an applet or is it better to use iron ruby for silverlight?

If I wanted to dabble with ruby, would it be easier to write an applet in Jruby or a Silverlight XAP with iron ruby? So far all I have is a vague idea that it might be possible. ...

OpenSSL: JRuby only supports F_SETFL for fcntl/ioctl currently

When I attempt to use net/https with JRuby 1.3.0RC1 with the jruby-openssl-0.5.1 gem installed I get the following error: Error in JobsRequiringReportDataProcessor: JRuby only supports F_SETFL for fcntl/ioctl currently /opt/bin/jruby/lib/ruby/gems/1.8/gems/jruby-openssl-0.5.1/lib/openssl/ssl.rb:56:in `initialize' /opt/bin/jruby/lib/ruby...

Serving static content from a jarfile with Jetty?

This should be fairly easy, but for some reason nearly everything I try just seems to hand out a 'not found' error when I hook it up to a web browser. I've got a single static context, and for the ResourceBase I've got 'file:jar:/path/to/myjar!/.'... any ideas what I'm missing? ...

Getting Geographical position for a non-GPS j2me phone

Hi is there any way to get the geographical position of a non-GPS enabled phone through a j2me aplpication. I tried to use the JSR179 location API to do this, but I was only able to get it to work on a GPS enabled phone. I also read that doing this is possible on a non-gps phone by getting the cell-ID of the phone, but what do I do afte...

500 Responsecode while using warbler

I've tried to deploy a simple RubyOnRails app to tomcat app-server with the warbler gem. I simply generated a new app, with a simple scaffold and configured it to use the jdbcmysql adapter. Then i simply created and migrated the database, executed warbler and deployed the war to my local tomcat (Version 6.0.23). I can deploy the war and ...

problems with jruby version of ruby-debug

Whenever I use 'n' to step over a line it steps into it instead. This happens to me on all the versions of jruby i've tried, the latest being 1.3.1 Does it work right for anyone? If so any idea how to fix it, because it's too painful when it steps into every function every time. Also, I use it like this if it makes any difference. re...

is there implementation of ctypes(python) in Jruby?

I want to use windows apis in JRuby. Please suggest any api that can do the work of Ctypes(python). ...

Advantages of Java over Ruby/JRuby

I am learning Java. I have learned and used Ruby. The Ruby books always tell the advantages of Ruby over Java. But there must be some advantages, that's why lots of people (especially companies) use Java and not Ruby. Please tell the absolute(not philosophical!) advantages of Java over Ruby. ...

What's the difference between Duby and Juby and why would I need either of them?

According to Charles Nutter, Duby is a static-typed language with Ruby's syntax and Java's type system. Duby supports all Ruby's literals, uses local type inference (only argument types must be declared), and runs as fast as Java (because it produces nearly identical bytecode). But with the advent of invokedynamic, Duby...

How can I tell if I'm running from JRuby vs. Ruby?

I have a script with a factory method that I would like to return a different implementation of some class depending on whether or not the script is running from JRuby or Ruby. Anyone have any ideas on how I could tell the difference from inside my script? Some initial thoughts I had were: Attempt to 'include Java' and rescue back to...

running jruby throws long list of javascript errors....

i get this once in a while when i use jruby to run ruby scripts. at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:117) at test.__file__(test.rb:11) at test.load(test.rb) at org.jruby.Ruby.runScript(Ruby.java:592) at org.jruby.Ruby.runNormally(Ruby.java:514) at org.jruby.Ruby.runFromMain(Rub...

How can I start JRuby on Rails from Java?

I need to start a copy of a Rails app from within Java. I would favor a lightweight HTTP server, as our installations will have a very small userbase (1-10, 10 being a huge installation). My design I am aiming for is for a single process, with the web interface written in Rails - running on JRuby in a background thread of the main serv...

Parse XML with JRuby (Hpricot?) with tags like <foo.bar>

I'm trying to consume some legacy XML with elements like this in JRuby: <x-doc attr="value"> <nested> <with.dot>content</with.dot > </nested> </x-doc> I've been working with Hpricot, but Hpricot's HTML-oriented shortcuts are working against me: doc.search("//with.dot") seems to be looking for <with class="dot" /> (I ran into ...

Groovy vs Scala [vs JRuby vs Closure vs Jython]

I'm planning to broaden my perspectives in JVM platform, and I've got a dilemma: what should I learn first? Could you please explain, what are the advantages of Groovy, Scala and other languages for JVM? Thanks. ...

How to convert a Java Date object into a JRuby Time object?

Using JRuby, is there a good way to convert a Java Date object into a JRuby Time object? I'm using the latest version of JRuby (1.3.1) and Java SE 6. ...