0
votes
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)

My database is connection to my [project] server in PGAdmin4 I also Progresql 9.8 running

database.yml PostgreSQL. Versions 7.4 and 8.x are supported. # # Install the pg driver: # gem install pg # On Windows: # gem install pg # Choose the win32 build. # Install PostgreSQL and put its /bin directory on your path.

development: adapter: postgresql encoding: unicode database: pcms_development host: localhost pool: 5 username: root password: port: 3306

test:
 adapter: postgresql
 encoding: unicode
 database: pcms_test
 host: localhost
 pool: 5
 username: root
 password: # <%= Rails.applications.secrets[:database][:password] %>

I would like to be able to work the app changes before pushing them to Github => Heruko (live feed). Before this everything was pushed to Github => Heroku The live feed would fail.

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 ** Execute db:load_config rake aborted! NoMethodError: Cannot load Rails.application.database_configuration: undefined method 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:in database_configuration' /usr/local/lib/ruby/gems/2.5.0/gems/activerecord-5.2.0/lib/active_record/railtie.rb:39:inblock (3 levels) in ' /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'

Caused by: NoMethodError: undefined method 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:in database_configuration' /usr/local/lib/ruby/gems/2.5.0/gems/activerecord-5.2.0/lib/active_record/railtie.rb:39:inblock (3 levels) in ' /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' Tasks: TOP => db:create => db:load_config (See full trace by running task with --trace)

1

1 Answers

1
votes

I think the issue is simpler. Just call

bundle exec rake db:create
bundle exec rake db:migrate