Problem with JRuby, Rails2.3.2 and OracleXE

Hi @all,

I’m new in the JRuby on Rails world. I have to setup following

Database: oracle XE
Language: jruby 1.3.1 (ruby 1.8.6p287) (OpenJDK 64-Bit Server VM
1.6.0_0 [amd64-java]
Framework: Rails 2.3.2
Adapter: ActiveRecord-JDBC

After installation I created my first project with the given setup:

jruby -S rails test

adapter: jdbc
driver: oracle.jdbc.OracleDriver
url: jdbc:oracle:thin:@localhost:1521:XE
username: jrubyuser
password: jrubyuser

After that I created a model like this:

jruby -S script/generate model Test

Now I want to migrate the generate migration, but I got an error:

jruby -S rake db:migrate
== CreateProducts: migrating

– create_table(:products)
-> 0.0140s
-> 0 rows
== CreateProducts: migrated (0.0140s)

rake aborted!
An error has occurred, all later migrations canceled:

ActiveRecord::ActiveRecordError: ORA-02289: sequence does not exist
: select schema_migrations_seq.nextval id from dual

First I thought thats an oracle problem but I tried the same thing with
ruby and the activerecord-oracle-adapter, in this case the migration is
working on the same tablespace of the oracle database.

I searched for this problem in the net, but didnt find a solution, could
anybody help me please?

Thanks a lot,

I have the same problem. Did you find solution?


Pavlo Kuzmenko wrote:

I have the same problem. Did you find solution?


First of all, we patched the ActiveRecord-JDBC adapter but over the time
we find more and more unexpected behaviors. So we decided to choose the
oracle enhanced adapter:

With this adapter all problems are solved.