jruby

Is there any tool to detect code/functionality which is no longer used?

霸气de小男生 提交于 2020-01-14 02:54:45
问题 We have many applications running (consider all of them run on Java Platform) and we need to check which ones were used in the last, say, 3 months, and, among those active applications, which parts/functionalities (and how often) are still being used. Is that possible? The goal here is to detect applications or funcionalities which no longer are relevant to the business and remove them, so that we end up having less code to maintain and monitor. Is there any tool which could help us achieving

Is there any tool to detect code/functionality which is no longer used?

流过昼夜 提交于 2020-01-14 02:54:06
问题 We have many applications running (consider all of them run on Java Platform) and we need to check which ones were used in the last, say, 3 months, and, among those active applications, which parts/functionalities (and how often) are still being used. Is that possible? The goal here is to detect applications or funcionalities which no longer are relevant to the business and remove them, so that we end up having less code to maintain and monitor. Is there any tool which could help us achieving

How to initialize the SQLite3 JDBC driver in JRuby?

岁酱吖の 提交于 2020-01-13 02:43:25
问题 How do you access SQLite3 via JDBC without using active record? 回答1: Here's an example that works with JRuby 1.6.6 (in Ruby 1.8 compat mode) with jdbc-sqlite3 3.7.2. require 'rubygems' require 'jdbc/sqlite3' require 'java' org.sqlite.JDBC # load the driver so DriverManager detects it #Java::OrgSqlite::JDBC # alternate means of same connection = java.sql.DriverManager.getConnection 'jdbc:sqlite:test.sqlite3' begin statement = connection.createStatement begin statement.executeUpdate("create

JRuby: Watir is hanging when launching browser

爱⌒轻易说出口 提交于 2020-01-11 09:22:27
问题 I have Windows 7 Enterprise and I am trying to run JRuby. I've set my environment variables for Ruby (1.9.3), Java (jdk - 1.6.7), and JRuby (1.7preview). I have a network drive but I created a HOME system variable which seems to be working because I can download gems for both Ruby & JRuby successfully and they are saved to my local drive. When I try to launch a browser (ie, firefox, chrome) it seems to hang for JRuby, but not Ruby. Here is the trace for JRuby after it's been trying to execute

JRuby 1.6.3 and Rails 3.1rc5 and activerecord-3.1.0.rc5 and destroy_all

。_饼干妹妹 提交于 2020-01-06 03:03:22
问题 I am able to create able to run my migrations from JRuby 1.6.3 and Rails 3.1rc5 and in a console session create a simple Role object like this: jruby-1.6.3 :001 > role = Role.new(:name => "Admin") (1.0ms) SELECT name FROM sqlite_master WHERE type = 'table' AND NOT name = 'sqlite_sequence' => #<Role id: nil, name: "Admin", created_at: nil, updated_at: nil> All is good but when I run Role.destroy_all I get the following stack trace: jruby-1.6.3 :003 > Role.destroy_all ArgumentError: wrong

NoClassDefFoundError on org.jruby.Main

左心房为你撑大大i 提交于 2020-01-06 03:01:06
问题 I'm trying to install the hpricot gem on my Windows machine using JRuby 1.4.0RC1. I'm trying to follow the advice to the related question (see -> Installing hpricot for JRuby). Per the answer's advice I pulled the git head of hpricot and from it's dir ran: jruby -S rake package_jruby cd pkg sudo jgem install ./hpricot-0.8.1-jruby.gem But when I run this I get the following NoClassDefFoundError: Exception in thread "main" java.lang.NoClassDefFoundError: org/jruby/Main Caused by: java.lang

Rake “no such file to load — java” even when `which ruby` -> jruby

拈花ヽ惹草 提交于 2020-01-04 09:35:06
问题 I am a Ruby noob (rube?) and am having trouble configuring my environment to get rake to build something with a Java dependency. I run $ PATH=/tmp/jruby-dodge:"$PATH" rake and get /opt/local/bin/ruby -S rspec spec/contextual_spec.rb /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- java (LoadError) from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /Users/msamuel/work/igrigorik/contextual

Rake “no such file to load — java” even when `which ruby` -> jruby

杀马特。学长 韩版系。学妹 提交于 2020-01-04 09:34:01
问题 I am a Ruby noob (rube?) and am having trouble configuring my environment to get rake to build something with a Java dependency. I run $ PATH=/tmp/jruby-dodge:"$PATH" rake and get /opt/local/bin/ruby -S rspec spec/contextual_spec.rb /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- java (LoadError) from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /Users/msamuel/work/igrigorik/contextual

Delegating class methods to an object in ruby

邮差的信 提交于 2020-01-04 09:12:09
问题 I am trying to wrap calls to a singleton in a class (because I do not want the rest of the code to know that they are talking to a singleton), and I looked at the delegate module. In my code, I have something like this: class HideSingleton @@obj = SingletonClass.instance # x is an instance of SingletonClass # I want to be able to say HideSingleton.blah, # where 'blah' is instance method of SingletonClass instance (i.e., 'x') SimpleDelegator.new @@obj.field end class SingletonClass < BaseClass

How to create distribution files(.exe) with jruby

倾然丶 夕夏残阳落幕 提交于 2020-01-04 08:06:09
问题 I have created a JRuby desktop application. Now I need to install on different platforms(Windows, Linux, Mac). Can any one help me on this Which is the painless method to create installation files OR executables with jruby. I googled and tried with RubyScript2exe, OCRA but none of these succeeded(really dont understood much). I am a noobie.. I really need it... EDIT - TRYING A SIMPLE METHOD as jrubyc can create java equivalent class files(described here) To start with packaging I created a