cd project
rails server
/usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/fileutils.rb:90: warning: already initialized constant FileUtils::VERSION
/usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:92: warning: previous definition of VERSION was here
/usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/fileutils.rb:1188: warning: already initialized constant FileUtils::Entry_::S_IF_DOOR
/usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1267: warning: previous definition of S_IF_DOOR was here
/usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/fileutils.rb:1446: warning: already initialized constant FileUtils::Entry_::DIRECTORY_TERM
/usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1541: warning: previous definition of DIRECTORY_TERM was here
/usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/fileutils.rb:1448: warning: already initialized constant FileUtils::Entry_::SYSCASE
/usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1543: warning: previous definition of SYSCASE was here
/usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/fileutils.rb:1501: warning: already initialized constant FileUtils::OPT_TABLE
/usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1596: warning: previous definition of OPT_TABLE was here
/usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/fileutils.rb:1555: warning: already initialized constant FileUtils::LOW_METHODS
/usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1650: warning: previous definition of LOW_METHODS was here
/usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/fileutils.rb:1562: warning: already initialized constant FileUtils::METHODS
/usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1657: warning: previous definition of METHODS was here
WARNING: Nokogiri was built against LibXML version 2.9.4, but has dynamically loaded 2.8.0
=> Booting Puma
=> Rails 5.2.0 application starting in development
=> Run `rails server -h` for more startup options
[27673] Puma starting in cluster mode...
[27673] * Version 3.6.2 (ruby 2.5.1-p57), codename: Sleepy Sunday Serenity
[27673] * Min threads: 5, max threads: 5
[27673] * Environment: development
[27673] * Process workers: 1
[27673] * Preloading application
[27673] * Listening on tcp://localhost:3000
[27673] Use Ctrl-C to stop
Traceback (most recent call last):
29: from bin/rails:4:in `<main>'
28: from bin/rails:4:in `require'
27: from /usr/local/lib/ruby/gems/2.5.0/gems/railties-5.2.0/lib/rails/commands.rb:18:in `<top (required)>'
26: from /usr/local/lib/ruby/gems/2.5.0/gems/railties-5.2.0/lib/rails/command.rb:46:in `invoke'
25: from /usr/local/lib/ruby/gems/2.5.0/gems/railties-5.2.0/lib/rails/command/base.rb:65:in `perform'
24: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
23: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
22: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
21: from /usr/local/lib/ruby/gems/2.5.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:142:in `perform'
20: from /usr/local/lib/ruby/gems/2.5.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:142:in `tap'
19: from /usr/local/lib/ruby/gems/2.5.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:147:in `block in perform'
18: from /usr/local/lib/ruby/gems/2.5.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:53:in `start'
17: from /usr/local/lib/ruby/gems/2.5.0/gems/rack-2.0.5/lib/rack/server.rb:297:in `start'
16: from /usr/local/lib/ruby/gems/2.5.0/gems/puma-3.6.2/lib/rack/handler/puma.rb:51:in `run'
15: from /usr/local/lib/ruby/gems/2.5.0/gems/puma-3.6.2/lib/puma/launcher.rb:172:in `run'
14: from /usr/local/lib/ruby/gems/2.5.0/gems/puma-3.6.2/lib/puma/cluster.rb:426:in `run'
13: from /usr/local/lib/ruby/gems/2.5.0/gems/puma-3.6.2/lib/puma/cluster.rb:116:in `spawn_workers'
12: from /usr/local/lib/ruby/gems/2.5.0/gems/puma-3.6.2/lib/puma/cluster.rb:116:in `times'
11: from /usr/local/lib/ruby/gems/2.5.0/gems/puma-3.6.2/lib/puma/cluster.rb:120:in `block in spawn_workers'
10: from /usr/local/lib/ruby/gems/2.5.0/gems/puma-3.6.2/lib/puma/cluster.rb:120:in `fork'
9: from /usr/local/lib/ruby/gems/2.5.0/gems/puma-3.6.2/lib/puma/cluster.rb:120:in `block (2 levels) in spawn_workers'
8: from /usr/local/lib/ruby/gems/2.5.0/gems/puma-3.6.2/lib/puma/cluster.rb:237:in `worker'
7: from /usr/local/lib/ruby/gems/2.5.0/gems/puma-3.6.2/lib/puma/configuration.rb:271:in `run_hooks'
6: from /usr/local/lib/ruby/gems/2.5.0/gems/puma-3.6.2/lib/puma/configuration.rb:271:in `each'
5: from /usr/local/lib/ruby/gems/2.5.0/gems/puma-3.6.2/lib/puma/configuration.rb:271:in `block in run_hooks'
4: from config/puma.rb:13:in `block in _load_from'
3: from /usr/local/lib/ruby/gems/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_handling.rb:57:in `establish_connection'
2: from /usr/local/lib/ruby/gems/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/connection_specification.rb:143:in `resolve'
1: from /usr/local/lib/ruby/gems/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/connection_specification.rb:241:in `resolve_connection'
/usr/local/lib/ruby/gems/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/connection_specification.rb:260:in `resolve_symbol_connection': 'development' database is not configured. Available: [] (ActiveRecord::AdapterNotSpecified)
Моя база данных - это соединение с моим сервером [project] в PGAdmin4. Я также Progresql 9.8 с
database.yml PostgreSQL.Версии 7.4 и 8.x поддерживаются.# # Установите драйвер pg: # gem install pg # В Windows: # gem install pg # Выберите сборку win32.# Установите PostgreSQL и поместите в него каталог / bin.
development: адаптер: postgresql кодировка: база данных unicode: pcms_development host: localhost pool: 5 имя пользователя: пароль root: порт: 3306
test:
adapter: postgresql
encoding: unicode
database: pcms_test
host: localhost
pool: 5
username: root
password: # <%= Rails.applications.secrets[:database][:password] %>
Я бы хотел работать с изменениями приложения, прежде чем отправлять их в Github => Heruko (прямая трансляция).До этого все было отправлено на Github => Heroku. Прямая трансляция потерпит неудачу.
bundle exec rake db:create
/usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/fileutils.rb:90: warning: already initialized constant FileUtils::VERSION
/usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:92: warning: previous definition of VERSION was here
/usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/fileutils.rb:1188: warning: already initialized constant FileUtils::Entry_::S_IF_DOOR
/usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1267: warning: previous definition of S_IF_DOOR was here
/usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/fileutils.rb:1446: warning: already initialized constant FileUtils::Entry_::DIRECTORY_TERM
/usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1541: warning: previous definition of DIRECTORY_TERM was here
/usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/fileutils.rb:1448: warning: already initialized constant FileUtils::Entry_::SYSCASE
/usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1543: warning: previous definition of SYSCASE was here
/usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/fileutils.rb:1501: warning: already initialized constant FileUtils::OPT_TABLE
/usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1596: warning: previous definition of OPT_TABLE was here
/usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/fileutils.rb:1555: warning: already initialized constant FileUtils::LOW_METHODS
/usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1650: warning: previous definition of LOW_METHODS was here
/usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/fileutils.rb:1562: warning: already initialized constant FileUtils::METHODS
/usr/local/lib/ruby/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1657: warning: previous definition of METHODS was here
WARNING: Nokogiri was built against LibXML version 2.9.4, but has dynamically loaded 2.8.0
** Invoke db: create (first_time) ** Invoke db: load_config (first_time) ** Invoke environment (first_time) ** Execute environment ** Выполнить db: load_config rake отменено!NoMethodError: Невозможно загрузить Rails.application.database_configuration
: неопределенный метод applications' for Rails:Module
Did you mean? application
application=
(erb):28:in
'/usr/local/lib/ruby/gems/2.5.0/gems/railties-5.2.0/lib/rails/application/configuration.rb:172:indatabase_configuration'
/usr/local/lib/ruby/gems/2.5.0/gems/activerecord-5.2.0/lib/active_record/railtie.rb:39:in
блок (3 уровня) в '/usr/local/lib/ruby/gems/2.5.0/gems/bugsnag-6.7.3/lib/bugsnag/integrations/rake.rb:18:in execute_with_bugsnag'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.1/exe/rake:27:in
'/ usr / local / bin / bundle: 30: in block in <main>'
/usr/local/bin/bundle:22:in
'
Причина: NoMethodError: неопределенный метод applications' for Rails:Module
Did you mean? application
application=
(erb):28:in
' /usr/local/lib/ruby/gems/2.5.0/gems/railties-5.2.0 / lib / rails / application / configuration.rb: 172: в блоке database_configuration'
/usr/local/lib/ruby/gems/2.5.0/gems/activerecord-5.2.0/lib/active_record/railtie.rb:39:in
(3 уровня) в '/usr/local/lib/ruby/gems/2.5.0/gems/bugsnag-6.7.3 / lib / bugsnag / Integration / rake.rb: 18: в execute_with_bugsnag'
/usr/local/lib/ruby/gems/2.5.0/gems/rake-12.3.1/exe/rake:27:in
'/ usr / local / bin / bundle: 30: в block in <main>'
/usr/local/bin/bundle:22:in
' Задачи: TOP => db: create => db: load_config (см.полная трассировка путем запуска задачи с --trace)