Error setting up my database when trying to clone this repo (https://github.com/ssaffa38/prelaunchr) and running it on my local server. Where I'm getting is stuck is where it is asking to setup local database.
The code I'm putting in is:
bundle exec rake db:create
bundle exec rake db:migrate
The error I keep getting is:
Specified 'postgresql' for database adapter, but the gem is not loaded. Add
gem 'pg'
to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
What I've tried to do is update my Gemfile, but still have no luck.
Here is the full error report in my terminal (not sure if this is where I have to post this...):
Specified 'postgresql' for database adapter, but the gem is not loaded. Add gem 'pg'
to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/connection_specification.rb:177:in rescue in spec' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/connection_specification.rb:174:in
spec' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/connection_handling.rb:50:in establish_connection' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/tasks/postgresql_database_tasks.rb:6:in
establish_connection' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/tasks/postgresql_database_tasks.rb:76:in establish_master_connection' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/tasks/postgresql_database_tasks.rb:14:in
create' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/tasks/database_tasks.rb:93:in create' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/tasks/database_tasks.rb:107:in
block in create_current' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/tasks/database_tasks.rb:278:in block in each_current_configuration' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/tasks/database_tasks.rb:277:in
each' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/tasks/database_tasks.rb:277:in each_current_configuration' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/tasks/database_tasks.rb:106:in
create_current' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/railties/databases.rake:17:in block (2 levels) in <top (required)>' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/task.rb:281:in
block in execute' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/task.rb:281:in each' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/task.rb:281:in
execute' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/task.rb:219:in block in invoke_with_call_chain' /Users/sahrsaffa/.rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/monitor.rb:226:in
mon_synchronize' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/task.rb:199:in invoke_with_call_chain' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/task.rb:188:in
invoke' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/application.rb:160:in invoke_task' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/application.rb:116:in
block (2 levels) in top_level' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/application.rb:116:in each' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/application.rb:116:in
block in top_level' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/application.rb:125:in run_with_threads' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/application.rb:110:in
top_level' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/application.rb:83:in block in run' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/application.rb:186:in
standard_exception_handling' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/application.rb:80:in run' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/exe/rake:27:in
<top (required)>' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/bin/rake:23:in load' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/bin/rake:23:in
' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:22:in eval' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:22:in
' Couldn't create database for {"adapter"=>"postgresql", "database"=>"prelaunchr_development", "host"=>"localhost"} Specified 'postgresql' for database adapter, but the gem is not loaded. Add gem 'pg'
to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/connection_specification.rb:177:in rescue in spec' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/connection_specification.rb:174:in
spec' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/connection_handling.rb:50:in establish_connection' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/tasks/postgresql_database_tasks.rb:6:in
establish_connection' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/tasks/postgresql_database_tasks.rb:76:in establish_master_connection' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/tasks/postgresql_database_tasks.rb:14:in
create' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/tasks/database_tasks.rb:93:in create' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/tasks/database_tasks.rb:107:in
block in create_current' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/tasks/database_tasks.rb:278:in block in each_current_configuration' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/tasks/database_tasks.rb:277:in
each' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/tasks/database_tasks.rb:277:in each_current_configuration' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/tasks/database_tasks.rb:106:in
create_current' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/railties/databases.rake:17:in block (2 levels) in <top (required)>' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/task.rb:281:in
block in execute' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/task.rb:281:in each' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/task.rb:281:in
execute' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/task.rb:219:in block in invoke_with_call_chain' /Users/sahrsaffa/.rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/monitor.rb:226:in
mon_synchronize' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/task.rb:199:in invoke_with_call_chain' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/task.rb:188:in
invoke' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/application.rb:160:in invoke_task' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/application.rb:116:in
block (2 levels) in top_level' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/application.rb:116:in each' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/application.rb:116:in
block in top_level' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/application.rb:125:in run_with_threads' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/application.rb:110:in
top_level' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/application.rb:83:in block in run' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/application.rb:186:in
standard_exception_handling' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/lib/rake/application.rb:80:in run' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/exe/rake:27:in
<top (required)>' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/bin/rake:23:in load' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/bin/rake:23:in
' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:22:in eval' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:22:in
' Couldn't create database for {"adapter"=>"postgresql", "database"=>"prelaunchr_test", "host"=>"localhost"} rake aborted! Gem::LoadError: Specified 'postgresql' for database adapter, but the gem is not loaded. Add gem 'pg'
to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/connection_specification.rb:177:in rescue in spec' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/connection_specification.rb:174:in
spec' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/connection_handling.rb:50:in establish_connection' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/tasks/database_tasks.rb:109:in
create_current' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/railties/databases.rake:17:in block (2 levels) in <top (required)>' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/exe/rake:27:in
<top (required)>' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:22:in eval' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:22:in
'
Caused by: Gem::LoadError: can't activate pg (~> 0.15), already activated pg-1.2.3. Make sure all dependencies are added to Gemfile. /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/postgresql_adapter.rb:16:in <top (required)>' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in
require' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in block in require' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:240:in
load_dependency' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in require' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/connection_specification.rb:175:in
spec' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/connection_handling.rb:50:in establish_connection' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/tasks/database_tasks.rb:109:in
create_current' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/activerecord-4.2.11.3/lib/active_record/railties/databases.rake:17:in block (2 levels) in <top (required)>' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/gems/rake-13.0.6/exe/rake:27:in
<top (required)>' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:22:in eval' /Users/sahrsaffa/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:22:in
' Tasks: TOP => db:create (See full trace by running task with --trace)
any help would be greatly appreciated.
Aucun commentaire:
Enregistrer un commentaire