Bug 167017 - Cannot create *_development db with db:create
Cannot create *_development db with db:create
Status: RESOLVED WONTFIX
Product: ruby
Classification: Unclassified
Component: Rake
6.x
All Windows Vista
: P3 (vote)
: 6.x
Assigned To: Erno Mononen
issues@ruby
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-13 00:13 UTC by Jeffrey Rubinoff
Modified: 2010-03-16 09:17 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffrey Rubinoff 2009-06-13 00:13:07 UTC
I've been testing the Ruby Weblog in 10 Minutes tutorial. When I reach the part where I use db:create to create
databases, I do not create a rubyweblog_development database in my MySQL server. I create the _test and _production
databases without problem. The database.yml entry for development: is identical, except for names, to the database.yml
entries for the test: and production: databases. To wit:

development:
  adapter: jdbcmysql
  encoding: utf8
  reconnect: false
  database: rubyweblog_development
  pool: 5
  username: root
  password:
  host: localhost

test:
  adapter: jdbcmysql
  encoding: utf8
  reconnect: false
  database: rubyweblog_test
  pool: 5
  username: root
  password:
  host: localhost

As a workaround, I can use NB database management to manually create a rubyweblog_development database and then migrate
it to the current version.
Comment 1 Jeffrey Rubinoff 2009-06-15 09:47:16 UTC
Some additional information:
The db:create:all function also does not create rubyweblog_development. It is the function I used to create
rubyweblog_test and rubyweblog_production.
I first tried this with no Rails environment set, but even with the "development" environment selected, the function did
not work.
Comment 2 Jeffrey Rubinoff 2009-06-15 10:02:58 UTC
I cannot create rubyweblog_test with db:create and the RAILS_ENV=test parameter, either.
I'm sorry that I originally said I created the test and production db's with db: create. I'm sure I did but it doesn't
seem to work now. Maybe I created them with db:create:all instead, or maybe there is a regression between RC2 and RC3. I
have the latest dev Ruby plugin now for RC2 so can't retry.
Comment 3 Erno Mononen 2009-07-03 11:55:18 UTC
I think AR-JDBC is at fault - can you try running rake db:create --trace from the command line (in the project 
directory)?
Comment 4 Erno Mononen 2009-08-25 09:06:01 UTC
Caused by this issue:

http://jira.codehaus.org/browse/JRUBY-3502 
Comment 5 hassanh 2009-09-09 21:23:47 UTC
it looks like the first entry in the database.yml is being skiped add an extra database definition as bellow
archive:
  adapter: jdbcmysql

  encoding: utf8
  reconnect: false
  database: archive
  pool: 5
  username: root
  password: 
  host: localhost

development:
  adapter: jdbcmysql

  encoding: utf8
  reconnect: false
  database: library_development
  pool: 5
  username: root
  password: 
  host: localhost
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: jdbcmysql
  encoding: utf8
  reconnect: false
  database: library_test
  pool: 5
  username: root
  password: 
  host: localhost

production:
  adapter: jdbcmysql
  encoding: utf8
  reconnect: false
  database: library_production
  pool: 5
  username: root
  password: 
  host: localhost
Comment 6 Erno Mononen 2010-03-16 09:17:45 UTC
Closing as wontfix, the bug is in AR-JDBC. I will update the bundled gems for 6.9 anyway, so 6.9 will ship with a newer version of AR-JDBC.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo