This README would normally document whatever steps are necessary to get the application up and running.
Things you may want to cover:
-
Ruby version
-
System dependencies
-
Configuration
-
Database creation
-
Database initialization
-
How to run the test suite
-
Services (job queues, cache servers, search engines, etc.)
-
Deployment instructions
-
…
Please feel free to use a different markup language if you do not plan to run rake doc:app.
-
アプリドメインの設定ができない
qiita.com/lasershow/items/774ad43cd8a0f1bc09ec qiita.com/seisonshi/items/6d1e00072fb624250d82
-
SiteURL未設定
-アプリドメインとSiteURLを両方入力してから設定を保存する
-
Dev,Productionどっちもやること
achieve-development ID:2021314834755379 appSecret:6ef4da4d2ae0026c4339e9e37436ae91
achieve-production ID:129075807740711 appSecret:a18b591f36d8cd8bb36a723cb1333e66
- achieve_yuji91_development
-
Consumer Key (API Key) y7GOI02dxXcRxQ9a5LkPPUXBd
Consumer Secret (API Secret) yKAnyd9QlOkHWzBwW1PBooGnnN8o6dO9TJpHT5PGtsF8X6Mww7
- achieve_yuji91_production
-
Consumer Key (API Key) us8WKIAw42xObeQclewkKsQ5V
Consumer Secret (API Secret) N9yD3ZLhW3YsV3lSneSHhjwogeBGLLHaAdDxvwoQOOJ250ckRy
- .env
-
FACEBOOK_ID_DEVELOPMENT=2021314834755379 FACEBOOK_SECRET_DEVELOPMENT=6ef4da4d2ae0026c4339e9e37436ae91 TWITTER_ID_DEVELOPMENT=y7GOI02dxXcRxQ9a5LkPPUXBd TWITTER_SECRET_DEVELOPMENT=yKAnyd9QlOkHWzBwW1PBooGnnN8o6dO9TJpHT5PGtsF8X6Mww7
- Command
-
heroku config:add FACEBOOK_ID_PRODUCTION=129075807740711 heroku config:add FACEBOOK_SECRET_PRODUCTION=a18b591f36d8cd8bb36a723cb1333e66 heroku config:add TWITTER_ID_PRODUCTION=us8WKIAw42xObeQclewkKsQ5V heroku config:add TWITTER_SECRET_PRODUCTION=N9yD3ZLhW3YsV3lSneSHhjwogeBGLLHaAdDxvwoQOOJ250ckRy
rails g migration AddOmniauthColumnsToUsers uid provider image_url edit config/db/migrate rake db:migrate:reset
test@testmail.com test010101 <a href=“localhost:3000/users/confirmation?confirmation_token=-N_h1QragKV76PfBxJJ_” 下に置き換えるide.c9.io/yuji911227/dive-into-code/users/confirmation?confirmation_token=-N_h1QragKV76PfBxJJ_
SNSログインから取得してきた画像を表示させるヘルパーメソッドを作成しましょう。$ brew update $ brew install imagemagick
heroku pg:reset DATABASE qiita.com/quattro_4/items/a2eb3618207e21ca00d3 webos-goodies.jp/archives/how_to_use_activeresource_2.html blog.mmmcorp.co.jp/blog/2014/10/30/active-resourrce-patch/
gem her dev.classmethod.jp/server-side/ruby-on-rails/her-1/
AJAX qiita.com/hisamura333/items/e3ea6ae549eb09b7efb9
名言estorypost.com/%E5%90%8D%E8%A8%80%E3%83%BB%E6%A0%BC%E8%A8%80/mahatma-gandhi-quotes/
Ajax
- View
-
<p>コメント一覧</p> <div id=“comments_area”> <%= render partial: ‘comments/index’,
locals: { comments: @comments, blog: @blog } %></div>
–> @commentsと@blogがあれば表示できる–> blog has_many commentsより、@comments = @blog.commentsで取得可能–> @blogさえあれば良い
- Javascript
- 訂正前
-
$(“#comments_area”).html(“<%= j( render ‘comments/index’, { comments: @comment.blog.comments,
blog: @comment.blog }) %>")
–> @commentからcommentとblogの内容を取得している–> destroyActionではcommentが0件の場合commentがNilになる–> commentではなくblogでViewに情報を渡すべき
- 訂正後
-
$(“#comments_area”).html(“<%= j( render ‘comments/index’, { comments: @blog.comments,
blog: @blog }) %>")
develop環境だとTwitter認証で401エラーqiita.com/hirokishirai/items/5a43977a38ecd922bfb9
no_imageが表示されない
RailsErrorRemember qiita.com/jun910/items/74dd71debc1edf566111
- Achieve_20171004-development
-
app_id = “409655” key = “47ce7d11231c6c73c38e” secret = “f609d4b15f7091b54d8d” cluster = “ap1”
- Achieve_20171004-staging
-
app_id = “409656” key = “5df0babb4827355462ea” secret = “17a1a3b5da0fa47abca2” cluster = “ap1”
- Achieve_20171004-production
-
app_id = “409657” key = “4571206a3b768c1583a7” secret = “d487e709be2b29dfb0d8” cluster = “ap1”
DIVE19_2_通知機能これで、通知をリアルタイムに作成することができました。Notification, Pusherに関する設定は以上です。デザインは各自整えて頂いて大丈夫です。少し難しいですが、おさらいすると以下のような内容になります。何回も読み返して理解しましょう。
Herokuでの設定
今までの要約が記載されていない
<div class=“container”>
<h2>ユーザー一覧</h2> <% @users.each do |user| %> <div class="container-child col-md-2 col-sm-4 col-xs-6 "> <%= link_to user_path(user) do %> <div class="container-child col-md-2 col-sm-2 col-xs-2 "><%= profile_img(user) %></div> <% end %> <%= user.email %> <% if user.email == current_user.email %> <p>あなたのアカウントです</p> <% else %> <%= render 'follow_form', user: user %> <% end %> </div> <% if user.id != current_user.id %> <li> <div class="item"> <%= link_to user.name, user %> <%= link_to 'メッセージ', conversations_path(sender_id: current_user.id, recipient_id: user.id), method: 'post'%> </div> <%= render partial: 'follow_form', locals: { user: user } if signed_in? %> <% else %> <p>あなたのアカウントです</p> </li> <% end %> <% end %></div>