Tagged Questions
0
votes
1answer
43 views
How to get postgresql to work with sequel and jruby
require 'sequel'
require 'jdbc/postgres'
DB = Sequel.connect("jdbc:postgresql://user:pass@domain/database")
DB.tables
Returns:
....(bla bla bla stack trace bla bla bla)....
...
0
votes
2answers
54 views
What are the Rails's ActiveRecord database gems on JRuby
When running rails on JRUBY, database adapters have two different gems.
Sql Server: sqlserver gem Vs activerecord-sqlserver-adapter gem
Mysql: jdbcmysql gem vs activerecord-jdbcmysql-adapter gem
...
1
vote
1answer
74 views
Incorrect encoding using jruby with datamapper
I'm trying to get data form a 2008r2 MSSql server using jruby and datamapper.
The only problem I've got this far is correct character coding in jruby.
Database uses Polish_CI_AS collation, testing ...
0
votes
2answers
168 views
JRuby and SQLite3
I'm trying to make work JRuby and SQLite3 with the following gems:
bouncy-castle-java (1.5.0146.1)
bundler (1.3.2)
dbd-jdbc (0.1.6 java)
dbi (0.4.5)
deprecated (2.0.1)
...
1
vote
1answer
151 views
DB2 Adapter for Ruby on Rails vs ActiveRecord JDBC Adapter
Could anyone point to me the differences and the benefits between using "DB2 Adapter for Ruby on Rails" and "Active Record JDBC Adapter"?
Generally, I am going to use the "jRUby on Rails" and "DB2 ...
2
votes
3answers
547 views
NameError: cannot load Java class com.mysql.jdbc.Driver
I'm using JRuby 1.7.2, along with DataMapper, and I'm getting an error I can't find an answer to.
I'm just testing out DataMapper along with MySQL 5.5 to see if it will run fine when I build around ...
1
vote
0answers
169 views
JRuby database.yml file configuration to use IBM DB2
I have installed:
JRuby (1.7.0.preview2)
Rails (3.2.8)
IBM DB2 Express C (1.01)
active-record-jdbc-adapter (1.2.2)
How should I change the database.yml file in order to my rails application to ...
0
votes
0answers
123 views
Using DB2 with JRuby Rails 3.2 DataMapper ORM
I recently became aware of DataMapper and see it's support for "legacy" database schemas is far superior to ActiveRecords'. This has inspired me to give it a go, however I've run into a snag trying ...
1
vote
1answer
314 views
ActiveRecord with Derby How to Set Derby Schema
See "UPDATE" below for what I now know is the crux of the problem.
I have a legacy Derby database that I want to make a Rails application to interface with.
I am using RVM so here are the steps I ...
0
votes
1answer
153 views
Is it possible to prompt a user for a password through a Java dialog from a web application?
The reason I ask is, I have a web application written in Ruby (1.8.7-p357) with the Sinatra Framework (1.3.2). The interpreter is JRuby (1.6.7.2). I am connecting to an AS/400 (System i v6r1) and when ...
0
votes
0answers
269 views
pagination in AS400 DB2 with and without jruby
I have a problem while trying to do a paginated query in DB2 (first experience with this database).
This is the query I am doing, which is generated by jruby + activerecord + jdbc + jtopen IBM ...
0
votes
1answer
328 views
JRuby JDBC-mysql error
I have JRuby + Swing application and want to add jdbc/mysql there
require "jdbc/mysql"
But when I'm trying to run it, I have the followig error:
LoadError: no such file to load -- jdbc/mysql
...
0
votes
1answer
204 views
JRuby on Rails rake db: tasks all abort with jdbc mysql
we are trying to integrate an existing mysql database in our jruby on rails application.
Our client provided us with a bare bone rails skeleton, which was not configured for a sepcific database. We ...
0
votes
1answer
240 views
Is this a possible bug in 'activerecord-jdbc-adapter' when trying to eager load?
We have the following model:
payment.rb:
class Payment < ActiveRecord::Base
has_many :currencies
default_scope :include => :currencies
end
We are using default_scope to eager load the ...
0
votes
1answer
342 views
NameError: cannot load jdbc.OracleDriver - jrubyNameError
I have a class that imports OracleDriver
require 'java'
java_import 'oracle.jdbc.OracleDriver' <= Get error here
I am getting :
NameError: cannot load Java class ...
1
vote
3answers
540 views
sybase from ruby: JDBC connection to Sybase
I need to connect to a fairly old Sybase database from Ruby.
I ended up using jRuby, only because I couldn't get any manner of connecting to Sybase from MRI to work; If there's a way that actually ...
0
votes
1answer
260 views
JRuby: JNDI vs JDBCMYSQL
Not sure if these two can be compared, to bear with me. But what is the advantage (in a JRuby application) to run a configuration that's similar to:
production:
adapter: jdbc
encoding: utf8
...
2
votes
0answers
101 views
Oracle Proxy Authentication in Rails
Using the oracle_enhanced adapter and oracle.jdbc.driver.OracleDriver, how can we utilize the proxy authentication described in here? Specifically, how can we mimic this code from Java in Ruby:
...
2
votes
0answers
130 views
Rails 3 trouble with SQL server 2000 legacy database [duplicate]
Possible Duplicate:
Rails3 talks to SQL Server 2000-----ActiveRecord::JDBCError: 'ROW_NUMBER' is not a recognized function name
I know ROW_NUMBER function does not exist in SQL ...
1
vote
2answers
397 views
Rails3 talks to SQL Server 2000-----ActiveRecord::JDBCError: 'ROW_NUMBER' is not a recognized function name
A simple Rails 3 application tries to talk to SQL Server 2000 using activerecord-jdbc-adapter. I tried both microsoft jdbc driver and jtds driver. seems to connect to database OK.
when it is time ...
0
votes
1answer
78 views
Large object streaming from PostgreSQL in JRuby?
How do I stream large objects from PostgreSQL in JRuby?
1
vote
1answer
704 views
jdbc result set metadata: getting physical column names on aliased columns
I'm using jdbc to execute query statements (in jruby)
# made-up example
sql = "select " +
"c.type as cartype, " +
"o.id as ownerid, " +
"o.type as ownertype " +
...
2
votes
1answer
591 views
How do I use Ruby on Rails 3.1 with DataMapper on JRuby with a DB2/400 database?
I am developing a Rails 3.1 application on top of a legacy DB2/400 database. Because of the better support for legacy schemas, I opted to use DataMapper instead of ActiveRecord as the ORM. The ...
1
vote
3answers
1k views
Jruby, JDBC, Netezza
So anyways I have a java program like this and it totally works.
1 import java.sql.*;
2 import org.netezza.*;
class Conn {
public static void main (String args []) throws SQLException {
6 ...
0
votes
2answers
246 views
JDBC error after application runs for a while
MySQL Connector/J (version 5.1.6) gets me the following error after a few minutes of opening and closing connections every second):
java.sql.SQLException: No suitable driver found for ...
0
votes
1answer
635 views
How to set schema and handle case of attribute names when using JRuby, ActiveRecord, and JDBC to access MS SQLserver
I had two problems to access SQL server database:
how to set schema
The table I need to access is under schema 'general' instead of 'dbo'. Unless I use set_table_name, I will get errors like ...
1
vote
0answers
956 views
RuntimeError (Please install the jdbcmysql adapter: `gem install activerecord-jdbcmysql-adapter` (no such file to load — java))
I got an error when I run cucumber feature.
Error:RuntimeError (Please install the jdbcmysql adapter: gem install activerecord-jdbcmysql-adapter (no such file to load — java))
Solution1: Project -> ...
0
votes
2answers
404 views
jruby jdbcmysql adapter does not work with ssl?
I cannot seem to get jdbcmysql to run over ssl.
Downloaded gems:
jdbc-mysql (5.0.4)
jruby-openssl (0.7.1)
Using a normal rails console (not jruby), I got it to run with (sanitized below):
cp = ...
0
votes
2answers
488 views
Jruby Stack Traces
So this might be a dumb question but I don't know what to ask for since 'jruby print stack trace' googled doesn't come up with much thats worthwhile but,
How does one print the stack trace when ...
0
votes
2answers
2k views
JRuby, Rails 2.3.5, MySQL Databases not being created with rake db:create:all
Basic information:
Ruby version : 1.8.7
JRuby version: 1.5.3
Rails version: 2.3.5
Mysql version: Ver 14.14 Distrib 5.1.48, for apple-darwin10.3.0 (i386) using readline 5.1
I've been having a hell ...
1
vote
1answer
153 views
Jruby Activerecord is giving me stale connections
I have a Jruby app that spins up several background Java threads that share an ActiveRecord (2.3.5) connection. If they sleep for some time and then try to do something database related, the first ...
0
votes
2answers
4k views
How to connect to SQL Server using activerecord, JDBC, JTDS and Integrated Security
As per the above, I've tried:
establish_connection(:adapter => "jdbcmssql", :url => "jdbc:jtds:sqlserver://myserver:1433/mydatabase;domain='mynetwork';", :username => 'user', ...
2
votes
1answer
377 views
SQLServer Binary Data with ActiveRecord and JDBC
I'm using the activerecord-jdbc-adapter with ActiveRecord to be able to access a SQLServer database for Rails Application running under jRuby and am having trouble inserting binary data. The Exception ...
1
vote
2answers
301 views
Failing to connect to oracle database
I'm trying to write a jruby script that connects to an oracle database using jdbc.
Thusfar I've got:
require 'rubygems'
require 'jdbc_adapter'
require 'active_record'
require ...
4
votes
3answers
2k views
How to initialize the SQLite3 JDBC driver in JRuby?
How do you access SQLite3 via JDBC without using active record?
0
votes
3answers
698 views
JRruby, Sybase JDBC and DBI - fetching column name with the AS clause issue
I have a ruby script which I run using the JRuby Interpreter.
The script connects to a Sybase database using DBI and Sybase JDBC (jTDS3.jar and jconn3.jar)
My problem is that I have a select query ...
1
vote
2answers
701 views
MySQL connections timing out/being abandoned under JRuby on Rails app on Jetty
We're running a JRuby on Rails application on Jetty, and having reached the staging server prior to launch have suddenly hit a problem with our JDBC connections being abandoned. Here's a lovely ...
2
votes
3answers
3k views
Using Sybase ASE 12.5.4 with jTDS drivers with JRuby
Problem
I am trying to build a small ruby script - which will be run using jruby once a day - to connect to a Sybase ASE 12.5.4 database and perform a complex query.
Ultimately I intend to do some ...
0
votes
2answers
183 views
If I use jRuby, Ruby on Rails, and JDBC, can I still use an ORM?
Can I use Hibernate, for example? Active Record? I have to use jdbc for an older database so I have to use jRuby with Ruby on Rails. Thank you.
3
votes
5answers
8k views
How to connect to Oracle using JRuby & JDBC
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 = ...