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
-
Do you have all the required gems installed? – Atri Jan 13 '16 at 06:45
2 Answers
Make sure you have Postgres installed and running
Make sure your database is in place
rake db:create
rake db:migrate

- 6,763
- 9
- 48
- 85
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:
- Download PGSQL
- Run
gem install pg -- --with-pg-dir="c:/path/to/pg/sql"
- 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.

- 1
- 1

- 76,116
- 9
- 93
- 147