jruby

JRuby + Sqlitejdbc : No suitable driver found for jdbc:sqlite:

痴心易碎 提交于 2019-12-12 04:33:13
问题 On a machine I have only a user account on, I want to dump the output of a job into an sqlite database instead of textfiles. To this end, I run jruby from the jarfile. The approach usings gems ( dbi, dbd/Jdbc, jdbc/sqlite3 ) from a local GEM_HOME did not work (No suitable driver found) and also produces deprecation messages from the gems ("include_class is deprecated. Use java_import.") I turned to Zentus' sqlitejdbc-v056.jar and ran JRuby with Zentus' in the path: java -cp .:sqlitejdbc-v056

After Upgrade To JRuby 9.1.9.0, Rails CookieStore Very Slow When Handling Encrypted Cookies

狂风中的少年 提交于 2019-12-12 04:05:26
问题 I recently upgraded a JRuby 1.7.x based Rails 4.2.5 Web application to JRuby 9.1.9.0. When I deploy the to a web server, page loads take up to 60sec. I profiled the code and the bulk of the time is being spentt in the ActionDispatch::Session::CookieStore call method. I suspect this bottlenect is potentially related to jopenssl gem's encrypt/decrypt being slow but I have not found any help articles or solutions online. Any insight into this issue, possible options to configure JRuby would be

JRuby deployment options that support multiple versions of JRuby

*爱你&永不变心* 提交于 2019-12-12 02:49:58
问题 I'm looking for a way to deploy multiple JRuby apps on a single server, the apps are in different stages and hence use different versions of JRuby, in the long term it would be pretty complicated to try and sync all of the applications with all of the application servers, so I'm looking something akin to Phusion Passenger 4 in the Javaland. Apparently Passenger allows something like this, but there's no documentation available how such a setup should work. Torquebox doesn't mention this use

How do Rails and Jruby relate?

故事扮演 提交于 2019-12-12 02:24:17
问题 Background: I have a java library that is accessed by many developers - usually via java. However, a few devs hope to access this via a Ruby API. I am gravitating in the direction of Jruby in order to implement a Java-Ruby API. Questions: My main concern is that these developers will not be able to utilize the API in their current, Ruby on Rails development framework; but instead will have to operate within Jruby's rails environment. Is this going to be the case? Perhaps I'm missing a

jruby-complete not running rake or other downloaded gems

跟風遠走 提交于 2019-12-12 01:59:00
问题 In following the following URL for a guide: http://spin.atomicobject.com/2010/02/01/running-a-ruby-application-with-jruby-complete/ I downloaded jruby-complete and was able to run a basic simple command or two. However, I wanted to run Rake. When I issued java -jar jruby-complete.jar -S rake -T , I was greeted with these errors on my Windows machine. λ run_jruby.bat -S rake -T io/console not supported; tty will not be manipulated LoadError: no such file to load -- file:C:/Users/user01/Desktop

Error while loading java Class in Jruby application

…衆ロ難τιáo~ 提交于 2019-12-12 01:37:53
问题 I have deployed my Ruby on Rails Application on Torquebox. After starting server I am getting this error 10:18:06,311 ERROR [org.torquebox.core.runtime] (Thread-95) Error during execution: ENV['RAILS_ROOT']=RACK_ROOT ENV['RAILS_ENV']=RACK_ENV require %q(org/torquebox/web/rails/boot) : org.jruby.exceptions.RaiseException: (NameError) cannot load Java class sun.security.tools.KeyTool at org.jruby.javasupport.JavaClass.for_name(org/jruby/javasupport/JavaClass.java:1205) [jruby.jar:] at org.jruby

Using ActiveRecord with column names with spaces in them

亡梦爱人 提交于 2019-12-12 00:56:15
问题 I work on a team that is using ActiveRecord to access the schema on a MSSQL server. Modifying the schema is not an option and the column names have spaces in them, a la SPACEY COLUMN . When writing the ActiveRecord class to access a table with spaces in it, what is good practice? We also need this to work with factory girl... 回答1: AR-JDBC (as well as the AR-SQLServer-Adapter) will/should handle this just fine since it auto-magically quotes column name identifiers using "[ COlumn NAME ]" ... I

Jruby NoSuchMethodError: org.jruby.RubyClass.defineMethod

感情迁移 提交于 2019-12-11 23:35:16
问题 Environment JRuby version : jruby 9.0.0.0 (2.2.2) 2015-07-21 e10ec96 Java HotSpot(TM) 64-Bit Server VM 25.65-b01 on 1.8.0_65-b17 +jit [linux-amd64] Java version ➜ trunk java -version java version "1.8.0_65" Java(TM) SE Runtime Environment (build 1.8.0_65-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode) Operating system and platform ➜ trunk uname -a Linux swapnil-Lenovo-Z50-70 4.2.0-27-generic #32-Ubuntu SMP Fri Jan 22 04:49:08 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux ➜

How to build JRuby 1.7.13 on Raspberry Pi with rbenv/ruby-build?

不想你离开。 提交于 2019-12-11 22:12:20
问题 I am trying to install JRuby (preferably version 1.7.13) onto a Raspberry Pi. I have rbenv/ruby-build installed. When I try to install JRuby (both 1.7.13 or 1.7.11), I get the following error: pi@raspberrypi:~$ rbenv install jruby-1.7.13 Downloading jruby-bin-1.7.13.tar.gz... -> http://dqw8nmjcqpjn7.cloudfront.net/faa1cd590f32f3cb92044d9abedf66ccea1d93a24236c877810c9b30e1e0577c Installing jruby-1.7.13... BUILD FAILED Inspect or clean up the working tree at /tmp/ruby-build.20140713094726.2669

JRuby on Rails app on and JBoss 4.2.0/Tomcat 5.5

醉酒当歌 提交于 2019-12-11 22:05:49
问题 My JRuby on rails app works fine on Tomcat 6.0, But when I deploy it on my company's webfarm which is JBoss 4.2.0/Tomcat 5.5 (Servlet API 2.4) It fails with the following stack trace: java.lang.ArrayIndexOutOfBoundsException: 0 at com.kenai.jaffl.provider.jffi.AsmLibraryLoader.generateBufferInvocation(AsmLibraryLoader.java:548) at com.kenai.jaffl.provider.jffi.AsmLibraryLoader.generateMethod(AsmLibraryLoader.java:511) at com.kenai.jaffl.provider.jffi.AsmLibraryLoader.generateInterfaceImpl