jruby

Do you have to do duplicate gem installs for JRuby & MRI?

I have JRuby and Ruby (MRI) installed. It seems that I need to install gems twice - once for each of these platforms. Is this necessary or am I doing it wrong? After I installed the rails gem for MRI, should I have pointed JRuby to it, or was it necessary for me to also call: "jruby -S gem install rails" ...

Why does the sqlite 1.2.3 gem install correctly for MRI but not for JRuby?

If I call: gem install sqlite3-ruby --v 1.2.3 it works for MRI but if I call: jruby -S gem install sqlite3-ruby --v 1.2.3 it says it's trying to build a native extension (for Windows) and fails. Why are JRuby and MRI different in the way they treat gems? ...

JRuby on Rails without a database

I'm kicking off a new Rails project in NetBeans using JRuby (v1.2.0) which uses Rails (2.3.2). I don't need a database, all my data comes from the cloud. I've uncommented this line in my environment config.frameworks -= [ :active_record, :active_resource, :action_mailer] However, I still get the following errors just trying to call an...

Converting pdf to images using Ruby/JRuby

I'm looking for an easy way to generate previews for labels generated as pdfs. It would be great if I could convert these pdfs to images and show them to the user before the actual print/download. The application is currently running in a Jruby on rails environment, but it's quite possible that we switch to two applications, one running...

Reduce Mongrel Rails Memory Footprint & Increase performance?

My rails sites run Mongrel, I am having a problem with the amount of memory being used. My ruby-bin processes are using up about 66 MB of resident memory. How can I reduce the amount of memory used by rails? It is not very economical to have many rails servers running on a single machine if they are eating memory at this rate. My php...

Anyone tried mixing JavaFx and JRuby?

Has anyone tried mixing JavaFx and JRuby? I've built a desktop JRuby application with a Swing GUI (100% JRuby) and I'm toying with the idea of replacing the GUI with JavaFx for a more slick feel. To fit with my current application I want to implement an MVC pattern with the View being JavaFX and the Controller and Model being Ruby. ...

Converting Time/DataTime/Data into java.util.Calendar?

Is it possible in easy way to convert JRuby Time/DataTime/Data into java.util.Calendar including the timezone? On #jruby I was given such code cal.set_time_in_millis(time.to_i) but I lost information about timezone in betwean. So the more specific question is how to convert the timezone but I prefered to ask more broad questin in case t...

If I have jRuby on Rails installed can I use only Ruby?

What I mean by this is if I install jRuby on Rails, can I use only the ruby language to build my application? I wanted to install my rails application with jRuby in case I wanted to use Java in the future, though I don't need it now. Or do I not understand? Is jRuby ruby that has access to java libraries? ...

Java applet communication with Rails application

Hi! I'm creating a Rails application and on it, there should be a Java Applet. My question and problem is that the applet must be tightly integrated with the Rails parts. I must be able to get a list of all users, update an image, etc... And there's a surprisingly small amount of information available on the Internet of how to use appl...

Running Ruby scripts under JRuby/Rack as if they were CGIs

Is there a way to map *.rb files to be executed under JRuby with the output being sent out to the browser like a CGI? Basically I'm looking for a JRuby CGI servlet. Ideally, I'd like to define a JRuby servlet in web.xml and then be able to put *.rb files in WEB-INF/ruby and be able to call them via http://servername/contextname/rubypro...

Use JRuby for Ruby web applications? Is it worth it?

Background: I'm writing a 'standard' (nothing special) web application in Ruby (not Rails) and I need to start thinking about deployment. So I've been hearing a lot of recommendations to use JRuby to deploy Ruby web applications, regardless of whether you actually need Java libraries or not. How true is this? Is it worth using the Java ...

How can I create a servlet with jruby (running with jetty)?

Hi, I am pretty new to jruby and java and want to create a servlet in jruby while using jetty as web server. I am not sure if I am on the right way with the following code which shows the input form so far. I guess I have to extend now the HttpServlet class to handle the posted data but I don't know how to do this in this case and if it...

Does Scala scale better then other JVM languages?

Here is the only way I know to ask it at the moment. As Understand it Scala uses the Java Virtual Machine. I thought Jruby did also. Twitter switched its middleware to Scala. Could they have done the same thing and used Jruby? Could they have started with Jruby to start with and not had their scaling problems that caused them to mo...

How can I uses Sesame's RDFXMLParser in JRuby?

I am not very experienced in Java and JRuby but need to parse RDF data using Sesame's RDFXMLParser in JRuby and my python-minded brain just does not want to get into it. I have problems translating the Java example into JRuby. At first I don't know how to define the RDFHandler in a way it would make sense. I also don't get why the parse ...

Will a standard book on ruby on rails work if I am using jRuby?

I will have to use JDBC with an old database, which I why I selected jRuby. If I get a book on ruby on rails that does not include jRuby information, will that be benficial to me? ...

curb(curl) for jruby?

i'm trying to use curl with jruby to get some response times for webpages/files. normally in ruby this would not be an issue and i could just install the gem (gem install curb) and all is well. curb appears to be incompatible with jruby, so is there an alternative that i can use to get web page load times in a similar fashion? i looked ...

Is there a JRuby-Rack Sinatra Warbler Project archtype?

Is there a project archetype (or whatever the ruby community calls it) for a jruby + rack + Sinatra project that creates a WAR deployment file with all required dependencies all ready to go? What I want is the equivalent to "rails appname" that creates a ready to go project with ant/rake scripts and a basic directory hierarchy all ready...

Are server restarts necessary while developing an App Engine/Java project in Eclipse?

I'm developing a Ruby web application on top of GAE-Java and development is painfully slow because in Eclipse I must restart the development server every time I make a change to my Ruby code. I'm not able to work effectively this way because each restart takes about a minute. Is the norm for Java development or am I doing something wron...

If I use jRuby, Ruby on Rails, and JDBC, can I still use an ORM?

Can I use Hibernate, for example? Active Record? I have to use jdbc for an older database so I have to use jRuby with Ruby on Rails. Thank you. ...

Reliable JRuby Timeout for HTTP Requests

I'm having trouble with Timeouts which do not work reliably under JRuby (Linux). More specifically, if I send a HEAD Request to a remote server and this server is busy (does not respond), the configured timeout does not fire and my application stalls for a long time. I tried both, setting read_timeout and using the timeout() function but...