heroku でActionView::Template::Error (application.css isn't precompiled):
bundle exec rake assets:precompile
を実行
bundle install
git add .
git commit -m "muridayo"
gir push heroku master
で解決
herokuへのpushでfailed to compile Ruby/rails appとでる
以下メッセージがでておこられる
git push heroku master
Counting objects: 105, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (88/88), done.
Writing objects: 100% (105/105), 30.95 KiB, done.
Total 105 (delta 12), reused 0 (delta 0)
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:
* pg
You have deleted from the Gemfile:
* sqlite3
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app
ちゃんとgemfileのsqlite3もマニュアル通りpgに書き換えたのに。。。
もう一度順をおって行う
bundle install
git add .
git commit -m "muripo"
git push heroku master
うまく行った。
なんかすっとばしてたのか
heroku run rake db:migrate
heroku run console
で実行
やった。。。動いたよ。。。
rails3でrake db:migrate が aborted
rakeのバージョンが悪い模様
Gemfileにrakeのバージョン指定を追加
gem 'rails', '3.0.7' gem 'rake', '0.8.7'
その後
bundle install
を実行したところ
You have requested:
rake = 0.8.7
The bundle currently has rake locked at 0.9.2.2.
Try running `bundle update rake`
とおこられる。言われた通り
bundle update rake
を行う
Your bundle is updated! Use `bundle show [gemname]` to see where a bundled gem is installed.
うまくいったっぽい
rake db:migrate --trace
を実行
You have already activated rake 0.9.2.2, but your Gemfile requires rake 0.8.7. Using bundle exec may solve this.
とおこられる
rake _0.8.7_ db:migrate
でバージョン指定して実行、成功
cedar (beta)
dedar(beta)ってw
変更してみる
$ heroku stack:migrate bamboo-ree-1.8.7
! Stack migration to/from Cedar is not available. Create a new app with --stack cedar instead.
、、、、えっ汗
herokuで日本語を使うとError during failsafe response: incompatible character encodings: ASCII-8BIT and UTF-8とでる
表題の通り。
今まで英語で編集していたappを日本語化したところ、
app/new
が表示されなくなる。
なぜ。。。
heroku logs
で調べてみた。
Error during failsafe response: incompatible character encodings: ASCII-8BIT and UTF-8
とエラーがでる
ぐぐってみると、
rubyの1.9とかをつかってるとエンコードで問題がでることがあるらしい。
というわけで、herokuのrubyのversionをさげてみた
(参考 http://codenote.net/heroku/540.html)
まず、
heroku stack
で現状を確認
aspen-mri-1.8.6
bamboo-mri-1.9.2
bamboo-ree-1.8.7