ruby on rails - (postgreSQL error) FATAL: role "demo" does not exist (PG::Error) -
so i've installed postgresql homebrew , have initialized new demo_app the: rails new demo_app -d postgresql command.
albeit, getting following error when starting server rails s.
snippit:
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `initialize': fatal: role "demo" not exist (pg::error)
full log:
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `initialize': fatal: role "demo" not exist (pg::error) /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `new' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `connect' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:324:in `initialize' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `new' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `postgresql_connection' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout' /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection' /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.13/lib/active_record/railtie.rb:88:in `block in <class:railtie>' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing' /users/anthonypanepinto/sites/new_demo/demo/config/environment.rb:5:in `<top (required)>' /users/anthonypanepinto/sites/new_demo/demo/config.ru:3:in `require' /users/anthonypanepinto/sites/new_demo/demo/config.ru:3:in `block in <main>' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize' /users/anthonypanepinto/sites/new_demo/demo/config.ru:in `new' /users/anthonypanepinto/sites/new_demo/demo/config.ru:in `<main>' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.5/lib/rack/server.rb:200:in `app' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.5/lib/rack/server.rb:254:in `start' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap' /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>' script/rails:6:in `require' script/rails:6:in `<main>'
when create rails app, must create database postgres works.
createdb demo
and check config/database.yml
Comments
Post a Comment