かまぼこ日記

日々の記録

twitter認証機能付き掲示板をherokuにデプロイ

今回は前回作った、twitter 認証付き掲示板をデプロイしました。

でも、毎度のようにエラーが出たわけで…@whitech0c0この人、紙。

rubyのバージョン指定です。。
f:id:yaginuuu:20130201034038p:plain


書き方はこんな感じで…

②config/environments/productionのconfig.assets.compressをtrueにする↓こうする

f:id:yaginuuu:20130201034450p:plain

こうすることで、プリコンパイルしてから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/
f:id:yaginuuu:20130201041734p:plain

githubアカウントは
https://github.com/yaginuuu/
す。。。

ひと通りのことはできたので今度はgithub駆使して、なんかやりたいっす。

今回参考にさせて頂きだいた人たちは
http://whitech0c0late.hatenablog.com/entry/2013/01/19/225052
http://morizyun.github.com/blog/heroku-rails-postgresql/
だす。。