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...
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...
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 :)
...
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?
...
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...
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...
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'...
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?
...
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...
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...
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...
I am looking for examples of handcoded views for JRuby using monkeybars.
I need to create the gui dynamically based on external paratmeters.
...
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 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?
...
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...
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...
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 ...
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...
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
...
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...