Project

General

Profile

Actions

Defect #8972

closed

Is this a bug?

Added by Ivan Cenov over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-08-02
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Redmine, trunk, r6398
Executing
ruby script\about RAILS_ENV=production
produces this result:

d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/connection_adapters/mysql_adapter.rb:620:in `real_connect': Unknown data
'redmine_development' (Mysql::Error)
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/connection_adapters/mysql_adapter.rb:620:in `connect'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/connection_adapters/mysql_adapter.rb:203:in `initialize'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/connection_adapters/mysql_adapter.rb:75:in `new'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/connection_adapters/mysql_adapter.rb:75:in `mysql_connectio
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `sen
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new
ection'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `che
_new_connection'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `che
'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `loo
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `che
'
        from d:/Program Files/Ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `che
'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `conn
n'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `ret
_connection'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/connection_specification.rb:12
`retrieve_connection'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/connection_specification.rb:11
`connection'
        from D:/biz/apps/redmine_trunk/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:217:in `quoted_left_column_name'
        from D:/biz/apps/redmine_trunk/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:93:in `acts_as_nested_set'
        from D:/biz/apps/redmine_trunk/app/models/issue.rb:37
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:406:in `load_without_new_constant_marking
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:406:in `load_file'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:547:in `new_constants_in'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:405:in `load_file'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:285:in `require_or_load'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:250:in `depend_on'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:162:in `require_dependency'
        from D:/biz/apps/redmine_trunk/vendor/plugins/redmine_code_review/lib/code_review_issue_patch.rb:18
        from d:/Program Files/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from d:/Program Files/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:182:in `require'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:547:in `new_constants_in'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:182:in `require'
        from D:/biz/apps/redmine_trunk/vendor/plugins/redmine_code_review/init.rb:26:in `evaluate_init_rb'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin.rb:158:in `evaluate_init_rb'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin.rb:154:in `evaluate_init_rb'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin.rb:48:in `load'
        from D:/biz/apps/redmine_trunk/config/../vendor/plugins/engines/lib/engines/plugin.rb:44:in `load'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin/loader.rb:38:in `load_plugins'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin/loader.rb:37:in `each'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/plugin/loader.rb:37:in `load_plugins'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:369:in `load_plugins'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:165:in `process'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:113:in `send'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:113:in `run'
        from D:/biz/apps/redmine_trunk/config/environment.rb:20
        from d:/Program Files/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from d:/Program Files/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from d:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/commands/about.rb:1
        from d:/Program Files/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from d:/Program Files/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from script/about:4

Is this a bug or I do something illegal?

Actions #1

Updated by Thomas Löber over 13 years ago

Please double-check your config/database.yml configuration.

The redmine_development database seems to be missing.

Actions #2

Updated by Ivan Cenov over 13 years ago

Yes, there is no redmine_development database in my configuration but wonder why this script is searching for it. I also tried
ruby script\about RAILS_ENV=production
and
ruby script\about -e production
but it continues searching for redmine_development

Actions #3

Updated by Jean-Baptiste Barth over 13 years ago

  • Priority changed from Normal to Low

Please copy/paste your config/database.yml file, I'm sure there's something strange in it.

Actions #4

Updated by Ivan Cenov over 13 years ago

Here it is:

# MySQL (default setup).

production:
  adapter: mysql
  database: redmine_trunk
  host: localhost
  username: redmine
  password: redminepwd
  encoding: utf8

development:
  adapter: mysql
  database: redmine_development
  host: localhost
  username: root
  password:
  encoding: utf8

# 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: mysql
  database: redmine_test
  host: localhost
  username: root
  password:
  encoding: utf8

test_pgsql:
  adapter: postgresql
  database: redmine_test
  host: localhost
  username: postgres
  password: "postgres" 

test_sqlite3:
  adapter: sqlite3
  database: db/test.sqlite3

Actions #5

Updated by Thomas Löber over 13 years ago

On Windows, could you please try:

set RAILS_ENV=production
ruby script/about

Please also have a look at issue #4090.

Actions #6

Updated by Ivan Cenov over 13 years ago

Thanks, it works now.
However, I wonder why 'ruby script\server -e production' works without setting RAILS_ENV environment variable.

Actions #7

Updated by Etienne Massip over 13 years ago

  • Category deleted (Database)
  • Status changed from New to Closed
  • Resolution set to Invalid
Actions

Also available in: Atom PDF