Note that there are some explanatory texts on larger screens.

plurals
  1. POError cannot load 'pg' gem on local windows 7 Ruby on Rails
    text
    copied!<p>I just started to learn ruby on rails. I have pg gem installed as shown below. And 'pg' is in both gemfile.lock and gemfile. However, it keep getting error, "gem is not loaded, Add <code>gem 'pg'</code> to your Gemfile."</p> <p>I also have tried follow someone's advice, delete the gemfile.lock and re-bundle. same error came out. </p> <pre><code>E:\RoR docs\first_app&gt;bundle show pg Could not find gem 'pg'. Did you mean pg? </code></pre> <p>gemfile:</p> <pre><code>source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.0.0.rc2' # Use sqlite3 as the database for Active Record gem 'pg' # Use SCSS for stylesheets gem 'sass-rails', '~&gt; 4.0.0.rc2' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '&gt;= 1.3.0' # Use CoffeeScript for .js.coffee assets and views gem 'coffee-rails', '~&gt; 4.0.0' # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', platforms: :ruby # Use jquery as the JavaScript library gem 'jquery-rails' # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks gem 'turbolinks' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~&gt; 1.2' group :doc do # bundle exec rake doc:rails generates the API under doc/api. gem 'sdoc', require: false end # Use ActiveModel has_secure_password # gem 'bcrypt-ruby', '~&gt; 3.0.0' # Use unicorn as the app server # gem 'unicorn' # Use Capistrano for deployment # gem 'capistrano', group: :development # Use debugger # gem 'debugger', group: [:development, :test] </code></pre> <p>database.yml:</p> <pre><code># SQLite version 3.x # gem install sqlite3 # # Ensure the SQLite 3 gem is defined in your Gemfile # gem 'sqlite3' development: adapter: postgresql database: first_app pool: 5 username: postgres password: admin port: 5432 timeout: 5000 host: localhost # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: adapter: sqlite3 database: db/test.sqlite3 pool: 5 timeout: 5000 production: adapter: sqlite3 database: db/production.sqlite3 pool: 5 timeout: 5000 </code></pre> <p>gem list:</p> <pre><code>*** LOCAL GEMS *** actionmailer (4.0.0.rc2, 3.2.13) actionpack (4.0.0.rc2, 3.2.13) activemodel (4.0.0.rc2, 3.2.13) activerecord (4.0.0.rc2, 3.2.13) activerecord-deprecated_finders (1.0.3) activerecord-postgresql-adapter (0.0.1) activeresource (3.2.13) activesupport (4.0.0.rc2, 3.2.13) ansi (1.4.3) arel (4.0.0, 3.0.2) atomic (1.1.9) bigdecimal (1.2.0) builder (3.2.2, 3.1.4, 3.0.4) bundler (1.3.5) capybara (2.1.0) coffee-rails (4.0.0, 3.2.2) coffee-script (2.2.0) coffee-script-source (1.6.2) diff-lcs (1.2.4) erubis (2.7.0) execjs (1.4.0) formatador (0.2.4) guard (1.8.1) guard-rspec (3.0.2) hike (1.2.3) i18n (0.6.4, 0.6.1) io-console (0.4.2) jason (0.6.0) jbuilder (1.4.2) journey (1.0.4) jquery-rails (3.0.1) json (1.8.0, 1.7.7) listen (1.2.2) lumberjack (1.0.3) mail (2.5.4) mime-types (1.23) mini_portile (0.5.0) minitest (5.0.4, 4.7.4, 4.3.2) multi_json (1.7.7) pg (0.15.1 x64-mingw32) pik (0.2.8) polyglot (0.3.3) psych (2.0.0) rack (1.5.2, 1.4.5) rack-cache (1.2) rack-ssl (1.3.3) rack-test (0.6.2) rails (4.0.0.rc2, 3.2.13) railties (4.0.0.rc2, 3.2.13) rake (10.1.0, 0.9.6) rb-fsevent (0.9.3) rb-inotify (0.9.0) rb-kqueue (0.2.0) rdiscount (2.1.6) rdoc (4.0.1, 4.0.0, 3.12.2) rspec (2.13.0) rspec-core (2.13.1) rspec-expectations (2.13.0) rspec-mocks (2.13.1) rspec-rails (2.13.2) sass (3.2.9) sass-rails (4.0.0.rc2, 3.2.6) sdoc (0.3.20) sprockets (2.10.0, 2.2.2) sprockets-rails (2.0.0) test-unit (2.5.5, 2.0.0.0) thor (0.18.1) thread_safe (0.1.0) tilt (1.4.1) treetop (1.4.14) turbolinks (1.2.0) turn (0.9.6, 0.8.2) tzinfo (1.0.0, 0.3.37) uglifier (2.1.1) xpath (2.0.0) </code></pre> <p>bundle:</p> <pre><code>E:\RoR docs\first_app&gt;bundle Using rake (10.1.0) Using i18n (0.6.4) Using minitest (4.7.4) Using multi_json (1.7.7) Using atomic (1.1.9) Using thread_safe (0.1.0) Using tzinfo (0.3.37) Using activesupport (4.0.0.rc2) Using builder (3.1.4) Using erubis (2.7.0) Using rack (1.5.2) Using rack-test (0.6.2) Using actionpack (4.0.0.rc2) Using mime-types (1.23) Using polyglot (0.3.3) Using treetop (1.4.14) Using mail (2.5.4) Using actionmailer (4.0.0.rc2) Using activemodel (4.0.0.rc2) Using activerecord-deprecated_finders (1.0.3) Using arel (4.0.0) Using activerecord (4.0.0.rc2) Using coffee-script-source (1.6.2) Using execjs (1.4.0) Using coffee-script (2.2.0) Using thor (0.18.1) Using railties (4.0.0.rc2) Using coffee-rails (4.0.0) Using hike (1.2.3) Using jbuilder (1.4.2) Using jquery-rails (3.0.1) Using json (1.8.0) Using bundler (1.3.5) Using tilt (1.4.1) Using sprockets (2.10.0) Using sprockets-rails (2.0.0) Using rails (4.0.0.rc2) Using rdoc (3.12.2) Using sass (3.2.9) Using sass-rails (4.0.0.rc2) Using sdoc (0.3.20) Using turbolinks (1.2.0) Using uglifier (2.1.1) Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. </code></pre> <p>gemfile.lock:</p> <pre><code>GEM remote: https://rubygems.org/ specs: actionmailer (4.0.0.rc2) actionpack (= 4.0.0.rc2) mail (~&gt; 2.5.3) actionpack (4.0.0.rc2) activesupport (= 4.0.0.rc2) builder (~&gt; 3.1.0) erubis (~&gt; 2.7.0) rack (~&gt; 1.5.2) rack-test (~&gt; 0.6.2) activemodel (4.0.0.rc2) activesupport (= 4.0.0.rc2) builder (~&gt; 3.1.0) activerecord (4.0.0.rc2) activemodel (= 4.0.0.rc2) activerecord-deprecated_finders (~&gt; 1.0.2) activesupport (= 4.0.0.rc2) arel (~&gt; 4.0.0) activerecord-deprecated_finders (1.0.3) activesupport (4.0.0.rc2) i18n (~&gt; 0.6, &gt;= 0.6.4) minitest (~&gt; 4.2) multi_json (~&gt; 1.3) thread_safe (~&gt; 0.1) tzinfo (~&gt; 0.3.37) arel (4.0.0) atomic (1.1.9) builder (3.1.4) coffee-rails (4.0.0) coffee-script (&gt;= 2.2.0) railties (&gt;= 4.0.0.beta, &lt; 5.0) coffee-script (2.2.0) coffee-script-source execjs coffee-script-source (1.6.2) erubis (2.7.0) execjs (1.4.0) multi_json (~&gt; 1.0) hike (1.2.3) i18n (0.6.4) jbuilder (1.4.2) activesupport (&gt;= 3.0.0) multi_json (&gt;= 1.2.0) jquery-rails (3.0.1) railties (&gt;= 3.0, &lt; 5.0) thor (&gt;= 0.14, &lt; 2.0) json (1.8.0) mail (2.5.4) mime-types (~&gt; 1.16) treetop (~&gt; 1.4.8) mime-types (1.23) minitest (4.7.4) multi_json (1.7.7) pg (0.15.1-x86-mingw32) polyglot (0.3.3) rack (1.5.2) rack-test (0.6.2) rack (&gt;= 1.0) rails (4.0.0.rc2) actionmailer (= 4.0.0.rc2) actionpack (= 4.0.0.rc2) activerecord (= 4.0.0.rc2) activesupport (= 4.0.0.rc2) bundler (&gt;= 1.3.0, &lt; 2.0) railties (= 4.0.0.rc2) sprockets-rails (~&gt; 2.0.0) railties (4.0.0.rc2) actionpack (= 4.0.0.rc2) activesupport (= 4.0.0.rc2) rake (&gt;= 0.8.7) thor (&gt;= 0.18.1, &lt; 2.0) rake (10.1.0) rdoc (3.12.2) json (~&gt; 1.4) sass (3.2.9) sass-rails (4.0.0.rc2) railties (&gt;= 4.0.0.beta, &lt; 5.0) sass (&gt;= 3.1.10) sprockets-rails (~&gt; 2.0.0) sdoc (0.3.20) json (&gt;= 1.1.3) rdoc (~&gt; 3.10) sprockets (2.10.0) hike (~&gt; 1.2) multi_json (~&gt; 1.0) rack (~&gt; 1.0) tilt (~&gt; 1.1, != 1.3.0) sprockets-rails (2.0.0) actionpack (&gt;= 3.0) activesupport (&gt;= 3.0) sprockets (~&gt; 2.8) thor (0.18.1) thread_safe (0.1.0) atomic tilt (1.4.1) treetop (1.4.14) polyglot polyglot (&gt;= 0.3.1) turbolinks (1.2.0) coffee-rails tzinfo (0.3.37) uglifier (2.1.1) execjs (&gt;= 0.3.0) multi_json (~&gt; 1.0, &gt;= 1.0.2) PLATFORMS x86-mingw32 DEPENDENCIES coffee-rails (~&gt; 4.0.0) jbuilder (~&gt; 1.2) jquery-rails pg (= 0.15.1) rails (= 4.0.0.rc2) sass-rails (~&gt; 4.0.0.rc2) sdoc turbolinks uglifier (&gt;= 1.3.0) </code></pre> <p>pgAdminIII is up and running: <img src="https://i.stack.imgur.com/gyIBa.png" alt="enter image description here"> </p> <p>error page:</p> <p><img src="https://i.stack.imgur.com/rZwfi.png" alt="enter image description here"></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload