Sat, 07 Apr 2012 (平成24年) [長年日記]
_ [tDiary]Install to heroku
書いてある通りにしたら tDiary を heroku で動かせるのかと思ってやってみた。heroku のアカウントはいつの間にか取得していたので、Heroku Toolbelt をダウンロードしてきてインストールして作業開始。作業環境は Windows 7。
最初にひっかかったのは
>heroku addon:add memcache ! `addon:add` is not a heroku command. ! Perhaps you meant `addons:add`. ! See `heroku help` for additional details.
ということで addons にしてやり直し。
>heroku addons:add memcache ----> Adding memcache to ntdiary... failed ! Please verify your account to install this add-on ! For more information, see http://devcenter.heroku.com/categories/billing ! Confirm now at https://heroku.com/confirm
https://heroku.com/confirm に行ったら Billing Info を登録するようにってカード番号を登録する必要があるのか。サクっと登録してからもう一度実行。
>heroku addons:add memcache ----> Adding memcache to ntdiary... done, v2 (free)
成功。そして、次にひっかかったのが
>git push heroku deploy:master
Counting objects: 10638, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2824/2824), done.
Writing objects: 100% (10638/10638), 2.72 MiB | 201 KiB/s, done.
Total 10638 (delta 7597), reused 10628 (delta 7592)
-----> Heroku receiving push
-----> Ruby/Rack app detected
-----> Installing dependencies using Bundler version 1.1.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:
* sequel
* dalli
* thin
* pg
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rack app
To git@heroku.com:ntdiary.git
! [remote rejected] deploy -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:ntdiary.git'
となってしまって、どうしたらいいのかな。とりあえず、今はここまで。
試して頂いてありがとうございます。<br>エラーで止まってしまった部分は bundle install を実行して Gemfile.lock を更新せよというエラーです。試して頂けないでしょうか。<br><br>pg や thin のインストールに失敗してWindows だと上手くいかないような気もしますが、その場合は別の手段を考えてみます。