Note that there are some explanatory texts on larger screens.

plurals
  1. POTrying to deploy to heroku and switching sqlite -> pg- Error when i rake:db
    primarykey
    data
    text
    <p>So, I am trying to change my app which runs fine locally on SQLite3 to Postgresql so I can deploy it to Heroku. I've looked at various posts and tutorials and made the adjustments to my Gem file and database.yml files but when I try to rake:db migrate, I get the error message : "Please install the postgresql adapter." I know that most users encounter this when they don't include gem 'pg' in their gemfile but I did include it. </p> <p>This is the full error message I get: <a href="http://dpaste.com/hold/972379/" rel="nofollow">http://dpaste.com/hold/972379/</a></p> <p>Can you please help? I've really looked at dozens of posts and tried every configuration. </p> <p>My procfile looks like this: </p> <pre><code>web: bundle exec thin start -p $PORT </code></pre> <p>My database.yml looks like this: </p> <pre><code>development: adapter: postgresql encoding: utf8 database: project_development pool: 5 username: password: test: &amp;TEST adapter: postgresql encoding: utf8 database: project_test pool: 5 username: password: production: adapter: postgresql encoding: utf8 database: project_production pool: 5 username: password: </code></pre> <p>My gemfile looks like this: </p> <pre><code>source 'https://rubygems.org' gem 'rails', '3.2.11' # Bundle edge Rails instead: # gem 'rails', :git =&gt; 'git://github.com/rails/rails.git' gem 'thin' group :production do gem 'pg' end group :development, :test do gem 'sqlite3' end # Gems used only for assets and not required # in production environments by default. </code></pre> <p>gem 'jquery-rails'</p> <pre><code># To use ActiveModel has_secure_password # gem 'bcrypt-ruby', '~&gt; 3.0.0' # To use Jbuilder templates for JSON # gem 'jbuilder' # Use unicorn as the app server # gem 'unicorn' # Deploy with Capistrano # gem 'capistrano' # To use debugger # gem 'debugger' </code></pre> <p>One note: when I run bundle install, 'Using pg' does not come up but I think it is because it's not in production... just FYI in case it's important</p> <p>EDIT: gem pg seems to run fine once in production with heroku. not sure what is going on though, since once it's deployed, it doesn't work. Here's my heroku log (I've taken out my e-mail):</p> <pre><code>2013-02-23T05:37:08+00:00 heroku[api]: Enable Logplex by XXXX@email.com 2013-02-23T05:37:08+00:00 heroku[api]: Release v2 created by XXXX@email.com 2013-02-23T05:37:18+00:00 heroku[slugc]: Slug compilation started 2013-02-23T05:38:28+00:00 heroku[api]: Scale to web=1 by XXXX@email.com 2013-02-23T05:38:28+00:00 heroku[api]: Attach HEROKU_POSTGRESQL_WHITE resource by XXXX@email.com 2013-02-23T05:38:28+00:00 heroku[api]: Release v3 created by XXXX@email.com 2013-02-23T05:38:29+00:00 heroku[api]: Add DATABASE_URL config by XXXX@email.com 2013-02-23T05:38:29+00:00 heroku[api]: Release v4 created by XXXX@email.com 2013-02-23T05:38:29+00:00 heroku[api]: Add config by XXXX@email.com 2013-02-23T05:38:29+00:00 heroku[api]: Release v5 created by XXXX@email.com 2013-02-23T05:38:29+00:00 heroku[api]: Release v6 created by XXXX@email.com 2013-02-23T05:38:29+00:00 heroku[api]: Deploy cd00730 by XXXX@email.com 2013-02-23T05:38:30+00:00 heroku[slugc]: Slug compilation finished 2013-02-23T05:38:30+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -p 55861` 2013-02-23T05:38:31+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -p 55416` 2013-02-23T05:38:31+00:00 app[web.1]: bash: bundle: command not found 2013-02-23T05:38:32+00:00 heroku[web.1]: Process exited with status 127 2013-02-23T05:38:34+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from &lt;top (required)&gt; at /app/config/environment.rb:5) 2013-02-23T05:38:34+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from &lt;top (required)&gt; at /app/config/environment.rb:5) 2013-02-23T05:38:34+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from &lt;top (required)&gt; at /app/config/environment.rb:5) 2013-02-23T05:38:37+00:00 app[web.1]: &gt;&gt; Using rack adapter 2013-02-23T05:38:37+00:00 app[web.1]: Connecting to database specified by DATABASE_URL 2013-02-23T05:38:37+00:00 app[web.1]: &gt;&gt; Maximum connections set to 1024 2013-02-23T05:38:37+00:00 app[web.1]: &gt;&gt; Thin web server (v1.5.0 codename Knife) 2013-02-23T05:38:37+00:00 app[web.1]: &gt;&gt; Listening on 0.0.0.0:55416, CTRL+C to stop 2013-02-23T05:38:38+00:00 heroku[web.1]: State changed from starting to up 2013-02-23T05:39:00+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by ray.lee@dartmouth.edu 2013-02-23T05:39:02+00:00 heroku[run.3422]: Awaiting client 2013-02-23T05:39:02+00:00 heroku[run.3422]: Starting process with command `bundle exec rake db:migrate` 2013-02-23T05:39:02+00:00 heroku[run.3422]: State changed from starting to up 2013-02-23T05:39:07+00:00 heroku[run.3422]: Client connection closed. Sending SIGHUP to all processes 2013-02-23T05:39:08+00:00 heroku[run.3422]: Process exited with status 0 2013-02-23T05:39:08+00:00 heroku[run.3422]: State changed from up to complete 2013-02-23T05:39:14+00:00 app[web.1]: Started GET "/" for 67.80.190.0 at 2013-02-23 05:39:14 +0000 2013-02-23T05:39:15+00:00 app[web.1]: Processing by LooksController#index as HTML 2013-02-23T05:39:15+00:00 app[web.1]: Rendered looks/index.html.erb within layouts/application (7.7ms) 2013-02-23T05:39:16+00:00 heroku[router]: at=info method=GET path=/ host=quiet-everglades-5513.herokuapp.com fwd="67.80.190.0" dyno=web.1 queue=0 wait=1ms connect=2ms service=1385ms status=500 bytes=643 2013-02-23T05:39:16+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=quiet-everglades-5513.herokuapp.com fwd="67.80.190.0" dyno=web.1 queue=0 wait=0ms connect=1ms service=7ms status=200 bytes=0 2013-02-23T05:39:16+00:00 app[web.1]: 2013-02-23T05:39:16+00:00 app[web.1]: 5: &lt;%= stylesheet_link_tag "application", :media =&gt; "all" %&gt; 2013-02-23T05:39:16+00:00 app[web.1]: 8: &lt;/head&gt; 2013-02-23T05:39:16+00:00 app[web.1]: Completed 500 Internal Server Error in 925ms 2013-02-23T05:39:16+00:00 app[web.1]: app/controllers/looks_controller.rb:7:in `index' 2013-02-23T05:39:16+00:00 app[web.1]: 3: &lt;head&gt; 2013-02-23T05:39:16+00:00 app[web.1]: ActionView::Template::Error (no such file to load -- uglifier 2013-02-23T05:39:16+00:00 app[web.1]: (in /app/app/assets/javascripts/application.js)): 2013-02-23T05:39:16+00:00 app[web.1]: app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb___1708027661978307033_32644180' 2013-02-23T05:39:16+00:00 app[web.1]: 2013-02-23T05:39:16+00:00 app[web.1]: 6: &lt;%= javascript_include_tag "application" %&gt; 2013-02-23T05:39:16+00:00 app[web.1]: 2013-02-23T05:39:16+00:00 app[web.1]: 7: &lt;%= csrf_meta_tags %&gt; 2013-02-23T05:39:16+00:00 app[web.1]: 9: &lt;body&gt; 2013-02-23T05:39:16+00:00 app[web.1]: 4: &lt;title&gt;Scout&lt;/title&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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