Support #1912
closedproduction database is not configured
Description
Hello,
I am new installing and configuring Foreman. My installation includes puppetmaster, passenger, RabbitMQ & MCollective un der Centos 6.3
All the dependencies and packages have been installed and configured as per instructions. But when I run "RAILS_ENV=production rake db:migrate --trace" it aborts. Below are the versions and trace:
Distributor ID: CentOS
Description: CentOS release 6.3 (Final)
Release: 6.3
Codename: Final
foreman-0.1.6-2.noarch
rabbitmq-server-2.5.1-1.noarch
mcollective-common-2.2.1-1.el6.noarch
mcollective-2.2.1-1.el6.noarch
mcollective-client-2.2.1-1.el6.noarch
puppet-server-2.7.19-1.el6.noarch
puppet-2.7.19-1.el6.noarch
activemodel (3.0.10)
activerecord (3.0.10)
activesupport (3.0.10)
arel (2.0.10)
builder (2.1.2)
daemon_controller (1.0.0)
fastthread (1.0.7)
i18n (0.5.0)
mysql2 (0.3.11)
passenger (3.0.17)
rack (1.4.1)
rake (0.8.7)
sqlite3-ruby (1.2.4)
stomp (1.2.2)
tzinfo (0.3.33)
The trace:
RAILS_ENV=production rake db:migrate --trace(in /usr/share/foreman)
- Invoke db:migrate (first_time)
- Invoke environment (first_time)
- Execute environment
rake aborted!
production database is not configured
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:62:in `establish_connection'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:55:in `establish_connection'
/usr/share/foreman/config/../vendor/rails/railties/lib/initializer.rb:438:in `initialize_database'
/usr/share/foreman/config/../vendor/rails/railties/lib/initializer.rb:141:in `process'
/usr/share/foreman/config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
/usr/share/foreman/config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
/usr/share/foreman/config/environment.rb:9
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/usr/share/foreman/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
/usr/share/foreman/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
/usr/share/foreman/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
/usr/share/foreman/vendor/rails/railties/lib/tasks/misc.rake:4
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:635:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:635:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:630:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:630:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:589:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:606:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:603:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:603:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:595:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:589:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:582:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2050:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2022:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1997:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
---------------------------------------------------------------------------------------
Please let me know if you need more information
I have this files in /usr/share/foreman/config
drwxr-xr-x 5 root root 4.0K Oct 22 11:49 .
drwxr-xr-x 9 root root 4.0K Oct 22 11:28 ..rw-r--r- 1 root root 2.8K Nov 12 2010 boot.rbrw-r--r- 1 root root 159 Oct 22 11:28 database.yml
lrwxrwxrwx 1 root root 23 Oct 22 11:28 email.yaml > /etc/foreman/email.yaml 1 foreman foreman 2.1K Nov 12 2010 environment.rb
-rw-r--r-
drwxr-xr-x 2 root root 4.0K Oct 22 11:49 environments
drwxr-xr-x 2 root root 4.0K Oct 22 11:28 initializers
drwxr-xr-x 2 root root 4.0K Oct 22 11:28 localesrw-r--r- 1 root root 2.5K Nov 12 2010 routes.rbrw-r--r- 1 root root 237 Oct 22 11:28 settings.yaml
- cat database.yml
production:
adapter: mysql
database: puppet
username: puppet
password: xxxxxxxxxxxxxxxxxxxxxxx
socket: "/var/lib/mysql/mysql.sock"
host: localhost
encoding: utf8
mysql> show databases;------------------
| Database |------------------
| information_schema |
| mysql |
| puppet |
| test |------------------
4 rows in set (0.00 sec)
mysql> show tables;
Empty set (0.00 sec)
ls al /usr/share/foreman/config/environments 1 root root 820 Nov 12 2010 development.rb
-rw-r--r-rw-r--r- 1 root root 1011 Nov 12 2010 production.rbrw-r--r- 1 root root 1.4K Nov 12 2010 test.rb
- Settings specified here will take precedence over those in config/environment.rb
- The production environment is meant for finished, "live" apps.
- Code is not reloaded between requests
config.cache_classes = true
- Full error reports are disabled and caching is turned on
config.action_controller.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.action_view.cache_template_loading = true
- See everything in the log (default is :info)
- config.log_level = :debug
- Use a different logger for distributed setups
- config.logger = SyslogLogger.new
- Use a different cache store in production
- config.cache_store = :mem_cache_store
- Enable serving of images, stylesheets, and javascripts from an asset server
- config.action_controller.asset_host = "http://assets.example.com"
- Disable delivery errors, bad email addresses will be ignored
- config.action_mailer.raise_delivery_errors = false
- Enable threaded mode
- config.threadsafe!puppet.xxxx.com:/usr/share/foreman/config/environments (Mon Oct 22 -- 12:38:35)
Please let me know if you need additional information.
Thanks in advance,
Andrew