# \[HELP\] Error cannot load (or bundle) 'pg' gem on local windows 7 Ruby on Rails

**URL:** <https://discuss.rubyonrails.org/t/help-error-cannot-load-or-bundle-pg-gem-on-local-windows-7-ruby-on-rails/67259>\
**Category:** rubyonrails-talk\
**Created:** [June 21, 2013, 8:59am UTC](https://discuss.rubyonrails.org/t/help-error-cannot-load-or-bundle-pg-gem-on-local-windows-7-ruby-on-rails/67259 "2013-06-21T08:59:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivan\_Wang](https://avatars.discourse-cdn.com/v4/letter/i/838e76/32.png) [@Ivan\_Wang](https://discuss.rubyonrails.org/u/Ivan_Wang)\
**Post date:** [June 21, 2013, 8:59am UTC](https://discuss.rubyonrails.org/t/help-error-cannot-load-or-bundle-pg-gem-on-local-windows-7-ruby-on-rails/67259/1 "2013-06-21T08:59:31Z")

</div>

```ruby
I posted a question on SO, but no one answered so far.
[http://stackoverflow.com/questions/17221522/error-cannot-load-pg-gem-on-local-windows-7-ruby-on-rails](http://stackoverflow.com/questions/17221522/error-cannot-load-pg-gem-on-local-windows-7-ruby-on-rails)

I just started to learn ruby on rails. I have pg gem installed. And 'pg'
is in both gemfile.lock and gemfile. However, it keep
getting error, "gem is not loaded, Add gem 'pg' to your Gemfile."
I also have tried follow someone's advice, delete the gemfile.lock and
re-bundle. same error came out.
Please look at the link above for details.
Thanks in advanced.

```

---

<div class="post-metadata">

**Author:** ![Colin\_Law1](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@Colin\_Law1](https://discuss.rubyonrails.org/u/Colin_Law1)\
**Post date:** [June 21, 2013, 2:53pm UTC](https://discuss.rubyonrails.org/t/help-error-cannot-load-or-bundle-pg-gem-on-local-windows-7-ruby-on-rails/67259/2 "2013-06-21T14:53:49Z")

</div>

> I posted a question on SO, but no one answered so far. [rubygems - Error cannot load 'pg' gem on local windows 7 Ruby on Rails - Stack Overflow](http://stackoverflow.com/questions/17221522/error-cannot-load-pg-gem-on-local-windows-7-ruby-on-rails)
> 
> I just started to learn ruby on rails. I have pg gem installed. And 'pg' is in both gemfile.lock and gemfile. However, it keep getting error, "gem is not loaded, Add gem 'pg' to your Gemfile."

Why have you posted this again? The reason there have been no replies is probably because so few people use Windows for Rails development, so no-one is able to help. If you switch to Linux (Ubuntu for example) or Mac then you will have fewer problems in the first place and will be much more likely to find help when you do have a problem.

Colin

---

<div class="post-metadata">

**Author:** ![Aguardientico](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@Aguardientico](https://discuss.rubyonrails.org/u/Aguardientico)\
**Post date:** [June 22, 2013, 5:40pm UTC](https://discuss.rubyonrails.org/t/help-error-cannot-load-or-bundle-pg-gem-on-local-windows-7-ruby-on-rails/67259/3 "2013-06-22T17:40:42Z")

</div>

Your gem list shows:

pg (0.15.1 x64-mingw32)

But your Gemfile.lock shows

PLATFORMS x86-mingw32

I think your issue is related to a mixed platform (32bits(x86) vs 64bits(x64))

Try to investigate that.
