2013年1月2日水曜日

herokuでsqlite3からpostgresqlへ

sqlite3 -> postgresql にDBを変更する時のログ。

$ heroku rake db:migrate</ br> ! For Cedar apps, use: `heroku run rake db:migrate` $ heroku run rake db:migrate</ br> Running rake db:migrate attached to terminal... up, run.5672 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 at /app/Rakefile:9) 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 at /app/Rakefile:9) Connecting to database specified by DATABASE_URL Migrating to CreateMessages (20121222150925) == CreateMessages: migrating ================================================= -- create_table(:messages) NOTICE: CREATE TABLE will create implicit sequence "messages_id_seq" for serial column "messages.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "messages_pkey" for table "messages" -> 0.0589s == CreateMessages: migrated (0.0590s) ========================================

2013年1月1日火曜日

Gemfileを修正したらbundle install

しないと、以下の様なErrorが出て、herokuにpushできない。


  1. git push heroku master
  2. Counting objects: 91, done.
  3. Delta compression using up to 4 threads.
  4. Compressing objects: 100% (81/81), done.
  5. Writing objects: 100% (91/91), 30.37 KiB, done.
  6. Total 91 (delta 5), reused 0 (delta 0)
  7. -----> Ruby/Rails app detected
  8. -----> Installing dependencies using Bundler version 1.3.0.pre.2
  9. Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
  10. You are trying to install in deployment mode after changing
  11. your Gemfile. Run `bundle install` elsewhere and add the
  12. updated Gemfile.lock to version control.
  13. You have added to the Gemfile:
  14. * sqlite3
  15. * thin
  16. * pg
  17. !
  18. ! Failed to install gems via Bundler.
  19. !
  20. ! Heroku push rejected, failed to compile Ruby/rails app
  21.  
  22. To git@heroku.com:xxxxxxxxxxxxxxxxxxx.git
  23. ! [remote rejected] master -> master (pre-receive hook declined)