sharoa
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 【第1週】パRails輪読会 \(2023\-08\-21\~ 2023\-08\-25\) ###### tags: `パRails🚂` - [開催概要](https://hackmd.io/4A_8ahJtQNi5hz713N5Y7w?view) - [パRails輪読会 ノートまとめ](https://hackmd.io/jsgA8Pf_RVioOgSL_VOR4g?view) - サンプルコード・正誤表:[サポートページ:パーフェクトRuby on Rails【増補改訂版】:|技術評論社](https://gihyo.jp/book/2020/978-4-297-11462-6/support) - **サンプルコードをダウンロードしただけでは、すぐに`rails s`できない可能性が高い**です。 以下のページに環境構築の手順をまとめたので、ドライバーをやってくださるという方は、こちらに沿って環境構築をお願いします🙏 ⏩ [環境構築の手順 2022年版](https://hackmd.io/y7qb2BRMT2Wd4tAtKYObcQ) ⏩ [環境構築の手順 2023年版](https://hackmd.io/3_lnn8_QRD6wEjwFbWcBzQ) ## 目次 [TOC] ------ ## 2023\-08\-21(月) ### 本日の予定 - 進め方について軽く説明 - 自己紹介 (任意です。**※緊張するので話すのはちょっと.../今日は見学に来た/ラジオ参加 等の方々は自己紹介しなくても大丈夫です🙆‍♀️**) - 余った時間で読み進める ### 自己紹介の記入をお願いします! > - 名前(呼び方) > - 現在のプラクティス > - 今の気持ち (パRailsへの意気込み・今プラクティスで詰まっていること・プライベートで嬉しかったことなど何でもOKです👍) - odentakashi(おでん) - 自作サービスとチーム開発に取り組んでます。 - プライベートで嬉しかったことは、ポケモンGOでミュウをゲットしたことです。よろしくお願いします。🙏 - moegi(もえぎ) - JSに入門したところ、あとRailsでテストを書く修正してます。 - パRails全然理解できなかったのでみんなで勉強していきたいです。よろしくお願いします~ - sharoa(シャロア) - 現在はSinatraです。 - まだrailsにも入っていないのですが、前もって読んでいてもいいよ、というマイムさんからのお言葉で、右も左もわからないけどやってみようと思って開催しました。 - プライベートで嬉しかったことは、昨日B’zのライブに行ったこと🥰そして悲しかったことは私がライブ中に娘が胃腸炎で病院に行っていたこと😭 - djkazunoko(かずのこ) - 現在はチーム開発と自作サービスのプラクティスに取り組んでいます - Railsの復習でちょうど読もうと思っていたのでナイスタイミング! - sadanora(さだのら) - 自作サービスの開発を進めています。 - パRails読み切ったことないのでこの機会に読み切りたいです。よろしくお願いします〜 - hiromisugie(すぎえ) - Rails最後のプラクティス「日報の言及機能を作る」でつまづいてます😇 - 先日のフィヨブーフェスでmoegiさんの次に発表した者です。パRails難しそうですが、脱落しないように頑張ります! - motohiro-mm(もとひろ) - railsのコメントをつける をやっています。 - ぱrails挫折したので頑張って読んでいきたいです。輪読会はほぼ初参加になります。よろしくお願いします! - CelloTAK (せろたく) - チェリー本輪読会から引き続き参加させてもらいました! - 昨年12月月に入会しましたが学習開始は実質4月ごろからです。 - FBCのプラクティス序盤でしたが6月に転職活動をして7月初めからBPS株式会社というRailsの受託開発をしている(他にも事業はありますが)会社に入社しました。今は研修生として業務時間にFBCの課題中心に取り組んでいます。 - プラクティスとしては、先取りしてRailsに取り組んでいて、今はdeviseで苦戦中です。 - マンションのイベントで琵琶花火の無料チケットが当たって見に行けたことがうれしかったです。🎆 ### 読んだところ - 第1章の最初から21pの1-1-3まで。 ### 次回 - 21pの1-1-4から。🚂 ### 学んだこと(分かったこと/わからなかったこと) - @cellotak - Rakeタスクは主にリリース作業などの定型処理を定義する - @sharoa - RubyとRailsのバージョンの組み合わせによっては警告が発生することがあるから、この本を読む時は本に合わせるべき。(なのかな?) - Rakeコマンドはmakeコマンドふうにタスクを実行するためのタスクランナー。 - @djkazunoko - `rails _<バージョン名>_ -v`でバージョン指定 - @moegi - rakeコマンドはmakeコマンド風にタスクを実行するためのタスクランナー、リリース作業などの定型処理をRakeタスクとして定義するもの、Rakeコマンドは使う頻度少なくなった - Railsのモブプロ、Rubyより難易度高そう気がする、、RubyでもテンパったけどRailsもテンパるw - @sadanora - rakeコマンドで提携作業をコマンド化できる - makeコマンド風にタスクを実行するためのタスクランナー - @hiromisugie - `rake`コマンドは`make`コマンド風にタスクを実行するためのタスクランナー - `make`コマンドがまずわからないが汗、定型処理のようなものを登録しておいてパッと実行できるようなもの、と理解 - 現在のRailsでは`rake`コマンドを使う頻度は減ったらしい  - @odentakashi  - `rake #{タスク名}`で実行。 - @motohiro-mm - rakeコマンド:タスクを実行するためのタスクランナー。主にリリース作業などの定形処理をRakeタスクとして定義する。 - `rake タスク名`:タスク実行 - `rake -T`:登録されているタスク一覧を表示 ### 感想(輪読会自体の改善点などあれば) - @djkazunoko - 輪読会楽しい - @sadanora - 輪読会の開催ありがとうございます〜 - @odentakashi - 毎日参加頑張りたいです。 - @moegi - 15-16時の時間帯だと来れる方少ないかなと思ったけどみなさん来てくれてうれしいです。ありがとうございます。 - @sharoa - たくさんの人が参加してくれて嬉しい限りです。ただ、私は今日は終始ドキドキしていました。😳 - まだわからないという内容はないですが、ここから一気に来そうで怖いですw - @cellotak - いい輪読会になるといいなとおもいます!楽しみです! - バージョンの組み合わせと、リポジトリの整備は、もしかするとメンターさんに相談したほうがいいのかも?と思いました。(特にドライバーを日ごとに変更するなら統一しないと大変そう) - @motohiro-mm - 音読することが今までなかったので緊張したが頭に入りやすい気がするので、頑張って今後も参加していきたいです。 - 自室のWifiが切れてしまって抜けてしまったので、そこを確認して明日にも臨みたいです。 - @hiromisugie - たくさんの人が集まって良い予感がします、明日からも楽しみです! - 人数次第ですが、学んだことと感想はまとめちゃっても良いかも?と思いました ------ ## 2023\-08\-22(火) ### ファシリ ### ドライバー @sadanora ### やったこと - パRails輪読会の方針決めと方針に沿っての環境構築をしました。 - 2章用[パーフェクトRuby on Rails輪読会 コード確認用](https://github.com/sadanora/book_admin)→sadanoraさんが作ってくれました🙏✨ - 6章からは[パーフェクトRuby on Rails 第2版のサンプルアプリケーション](https://github.com/perfect-ruby-on-rails/awesome_events)をクローンして進めていく。 - 書籍のバージョン(Rails6.0.6,Ruby2.7.8)で環境構築! - 参考記事:[パRails 環境構築の手順](https://hackmd.io/y7qb2BRMT2Wd4tAtKYObcQ) ### 次回 - 21pの1-1-4から。🚂 ### 学んだこと(分かったこと/わからなかったこと) ### 感想(輪読会自体の改善点などあれば) ------ ## 2023\-08\-23(水) ### ファシリ @odentakashi ### ドライバー @sadanora ### 読んだところ - 1-1-4からP.33のコラムまで。 ### 次回 - 1-3-4から ### 学んだこと(分かったこと/わからなかったこと) - @odentakashi - DHHという呼び方しか知らなかったので、フルネームが知れてよかったです。 - `binstub`は`gem`の中にある本来の実行ファイルのラッパースクリプト - `channel`て何に使うんだろう? - @sadanora - Railsの思想 - CoC、DRY、REST、自動テスト - @moegi29 - Gemfileに記載されているgemパッケージのバージョンや依存関係を解決した結果をGekfile.lockとして保存している - かつてはrdefsというgemがあった - ls -1FAでプロジェクトファイルを確認、ls -1FA ./bin と書くことでbinディレクトリ内をできる - @motohiro-mm - Railsの思想は4つ(CoC、DRY、REST、自動テスト) - `rails new`でプロジェクトの雛形を作成、`rails s`で実行 - binディレクトリには`bundle exec`をつけなくても実行できるコマンドが入ってる - `bin/rails s`とするほうがファイルを明示的にできるので、速度もはやくなるらしい! - @sharoa - bundleコマンドのサブコマンドを改めてしりました。 - Railsの思想も知れた。 - 主要なファイルやディレクトリが多くて既にびびってます。 - Zeitwerkはツァイトヴェルクとよむ。むずい。 - @hiromisugie - `init`(イニット)をずっと「インイット」と読んでいた…。そしてイニシャライズの略であることを初めて知った。 - Railsの思想は、Coc・DRY・REST・自動テスト - `bundle exec`を付けなくても実行できるコマンドが`bin`ディレクトリに用意されている、このようなファイルを`bunstub`と言う - Zeitwerkは「ツァイトヴェルク」と読む ### 感想(輪読会自体の改善点などあれば) - @djkazunoko - チーム開発MTG最近終わるの早いから水曜も参加できそう - Zeitwerk(ツァイトヴェルク)初耳 - @shodan - ラジオ参加させていただきました。輪読会/モブプロなどで使われる用語(ファシリ・ドライバーなど)にそもそも明るくなくオロオロしましたが、わからない点など伺いつつ参加できればと思っております。 - @sharoa - まだ最初のうちなのでなんとかついていけてます。 - 私もあとで本に沿ってRailsいれてみたいとおもいます。 - @sadanora - Railsの登場が2004年。もうすぐ20年! - @motohiro-mm - 読み方が難しい物が多くて、それも含めて勉強になるなと感じました。 - これからはちゃんと`bin/rails s`としたいと思います。 - @hiromisugie - 輪読会の隠れた大きなメリットは読み方を知れることだと改めて感じました - @moegi29 - 一度読んだ本だけど、知らないことがたくさんある! ----- ## 2023\-08\-24(木) ### ファシリ @sharoa ### ドライバー @sadanora ### 読んだところ 1-3-4(34p)から1-4-3(41p)まで。 ### 次回 1-4-4(42p)から。🚂 ### 学んだこと・感想 - @shodan - `routes`(ラウツ) / `root` をちゃんと使い分ける(文脈次第では聞き手を混乱させかねないので)。 - `-h`オプションは覗いておこうと思いました。 - @sadanora - `bin/rails dbconsole`でDBコンソールを起動してDBに接続できる。 - 手放しで動かないコードのドライバーがむずかしい。 - @odentakashi - `runner`というコマンドでスクリプトを実行できる。 - ↑ どんなタイミングで使うか気になった。 - @hiromisugie - `rails -h`で、使用できるrailsコマンドの一覧を確認できる(たくさんある) - コマンド名に続いて`-h`をする、例えば`rails s -h`とすると、より詳しいコマンドの使い方を確認できる - `rails db:migrate`はだいぶ染み付いてきたけど、初回は`rails db:create`をするというのを忘れていた - 最後のエラー、前も遭遇して何らかの判断のもと1行消して先に進んだ気がするのですが完全に記憶を失っています、、、 - ちょっとだけ確認しました、削除した1行はjavascriptを読み込むための記述なので、少なくともjavascriptを使わないところまでは、この1行を削除するというのでも良いかも…?と思いました。(独習Railsとかはjs全く触らないので問題にならなかったのかもです。パRailsはjsもいじるんですかね汗) - @sharoa - Railsのコマンド表を覚えていけたらなと思いました。 - routesはらうつと読む。 - scaffordという機能を使うと簡単なTODOアプリケーションが作成できるということ。 - CRUDはクラッドと読む。 - まだ第一章の概要なのに、なんだかハードだな、と思っています。 - @motohiro-mm - routes.rbの読み方は、界隈的には「ラウツ」(rootと区別するため) - CRUDの読み方は「クラッド」 - `bin/rails dbconsole`、`.schema テーブル名`でテーブル定義を確認できる - `db:migrate:status`で現在記録されているマイグレーションを確認、upが適用済み、downが未適用 - 基本的な操作のところでも、細かい操作であまり知らなかったものも出てきたりしているので勉強になります ----- ## 2023\-08\-25(金) ### ファシリ @hiromisugie ### ドライバー @sadanora ### 読んだところ 1-4-4(42p)から2-1-2(52p)の途中まで。 ### 次回 2章の`rails new book_admin`から ### 学んだこと・感想 - @hiromisugie - 初めのエラーについてまだ自分も解消できていないので、時間があればトライします…(ないかも) - URL設計の確認は2つ方法がある - Rails起動中に`http://localhost:3000/rails/info/routes`へアクセスする - ターミナルで`rails routes`を実行する - `routes.rb`の`resources :hoge`はシンプル過ぎて初めよくわからなかった。慣れればスッキリ見えて良いのかな…。 - scaffoldは基本的なアクション7つを自動的に作ってくれる - 冒頭のエラー次第ではあるのですが、rails newなども実際にやってみても良いかもと思いました - @motohiro-mm - URL設計の確認方法は2つ - development環境で動作しているときにhttp://localhost:3000/rails/info/routesへアクセス - `bin/rails routes`を実行 - routesに出てくる(.:format)はアクセスしたURLの拡張子によってレスポンスを変化させるために利用させる - 環境構築を土日のうちに自分でもう一度やってみようと思います - 直前まで昼寝してしまってちょっとぼーっとしてしまったので、昼寝の時間を気をつけたいと思います - @djkazunoko - M=Model, V=View, C=Controller - 昨日エラーがあった?とこは後で見てみる - ドライバーむずそう - @sharoa - CRUD操作は単純な動きでしたが、実際初めて動かしてみたら感動がありそうな気がする。 - 自分がやるときは、sadanoraさんが残してくださったhackMDなどをみてはまらないようにしたいと思いました。(すぐ沼ってしまるうのでw) - scaffoldでアクションメソッドが7つ生成される。 - MVCアーキテクチャはrailsの基本的な概念であり、rails自身を特徴づける重要な要素。 - モデルの基礎と考え方 - パrailsの輪読会、ほんと緊張するw でも予習としてなんとかついていきたい。来週以降も。 - @umizaru(聞き専です) - 初めて参加でした。ざっと全体に目を通しもしましたがRailsのプラクティスでやったことをほとんど忘れててやばそう。 - MVCアーキテクチャの復習。モデル、ビュー、コントローラー。モデリングの意味も再復習。 - RESTfulなアーキテクチャを意識したアプリケーションを設計するとRailsの恩恵を受けやすい。 - @cellotak - scafoldのルーティングはGET, POST, PUT, DELETEがそれぞれshow, create, update, destroyに対応している - Prefixを利用することでURL文字列を生成できる - ビジネスロジックを書くのはコントローラだと思ってましたが、正しくはモデルだった - せっかくの輪読会なので、一度マイグレーションをリセットして、一つずつmigrateしていって変化を見るのもおもしろいかも、と思いました! - @sadanora - routesで`resources :tasks`のように書くと複数のrouteを一度に定義できる。 - 最初はなんでこんなにrouteが沢山生えてるんだ?ってなったのを思い出しました。 - @moegi29 - MVCはモデル、ビュー、コントローラー - RESTfulを意識してアプリを作成することで恩恵を受けやすくわかりやすい構造になる。 - 1章のサンプルコードが動かないのは気になるので解決したいところ、、! - LEF - 環境構築が上手くいった方のリポジトリをGitHubで共有しておくと、環境を揃って進行がスムーズに進むカモ🦆 -----

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully