Saska
Saska

Reputation: 1021

problem with rails - "Could not find gem 'pg"

bonjour dudes. i have a small problem with rails. today i install rails 3 and decided create a new project.

rails new blablabla --database=postgresql

i edited database.yml and paste to it my databases, logins and passwords of postgres. my postgresql works on port 5433 (instead of 5432) database.yml example:

development:
adapter: postgresql
database: devdb
encoding: utf8
username: postgres
password: mypassword
host: localhost
port: 5433

i just want to start server, or add controller, but rails says:

Could not find gem 'pg (>= 0)' in any of the gem sources listed in your Gemfile

but i have 'pg'. i think problem with port, but i dont know how fix problem.

sorry for bad english, and thanks for answers.

Upvotes: 3

Views: 5923

Answers (1)

Wes
Wes

Reputation: 6585

It would appear from the error message that you are using Bundler to manage your gems for the project. Have you tried running bundle install to bring all of your sources in the Gemfile up to date? Here is an example:

> bundle install
Using rake (0.8.7) 
Using abstract (1.0.0) 
Using activesupport (3.0.3) 
[...]
Using zendesk_remote_auth (0.9.0) 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

Upvotes: 4

Related Questions