This application contains some bugs for beginner of RoR.
step1: fork this Repository
- Press fork button
https://gyazo.com/04e45514f4a9cb64a32168a8a5f34cec
step2: checkout your branch and run server
bundle install
rails db:create
rails db:migrate
rails db:seed
rails server
When you fix bugs, write comment Cause
and Reason
above your code.
:en
# ErrorCause: XXX
# FixReason: XXX
your code
:jp
# エラー原因: XXX
# 修正の意図: XXX
your code
class Task < ApplicationRecord
# ErrorCause: Can't use association @task.labels
# FixReason: Fix typo (label --> labels)
has_many :labels
end
-
Ruby version
3.3.0
-
Rails version
6.1.7.7
brew upgrade rbenv ruby-build
rbenv install 3.3.0
rbenv local 3.3.0
下記のGemを導入しています。
- デバッグ用:5gems
gem 'better_errors'
gem 'binding_of_caller'
gem 'pry-byebug'
gem 'pry-doc' https://qiita.com/joker1007/items/42f00b12c65bbec0e50a
- コード解析用:2gems
gem 'rubocop'
gem 'rails_best_practices'
.rubocop.yml
も設定済みです。
こちらの詳細は直接説明致します。