twitter認証機能付き掲示板をherokuにデプロイ
今回は前回作った、twitter 認証付き掲示板をデプロイしました。
でも、毎度のようにエラーが出たわけで…@whitech0c0この人、紙。
①rubyのバージョン指定です。。
書き方はこんな感じで…
②config/environments/productionのconfig.assets.compressをtrueにする↓こうする
こうすることで、プリコンパイルしてからpushする必要がなくなるはず…
deploy to herokuの手順としては
①herokuアカウントを作る
②herokuインストール
gem install 'heroku'
③アカウント情報を入力する
herokukeys:add Enter your Heroku credentials. Email: email@example.com Password: your-password Uploading ssh public key /Users/joe/.ssh/id_rsa.pub
④git add .してcommitして
git add . git commit -m "deploy app"
⑤↓するとremote先を指定、heroku側にレポジトリが作られる
$ heroku create --stack cedar
⑥herokuにpushしてdbつくって、オープン。
$ git push heroku master
$ heroku rake db:migrate
$ heroku open
あと、今回githubも利用しました。
↓でコードをプルしてきます。
git pull origin master
↓でcommitされたものの最新のやつをプルしてきます。
git reset --hard
↓でgithubのファイルをプルしてきます。
git clone url
で、とりあえず、デプロイできました
http://yagichannel.herokuapp.com/
githubアカウントは
https://github.com/yaginuuu/
す。。。
ひと通りのことはできたので今度はgithub駆使して、なんかやりたいっす。
今回参考にさせて頂きだいた人たちは
http://whitech0c0late.hatenablog.com/entry/2013/01/19/225052
http://morizyun.github.com/blog/heroku-rails-postgresql/
だす。。