title: Rails Heroku application error
body: <p>I try to push my rails application to heroku but encountered the following error<br></p>
  
  <pre><code>Application Error
  
  An error occurred in the application and your page could not be served. Please try again in a few moments.
  
  If you are the application owner, check your logs for details.
  </code></pre>
  
  <p>Because I am using sqlite3<BR>
  A search on the web show I should do the following<br></p>
  
  <pre><code>heroku rake db:create
  heroku rake db:migrate
  </code></pre>
  
  <p>the heroku rake db:create failed by complaining<br></p>
  
  <pre><code>Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (pg is not part of the bundle. Add it to Gemfile.)
  </code></pre>
  
  <p>The command <code>gem install activerecord-postgresql-adapter</code> failed and complains<br></p>
  
  <pre><code>ERROR:  Could not find a valid gem 'activerecord-postgresql-adapter' (&gt;= 0) in any repository
  ERROR:  Possible alternatives: activerecord-postgis-adapter, activerecord-jdbcpostgresql-adapter, activerecord-postgresql-cursors, activerecord-jdbcmysql-adapter, activerecord-jdbcmssql-adapter
  </code></pre>
  
  <p>Then I searched the web again and followed the <a href="http://devcenter.heroku.com/articles/how-do-i-use-sqlite3-for-development" rel="nofollow">http://devcenter.heroku.com/articles/how-do-i-use-sqlite3-for-development</a> suggestion to change</p>
  
  <pre><code>gem 'sqlite3'
  </code></pre>
  
  <p>to</p>
  
  <pre><code>group :production do
    gem 'pg'
  end
  group :development, :test do
    gem 'sqlite3'
  end
  </code></pre>
  
  <p>and run</p>
  
  <pre><code>bundle install --without production
  </code></pre>
  
  <p>however this did not solve the problem
  another source say I need to do like</p>
  
  <pre><code>group :production do
     gem 'therubyracer-heroku', '0.8.1.pre3'
     gem "pg"
  end
  </code></pre>
  
  <p>This also failed to solve the issue</p>
  
  <p>I have postresql installed on my system.
  So what hell is the problem? </p>