Skip to content

Instantly share code, notes, and snippets.

Alex Coles myabc

Block or report user

Report or block myabc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:25652
<0.9.7-incubating nonfatal general error> org.apache.openjpa.persistence.PersistenceException: There were errors initializing your configuration: org.apache.openjpa.lib.util.ParseException: Instantiation of plugin "QueryCompilationCache" with value "true" caused an error "java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap". The alias or class name may have been misspelled (as it closely matches the valid plugin alias "true"), or the class may not be available in the class path. Valid aliases for this plugin are: [all, false, true]
at org.apache.openjpa.lib.conf.Configurations.getCreateException(Configurations.java:341)
at org.apache.openjpa.lib.conf.Configurations.newInstance(Configurations.java:198)
at org.apache.openjpa.lib.conf.ObjectValue.newInstance(ObjectValue.java:103)
at org.apache.openjpa.conf.QueryCompilationCacheValue.newInstance(QueryCompilationCacheValue.java:57)
at org.apache.openjpa.lib.conf.Plugin
View gist:44351
[alexbcoles@mondiale do_postgres (jdbc)]$ rake compile
(in /Users/alexbcoles/git-repos/do/do_postgres)
/Library/Ruby/Gems/1.8/gems/rake-0.8.3/lib/rake/gempackagetask.rb:13:Warning: Gem::manage_gems is deprecated and will be removed on or after March 2009.
mkdir -p tmp/universal-darwin9.0/do_postgres_ext
cd tmp/universal-darwin9.0/do_postgres_ext
/Users/alexbcoles/git-repos/do/do_postgres/ext/do_postgres_ext/extconf.rb:8: command not found: pg_config --includedir-server
/Users/alexbcoles/git-repos/do/do_postgres/ext/do_postgres_ext/extconf.rb:21: command not found: pg_config --libdir
/Users/alexbcoles/git-repos/do/do_postgres/ext/do_postgres_ext/extconf.rb:21: command not found: pg_config --includedir
/Users/alexbcoles/git-repos/do/do_postgres/ext/do_postgres_ext/extconf.rb:21: command not found: pg_config --libdir
checking for main() in -lpq... no
View gist:44505
diff --git a/do_jdbc/src/java/data_objects/Command.java b/do_jdbc/src/java/data_objects/Command.java
index f0ccc00..922db88 100644
--- a/do_jdbc/src/java/data_objects/Command.java
+++ b/do_jdbc/src/java/data_objects/Command.java
@@ -89,6 +89,9 @@ public class Command extends RubyObject {
RubyClass resultClass = Result.createResultClass(runtime, moduleName, errorName, driver);
java.sql.Connection conn = (java.sql.Connection) wrapped_jdbc_connection.dataGetStruct();
+ // affectedCount = 1 means 1 updated row
+ // or 1 row in result set that represents returned key (insert...returning),
View gist:44713
[alexbcoles@mondiale do_mysql (jdbc)]$ jruby -S rake spec
(in /Users/alexbcoles/git-repos/do/do_mysql)
/usr/local/jruby-1.1.5/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/gempackagetask.rb:13:Warning: Gem::manage_gems is deprecated and will be removed on or after March 2009.
mkdir -p pkg/classes
DataObjects::Mysql
- should expose the proper DataObjects classes
- should connect successfully via TCP
- should be able to send queries asynchronously in parallel
- should return the current character set
View gist:44716
diff --git a/do_jdbc/src/java/data_objects/Command.java b/do_jdbc/src/java/data_objects/Command.java
index f0ccc00..922db88 100644
--- a/do_jdbc/src/java/data_objects/Command.java
+++ b/do_jdbc/src/java/data_objects/Command.java
@@ -89,6 +89,9 @@ public class Command extends RubyObject {
RubyClass resultClass = Result.createResultClass(runtime, moduleName, errorName, driver);
java.sql.Connection conn = (java.sql.Connection) wrapped_jdbc_connection.dataGetStruct();
+ // affectedCount = 1 means 1 updated row
+ // or 1 row in result set that represents returned key (insert...returning),
View gist:60094
class Animal
#accessor :sex
#attr_reader :sex
#attr_writer :sex
def initialize
end
def sex
View 0001-Ensure-rake-install-command-uses-same-Ruby-interpret.patch
From 2d940fb0f5a5df64cde100c5fb026b1c1e9ce1d7 Mon Sep 17 00:00:00 2001
From: Alex Coles <alex@alexcolesportfolio.com>
Date: Tue, 3 Mar 2009 22:57:03 +0100
Subject: [PATCH] Ensure rake install command uses same Ruby interpreter/implementation
Signed-off-by: Alex Coles <alex@alexcolesportfolio.com>
---
Rakefile | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
View 0001-Ensure-rake-install-command-uses-same-Ruby-interpret.patch
From 05721dde8a1adfe34f091560a2e2bef54d2fe65e Mon Sep 17 00:00:00 2001
From: Alex Coles <alex@alexcolesportfolio.com>
Date: Tue, 3 Mar 2009 22:57:10 +0100
Subject: [PATCH] Ensure rake install command uses same Ruby interpreter/implementation
Signed-off-by: Alex Coles <alex@alexcolesportfolio.com>
---
tasks/install.rb | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
View gist:74366
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 3044113..3dff333 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -27,7 +27,7 @@ PRIMARY = {
'yaml' => "yaml://#{temp_db_dir}/primary_yaml",
'sqlite3' => 'sqlite3::memory:',
# 'sqlite3_fs' => "sqlite3://#{temp_db_dir}/primary.db",
- 'mysql' => 'mysql://localhost/dm_core_test',
+ 'mysql' => 'mysql://root@localhost/dm_core_test',
View gist:74400
26)
TypeError in 'DataMapper::Adapters::MysqlAdapter with mysql conditions like should be able to search for objects that match value'
/ed/ is not a symbol
/Users/alexbcoles/git-repos/dm-core/lib/dm-core/adapters/data_objects_adapter.rb:70:in `read_many'
/Users/alexbcoles/git-repos/dm-core/lib/dm-core/adapters/data_objects_adapter.rb:199:in `with_connection'
/Users/alexbcoles/git-repos/dm-core/lib/dm-core/adapters/data_objects_adapter.rb:63:in `read_many'
/Users/alexbcoles/git-repos/dm-core/lib/dm-core/repository.rb:143:in `read_many'
/Users/alexbcoles/git-repos/dm-core/lib/dm-core/collection.rb:919:in `initialize'
/usr/local/jruby-1.1.6/lib/ruby/gems/1.8/gems/extlib-0.9.11/lib/extlib/lazy_array.rb:373:in `[]'
/usr/local/jruby-1.1.6/lib/ruby/gems/1.8/gems/extlib-0.9.11/lib/extlib/lazy_array.rb:373:in `lazy_load'
You can’t perform that action at this time.