0

Downloaded RoR app from github by cloning, ran bundler.io to install all the dependencies, but when I run rails server, get the below error, thanks in advance

enter image description here

Richard Peck
  • 76,116
  • 9
  • 93
  • 147
Javed
  • 460
  • 4
  • 15

2 Answers2

1

Make sure you have Postgres installed and running

Make sure your database is in place

rake db:create
rake db:migrate
The Whiz of Oz
  • 6,763
  • 9
  • 48
  • 85
1

The error is certainly that you've not got the pg (PGSQL) gem installed.

After Ruby 2.2, you can run Rails without the required gems; you end up with a multitude of errors about missing files etc. This appears to be one of them, although we don't run pgsql in dev, so I could be wrong.

--

Since you're using Windows, you'll have to download PGSQL and get the appropriate dependency files. Here's a tutorial:

  1. Download PGSQL
  2. Run gem install pg -- --with-pg-dir="c:/path/to/pg/sql"
  3. If this installs, you're good to try rails s again

The most important thing to consider is that Windows uses different dependencies to Linux / Mac OS. I've not got the experience to tell you what those differences are; I can say that with "integration" gems (mysql2,rmagick, nokogiri, pg), Ruby will require you download & reference the correct libraries in order to get the gem installed.

Community
  • 1
  • 1
Richard Peck
  • 76,116
  • 9
  • 93
  • 147