Hi @all,
I’m new in the JRuby on Rails world. I have to setup following
environment:
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
database.yml:
development:
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,
Maik