I've tried to use EventMachine etc., with JRuby. I get errors about native extensions. I believe this is due to Java limitations. I think the fact that I am on Windows further complicates the issue. Some clarification would be appreciated. What extensions can/can't be used with JRuby? How can I tell? Thanks.
...
I'm looking to run some un-verified scripts (written in a yet-to-be-determined language, but needs to be Java-based, so JRuby, Groovy, Jython, BeanShell, etc are all candidates). I want these scripts to be able to do some things and restricted from doing other things.
Normally, I'd just go use Java's SecurityManager and be done with it....
Are there any companies/web-sites that use Glassfish in production? I am new to J2EE and deploy JRuby on Rails alongside a JAX-WS Metro application in Glassfish v3 Prelude. Sometimes the quirks make me go WTF and rip my hair out.
I haven't had experience with Apache Tomcat and was wondering if it makes sense to switch to Tomcat, as Glas...
If I type this big integer:
puts 9997836544.class.to_s
and compile with ruby 1.86, it reports expectedly:
BigNum
while JRuby (1.1.4 in Netbeans) reports surprisingly:
Fixnum
I thought Java had a BigInteger class to correspond to the BigNum class in Ruby. If so, I would have expected JRuby and ruby to produce the same output.
...
I'm working with a Java library in JRuby. I'm reading an object from a file, and I need to pass it as a different object type to a second constructor:
@hmm_model = ObjectInputStream.new(FileInputStream.new(LINGPIPE_MODEL_PATH))
@tagger = HmmDecoder.new(@hmm_model)
@hmm_model is of type ObjectInputStream, and needs to be cast to (Hidd...
Quite frequently when I save changes to a Ruby file in Netbeans and try to run the file, the interpreter simply doesn't do anything. The only way around it is to temporarily switch to the JRuby interpreter and then switch back to the default Ruby interpreter (1.86). Besides this hack, is anyone aware of a fix for this problem? It has pre...
When using Warbler, what line(s) do I need to add to config/warble.rb to keep it from including Active Record in the bundled gems. I already have excluded Active Record in config/environment.rb as shown below.
config.frameworks -= [ :active_record ]
I tried the same thing only using config.gems in config/warble.rb, but to no avail.
...
After spending some hours with the Ruby Debugger I finally learned that I need to clean up some malformed HTML pages before I can feed those to Hpricot. The best solution I found so far is the Tidy Ruby interface.
Tidy works great from the command line and also the Ruby interface works. However, it requires dl/import, which fails to loa...
I just found out about JRuby, and I like the idea of running Ruby on Rails and being able to call Java libraries.
I would like to know about some experiences with running enterprise production applications in JRuby. Are stability and performance acceptable?
Thanks.
...
Hi, Are there any good online JRuby e-books? Thanks
...
$> jruby -v
jruby 1.1.4 (ruby 1.8.6 patchlevel 114) (2008-08-28 rev 7570) [x86-java]
$> gem install rspec
JRuby limited openss loaded. gem install jruby-openssl for full support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
Succesfully installed rspec-1.1.12
1 gem installed
Installing ri documentation for rspec-1.1.12...
Installin...
SAP announced Blue Ruby, a version of Ruby that runs inside the ABAP Virtual Machine.
This seems to lend additional credibility to the Ruby language but, except for SAP developers, does this have any applicability to the rest of the Ruby community?
I'm just wondering what other significance this may have. Additional job opportunities,...
I'm trying to look at cucumber for Jruby on Rails. One of the pre-requesites is webrat which has as pre-requisite hpricot.
I've installed the gem with hpricot using:
gem install hpricot --source http://code.whytheluckystiff.net --version 0.6.1 --platform java
This installs the java version of hpricot. I add the hpricot_scan.jar to the...
This is actually two questions rolled into one.
Is there a particular type of Java functionality that people are using JRuby for or is it mainly because of the performance advantage that JRuby gives versus the MRI?
The reason I ask is, I'd like to add some Java functionality to a Rails project (just to show that it's possible). Idea...
Attempting to use JRuby 1.2.0 and Rails 2.3.2 with an embedded Derby database. I've copied derbytools.jar and derby.jar to $RUBY_HOME/lib, yet rake db:migrate still gives:
The driver encountered an error:
cannot load Java class org.apache.derby.jdbc.ClientDriver
Aaaand... I played a hunch and figured it out. So, I'll post this...
First approach: bare metal
require 'java'
require 'rubygems'
require "c:/ruby/jruby-1.2.0/lib/ojdbc14.jar" # should be redundant, but tried it anyway
odriver = Java::JavaClass.for_name("oracle.jdbc.driver.OracleDriver")
puts odriver.java_class
url = "jdbc:oracle:thin:@myhost:1521:mydb"
puts "About to connect..."
con = java.sql.DriverMa...
Early reports of JRuby on Google App Engine indicate that ActiveRecord does not work.
It was my understanding that this was the only way to talk to the database in Rails.
Is this not the case? And, if not, what is the alternative?
Is there a more direct way in Rails of interfacing with Google's BigTable datastore?
...
For example, I'm running into developers and architects who are scared to death of Rails apps, but love the idea of writing new Grails apps.
From what I've seen, there is a LOT of resource overhead that goes into using the JVM to support languages such as Groovy, JRuby and Jython instead of straight Ruby or Python.
Ruby and Python ca...
I'm working on a project that involves some scripting and data storage. The database that I have available to me is MS Sql Server and it is on a windows platform.
Despite this I'm looking to leverage Ruby to write the script, specifically JRuby. There are a couple of reasons for this
I would like to leverage Prawn to create pdfs
...
* Download JRuby 1.20. (zip file)
* Extract the zip into C:\JRuby120
* Edit sytem "environment variables":
* Add JRUBY_HOME -> point it to C:\JRuby120
* Modify the PATH environment variable to point to C:\JRuby120\bin;
After all this, I open up cmd.exe and type jruby
->"The system cannot find the path specified"
What did I do wrong?
...