JRuby

JRuby 1.2 and Rails 2.3.2 fails to db:create with ActiveRecord 0.9

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: JRuby 1.2
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    All
  • Number of attachments :
    0

Description

I created a template app using the following combinations:

1). JRuby 1.2.0 and Rails 2.2.2
2). JRuby 1.2.0 and Rails 2.3.2
3). JRuby 1.1.6 and Rails 2.2.2
4). JRuby 1.1.6 and Rails 2.3.2

For this template app, db:create creates the database for 1), 3), and 4) and not for 2). ActiveRecord-JDBCMySQL Adapter 0.9 is used.

Activity

Hide
Arun Gupta added a comment -

This occurs only for jdbcmysql adapter, works fine for jdbcmysqlite3 adapter.

Show
Arun Gupta added a comment - This occurs only for jdbcmysql adapter, works fine for jdbcmysqlite3 adapter.
Hide
kevin wells added a comment -

i'm seeing a similar problem as well with ActiveRecord 0.9.1 and config #2. When i call rake db:create:all the command creates test and production but not development.

Show
kevin wells added a comment - i'm seeing a similar problem as well with ActiveRecord 0.9.1 and config #2. When i call rake db:create:all the command creates test and production but not development.
Hide
abikounso added a comment -

I have a similar problem with JRuby 1.3.0, Rails 2.3.2, and ActiveRecord-JDBCMySQL-Adapter 0.9.1.
"rake db:create" doesn't work and terminal doesn't report any errors. When I call "rake db:create:all", creates only test database.

Show
abikounso added a comment - I have a similar problem with JRuby 1.3.0, Rails 2.3.2, and ActiveRecord-JDBCMySQL-Adapter 0.9.1. "rake db:create" doesn't work and terminal doesn't report any errors. When I call "rake db:create:all", creates only test database.
Hide
Michael Johann added a comment -

For me the same issue with 1.3.1 and jdbcmysql and jdbcpostresql 0.9.1.
I'm currently in a three day training talking about JRuby, so it's a bit of a surprise.
Any hints on workarounds?
I currently create the database manually.

Show
Michael Johann added a comment - For me the same issue with 1.3.1 and jdbcmysql and jdbcpostresql 0.9.1. I'm currently in a three day training talking about JRuby, so it's a bit of a surprise. Any hints on workarounds? I currently create the database manually.
Hide
Arun Gupta added a comment -

Not aware of a workaround, I'm creating the database manually as well.

Show
Arun Gupta added a comment - Not aware of a workaround, I'm creating the database manually as well.
Hide
Dave Ray added a comment -

I'm having the same problem with JRuby 1.3.1, ActiveRecord 0.9.1, Rails 2.3.3, and MySQL.
db:create:all creates only test and production as noted above.
db:drop:all does nothing.
I'm glad I checked here because I thought I was going crazy

Show
Dave Ray added a comment - I'm having the same problem with JRuby 1.3.1, ActiveRecord 0.9.1, Rails 2.3.3, and MySQL. db:create:all creates only test and production as noted above. db:drop:all does nothing. I'm glad I checked here because I thought I was going crazy
Hide
Sang Shin added a comment -

Any update on this problem? This is definitely a major bug...

Show
Sang Shin added a comment - Any update on this problem? This is definitely a major bug...
Hide
Charles Oliver Nutter added a comment -

Maybe if we got this moved over to the kenai.com AR-JDBC project it would be more likely to get attention?

http://kenai.com/projects/activerecord-jdbc

Show
Charles Oliver Nutter added a comment - Maybe if we got this moved over to the kenai.com AR-JDBC project it would be more likely to get attention? http://kenai.com/projects/activerecord-jdbc
Hide
Gytis Gurklys added a comment -

Simple workaround for creating development db. I just copied existing env to a new environment called archive and now create:db:all creates dev env as well. Skips archive, of course .

Show
Gytis Gurklys added a comment - Simple workaround for creating development db. I just copied existing env to a new environment called archive and now create:db:all creates dev env as well. Skips archive, of course .
Hide
maarten bos added a comment -

I got the same issue . it seems it is caused by the rails rake task {rails_gem}/lib/tasks/database.rake
there is some adapter specific code in there. around line 56 there is the code: when 'mysql' . Changing it to a regular expression (like is allready done with sqlite) to 'when /mysql/' seems to have solved the problem for me.

Show
maarten bos added a comment - I got the same issue . it seems it is caused by the rails rake task {rails_gem}/lib/tasks/database.rake there is some adapter specific code in there. around line 56 there is the code: when 'mysql' . Changing it to a regular expression (like is allready done with sqlite) to 'when /mysql/' seems to have solved the problem for me.
Hide
Nick Sieger added a comment -

In 676f700.

Show
Nick Sieger added a comment - In 676f700.
Hide
yo added a comment -

Issue in rails 2.3.4 and jruby 1.4.0RC2 with db:test:prepare. Work around with /mysql/ worked.

Show
yo added a comment - Issue in rails 2.3.4 and jruby 1.4.0RC2 with db:test:prepare. Work around with /mysql/ worked.

People

Vote (3)
Watch (5)

Dates

  • Created:
    Updated:
    Resolved: