jruby

What characters can I use to quote this ruby string ?

I'm embedding JRuby in Java, because I need to call some Ruby methods with Java strings as arguments. The thing is, I'm calling the methods like this: String text = ""; // this can span over multiple lines, and will contain ruby code Ruby ruby = Ruby.newInstance(); RubyRuntimeAdapter adapter = JavaEmbedUtils.newRuntimeAdapter(); String...

Add a file to subversion with special characters like '%' in the filename.

I want to commit a version of jruby into my svn repository and there are a number of files under the jruby-1.2.0/share/ri/1.8/system/Matrix directory with the special character '%' in the file names. When I try to check these files into svn I get the following error: svn: Commit failed (details follow): svn: '/!svn/wrk/jruby-1.2...

Which parts of a Ruby DSL will I need to build by hand?

If I want to build a DSL in Ruby 1.9 or JRuby, will I need to do any of these stages by hand: Lexing Interpretation Parsing Just-in-time compilation Obviously, being a programmer, I don't like to write actual code as much as I can get away with, so I'm hoping none of these steps require manual labor :) ...

What practical effect will different Ruby threading models (Ruby vs JRuby) have on your code as a developer?

I'm trying to understand the practical impact of different threading models between MRI Ruby 1.8 and JRuby. What does this difference mean to me as a developer? And also, are there any practical examples of code in MRI Ruby 1.8 that will have worse performance characteristics on JRuby due to different threading models? ...

sharing ruby code within an organisation

Me and my team are starting to build up a few re-usable scripts. They're re-usable within our org only as they work with proprietry apps and our particular server environment. So not really suitable for rubyforge or github, etc. My question is, what is the best practice for ensuring we're all using the latest and greatest scripts acro...

jruby on tomcat - RackInitializationException

After following http://kenai.com/projects/jruby/pages/JrubyOnRailsOnTomcat#Rails_2.0 though with tomcat 5.5, jruby 1.3.0, rails 2.3.2 tomcat gives: SEVERE: unable to create shared application instance org.jruby.rack.RackInitializationException: Please install the jdbc adapter: gem install activerecord-jdbc-adapter (no such file to load...

Servlets and static content with JRuby embedded jetty

Hi, I would like to serve servlets and static content with jetty embedded in JRuby. I tried this: server = Server.new(8080) context = Context.new(server, '/', 0) context_static = Context.new(server, '/static', 0) context_static.setHandler(ResourceHandler.new) context_static.setResourceBase('./') context_static.setContextPath('/static'...

Does using JRuby mean a duplicate of Ruby on all applications?

For example, if I install Rails for regular Ruby, am I required to have a special install of Rails for JRuby? So that I have duplicates for everything? ...

java font format exception on osx with java 4 update

I'm getting a java.awt.FontFormatException: Unrecognised Font Format error, and I believe this has been happening only since performing the 10.5 java 4 update, though I can't verify that to be exact. My java version after the update is 1.5.0_19 I'm using jruby in rails to generate a font with the following code: font = java.a...

Fetching emails in rails via IMAP

I have this rails app that's running on our local intranet, with a thousand regular users. I am looking to integrate it with our email server(MS Exchange). Basically - 1) For each user, the app should fetch any new messages in their inbox from the mail-server, parse it, and file it in the database. I could implement it with ruby/net-im...

Instructions for setting up IIS and jRuby

Does anyone have clear instruction for setting up jRuby to work with IIS. Edit: What I'm looking for is step by step instructions for getting a Ruby on Rails application working on Windows using IIS and jRuby. The reason being is because I can't find anything other then "use Linux" when asking the question out in the wild. For most peo...

JRuby + monkeybars with handcoded view

I am looking for examples of handcoded views for JRuby using monkeybars. I need to create the gui dynamically based on external paratmeters. ...

JRuby with Ruby 1.9

I know there is ongoing work for in this regards but what is the exact status of JRUby 1.3 compatibility with Ruby 1.9.1 ? I am slightly confused if I can dwnload jruby 1.3 and start working with my ruby 1.9 installation. The JRuby homepage says : * Ruby 1.8.6 compatible now * Ruby 1.9 compatible soon Wikipedia says the foll...

Can a Rails plugin be packaged as a WAR/JAR file?

Can a plugin be packaged as a JAR/WAR file similar to the way in which an entire Rails app can be packaged for deployment on JRuby? ...

What is problem? when undefined method `bytesize' for #.

I'd like to store and update blogger labels to datastore in GAE. When I run that code, I get this error: javax.servlet.ServletContext log: Application Error /base/data/home/apps/yet-another-problem/1.334886515480009498/WEB-INF/gems/gems/sinatra-0.9.2/lib/sinatra/base.rb:45:in each': undefined method bytesize' for #<Hash:0x86684c> (NoMet...

Jython or JRuby?

It's a high level conceptual question. I have two separate code bases that serve the same purpose, one built in Python and the other in Ruby. I need to develop something that will run on JVM. So I have two choices: convert the Python code to Jython or convert the Ruby to JRuby. Since I don't know any of them, I was wondering if anyone ca...

JRuby, Rails, and FeedTool

Anyone using JRUBY on Rails with FeedTools? I'm getting the following error when I try to run FeedTools: NameError (undefined local variable or method `parser' for YAML:Module):. I've tracked the code down to monkey_patch.rb. It is bombing on the parser line, but I'm new to Ruby and Rails and couldn't debug it on my own. What's weird ...

JRuby on Rails and calendar_date_select

Anyone have any success with a JRuby on Rails war deployment and calendar_date_select? The gem wouldn't include the helper functions and I would receive the following error since the function wasn't declared in the app: undefined method 'calendar_date_select_includes' for #<ActionView::Base:0xbe823> After installing calendar_date_sele...

GAE and JRuby HTTP connections

Hi, I want to start to a new JRuby project on GAE but I read that GAE does not allow you to create new sockets. I want to use some API that have to work over HTTP connect like Garb (Google Analytics client). Has anyone managed to use any API over HTTP on GAE? Thank you ...

Ruby code to JAR

Hi, I'd like to be able to compile a ruby program to a java JAR program. I've looked into JRuby and seen several examples of Java applications that would be able to eval() ruby code, but is there a more elegant solution allowing to simply code everything in ruby and then compile the lot directly to a JAR file? The overall goal behind t...