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できない。


git push heroku master
Counting objects: 91, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (81/81), done.
Writing objects: 100% (91/91), 30.37 KiB, done.
Total 91 (delta 5), reused 0 (delta 0)
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.3.0.pre.2
       Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
       You are trying to install in deployment mode after changing
       your Gemfile. Run `bundle install` elsewhere and add the
       updated Gemfile.lock to version control.
       You have added to the Gemfile:
       * sqlite3
       * thin
       * pg
 !
 !     Failed to install gems via Bundler.
 !
 !     Heroku push rejected, failed to compile Ruby/rails app

To git@heroku.com:xxxxxxxxxxxxxxxxxxx.git
 ! [remote rejected] master -> master (pre-receive hook declined)