Project

General

Profile

Redmine installation problems rake command issue

Added by Andre Flory about 13 years ago

I have somewhat of a complex issue involving several different programs including redmine, MySQL, Ruby, Ruby on Rails etc. This is on Windows XP.

I am following the redmine instructions here: http://www.redmine.org/projects/redmine/wiki/RedmineInstall

I am on step 5. where I am suppose to type "RAILS_ENV=production rake db:migrate"

When I type this in the command prompt and hit enter I get an error: "RAILS_ENV" is not a command blah blah.

So I reorder it to: rake db:migrate RAILS_ENV=production

This seems to work correct, but I get the following:

===============================================================
C:\redmine-1.2.1>rake db:migrate RAILS_ENV=production --trace
NOTE: SourceIndex.new(hash) is deprecated; From C:/redmine-1.2.1/config/../vendo
r/rails/railties/lib/rails/vendor_gem_source_index.rb:100:in `new'.
rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)
WARNING: 'task :t, arg, :needs => [deps]' is deprecated. Please use 'task :t, [
args] => [deps]' instead.
at C:/redmine-1.2.1/lib/tasks/email.rake:170
  • Invoke db:migrate (first_time)
  • Invoke environment (first_time)
  • Execute environment
    rake aborted!
    Access denied for user 'redmine'@'localhost' (using password: YES)
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
    /mysql_adapter.rb:620:in `real_connect'
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
    /mysql_adapter.rb:620:in `connect'
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
    /mysql_adapter.rb:203:in `initialize'
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
    /mysql_adapter.rb:75:in `new'
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
    /mysql_adapter.rb:75:in `mysql_connection'
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
    /abstract/connection_pool.rb:223:in `send'
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
    /abstract/connection_pool.rb:223:in `new_connection'
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
    /abstract/connection_pool.rb:245:in `checkout_new_connection'
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
    /abstract/connection_pool.rb:188:in `checkout'
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
    /abstract/connection_pool.rb:184:in `loop'
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
    /abstract/connection_pool.rb:184:in `checkout'
    C:/Ruby187/lib/ruby/1.8/monitor.rb:242:in `synchronize'
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
    /abstract/connection_pool.rb:183:in `checkout'
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
    /abstract/connection_pool.rb:98:in `connection'
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
    /abstract/connection_pool.rb:326:in `retrieve_connection'
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
    /abstract/connection_specification.rb:123:in `retrieve_connection'
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
    /abstract/connection_specification.rb:115:in `connection'
    C:/redmine-1.2.1/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:217
    :in `quoted_left_column_name'
    C:/redmine-1.2.1/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:93:
    in `acts_as_nested_set'
    C:/redmine-1.2.1/app/models/issue.rb:37
    C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in `gem_original
    _require'
    C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in `require'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
    84:in `require'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:2
    91:in `require_or_load_without_engine_additions'
    C:/redmine-1.2.1/vendor/plugins/engines/lib/engines/rails_extensions/dependencie
    s.rb:132:in `require_or_load'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
    51:in `load_missing_constant'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
    06:in `const_missing'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
    18:in `const_missing'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
    63:in `load_missing_constant'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
    22:in `const_missing'
    C:/redmine-1.2.1/app/models/project.rb:40
    C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in `gem_original
    _require'
    C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in `require'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
    84:in `require'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:2
    91:in `require_or_load_without_engine_additions'
    C:/redmine-1.2.1/vendor/plugins/engines/lib/engines/rails_extensions/dependencie
    s.rb:132:in `require_or_load'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
    51:in `load_missing_constant'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
    06:in `const_missing'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
    18:in `const_missing'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
    63:in `load_missing_constant'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
    22:in `const_missing'
    C:/redmine-1.2.1/app/models/attachment.rb:36
    C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in `gem_original
    _require'
    C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in `require'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
    84:in `require'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:2
    91:in `require_or_load_without_engine_additions'
    C:/redmine-1.2.1/vendor/plugins/engines/lib/engines/rails_extensions/dependencie
    s.rb:132:in `require_or_load'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
    51:in `load_missing_constant'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
    06:in `const_missing'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
    18:in `const_missing'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
    63:in `load_missing_constant'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
    06:in `const_missing'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
    63:in `load_missing_constant'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
    06:in `const_missing'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
    63:in `load_missing_constant'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
    06:in `const_missing'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
    63:in `load_missing_constant'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
    06:in `const_missing'
    C:/redmine-1.2.1/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:33:
    in `acts_as_attachable'
    C:/redmine-1.2.1/app/models/message.rb:22
    C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in `gem_original
    _require'
    C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in `require'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
    84:in `require'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:2
    91:in `require_or_load_without_engine_additions'
    C:/redmine-1.2.1/vendor/plugins/engines/lib/engines/rails_extensions/dependencie
    s.rb:132:in `require_or_load'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:4
    51:in `load_missing_constant'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
    06:in `const_missing'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
    18:in `const_missing'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/inflector.rb:364:
    in `constantize'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/inflector.rb:363:
    in `each'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/inflector.rb:363:
    in `constantize'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/core_ext/string/i
    nflections.rb:162:in `constantize'
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/observer.rb:157:in
    `observed_class'
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/observer.rb:183:in
    `observed_classes'
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/observer.rb:166:in
    `initialize'
    C:/Ruby187/lib/ruby/1.8/singleton.rb:94:in `new'
    C:/Ruby187/lib/ruby/1.8/singleton.rb:94:in `instance'
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/observer.rb:38:in `
    instantiate_observers'
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/observer.rb:36:in `
    each'
    C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/observer.rb:36:in `
    instantiate_observers'
    C:/redmine-1.2.1/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:15:
    in `define_dispatcher_callbacks'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:
    in `call'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:
    in `evaluate_method'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:166:
    in `call'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:i
    n `run'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:i
    n `each'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:i
    n `send'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:i
    n `run'
    C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/callbacks.rb:276:
    in `run_callbacks'
    C:/redmine-1.2.1/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:51:
    in `send'
    C:/redmine-1.2.1/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:51:
    in `run_prepare_callbacks'
    C:/redmine-1.2.1/config/../vendor/rails/railties/lib/initializer.rb:631:in `prep
    are_dispatcher'
    C:/redmine-1.2.1/config/../vendor/rails/railties/lib/initializer.rb:185:in `proc
    ess'
    C:/redmine-1.2.1/config/../vendor/rails/railties/lib/initializer.rb:113:in `send
    '
    C:/redmine-1.2.1/config/../vendor/rails/railties/lib/initializer.rb:113:in `run'

C:/redmine-1.2.1/config/environment.rb:20
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original
require'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
82:in `require'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:5
47:in `new_constants_in'
C:/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:1
82:in `require'
C:/redmine-1.2.1/vendor/rails/railties/lib/tasks/misc.rake:4
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `execute'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:158:in `invoke_wit
h_call_chain'
C:/Ruby187/lib/ruby/1.8/monitor.rb:242:in `synchronize'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_wit
h_call_chain'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:176:in `invoke_pre
requisites'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:174:in `each'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:174:in `invoke_pre
requisites'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:157:in `invoke_wit
h_call_chain'
C:/Ruby187/lib/ruby/1.8/monitor.rb:242:in `synchronize'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_wit
h_call_chain'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:112:in `inv
oke_task'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top

level'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `each
'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_
level'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `sta
ndard_exception_handling'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_
level'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:62:in `run'

C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `sta
ndard_exception_handling'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'

C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2/bin/rake:32
C:/Ruby187/bin/rake:19:in `load'
C:/Ruby187/bin/rake:19
Tasks: TOP => db:migrate => environment

C:\redmine-1.2.1> ===============================================================

Here is my database.yml file contents:

###############################################################

  1. MySQL (default setup).

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

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

  1. Warning: The database defined as "test" will be erased and
  2. re-generated from your development database when you run "rake".
  3. 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

###############################################################

I really need some direction here. It's almost like there is a problem with my users/passwords. I have changed the passwords not to contain "!" or any other special characters. I do have capital and lower case letters.

Any help would be greatly appreciated.

DemiSheep


Replies (3)

RE: Redmine installation problems rake command issue - Added by Ivan Cenov about 13 years ago

it seems you cannot log into database ...

Access denied for user 'redmine'@'localhost' (using password: YES)

RE: Redmine installation problems rake command issue - Added by Andre Flory about 13 years ago

I just got past that error, it was a problem with my password, inside my database file for redmine, database.yml.

Now I am getting this error:

========================================================================
C:\redmine-1.2.1>rake db:migrate RAILS_ENV=production
NOTE: SourceIndex.new(hash) is deprecated; From
C:/redmine-1.2.1/config/../vendo
r/rails/railties/lib/rails/vendor_gem_source_index.rb:100:in `new'.
rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)
WARNING: 'task :t, arg, :needs => [deps]' is deprecated. Please use
'task :t, [
args] => [deps]' instead.
at C:/redmine-1.2.1/lib/tasks/email.rake:170
rake aborted!
Mysql::Error: query: not connected: CREATE TABLE `schema_migrations`
(`version`
varchar(255) NOT NULL) ENGINE=InnoDB

Tasks: TOP => db:migrate
(See full trace by running task with --trace)

C:\redmine-1.2.1>rake db:migrate RAILS_ENV=production ========================================================================

btw, I am using Windows XP, so there is no bash etc.

RE: Redmine installation problems rake command issue - Added by Etienne Massip about 13 years ago

On windows, you need to set your RAILS_ENV apart.

set RAILS_ENV=production
rake db:migrate
    (1-3/3)