Giter Site home page Giter Site logo

taskleaf's Introduction

現場Rails輪読会用taskleafアプリケーション

概要

このリポジトリはフィヨルドブートキャンプで行われている現場Rails輪読会で、書籍の中で作るtaskleafアプリケーションをハンズオンで作成する目的で作られたものです。

現場Rails輪読会では、RubyとRails、bundlerのバージョンを以下のようにしています。

  • Ruby:2.7.5
  • Rails: 6.0.4.6
  • Bundler:1.17.3
  • node 12系

手元のパソコンで輪読会の進捗状況を再現したい場合、以下を行ってください。 環境構築でエラーやわからないところなどあれば、輪読会でガンガン聞いてください!聞いてくださるととても喜びます。

環境を合わせるために必要なこと

nodeのバージョン

nvmを使っている場合

  • nvm ls-remoteでインストール可能なバージョンを一覧
  • nvm install v12.22.10を実行
  • nvm use v12.22.10を実行

Rubyのインストール

  • ターミナルでrbenv install 2.7.5を実行しRuby 2.7.5をインストール
  • 現場Rails輪読会用のディレクトリを作成して、ターミナルで作成したディレクトリ内に移動しrbenv local 2.7.5を実行

Bundlerのインストール

  • gem install bundler -v '1.17.3'を実行してbundler 1.17.3 をインストール

Ruby on Railsのインストール

  • gem install rails 5.2.1を実行してRails5.2.1をインストール

輪読会用リポジトリをクローン

  • ターミナルで作成した輪読会用ディレクトリ内に移動し、git clone https://github.com/yatsuhashi168/taskleaf.gitを実行する
  • bundle installを実行し動作に必要なアプリケーションをインストールする

注意

Railsの一部であるactivestorageが依存しているmimemagic gemが、ライセンス関連の問題でrubygems.orgから取り下げられました。これにより、mimemagic <= 0.3.5に依存しているRailsアプリがbundle installに失敗するようになりました。(中略)(2021/03/27現在)Rails 5.2.5 / 6.0.3.6 / 6.1.3.1 はmimemagicに依存しなくなりました。これらにバージョンアップしましょう。

mimemagicの最新動向

もしrails5.2.1をインストールした際mimemagic関連のエラーが出た場合は1回rails5.2.1をアンインストールした後、rails5.2.5をインストールしてください。

確認

ruby -vでrubyのバージョンが2.7.5なのか確認する

例:ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-darwin21]

bundler -vでbundlerのバージョンが1.17.3であることを確認する

例:Bundler version 1.17.3

rails -vでrailsのバージョンが5.2.1であることを確認する

Rails編

データベースまわりでエラーが出たら、エラーメッセージをよく読んだ上で、以下を確認してみましょう!

taskleaf's People

Contributors

aseiide avatar eatplaynap avatar haruguchi-yuma avatar isshi-hasegawa avatar kasai441 avatar kotakawase avatar shirotamaki avatar yana-gi avatar yatsuhashi168 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

taskleaf's Issues

20220522 nginxとRailsを連携してproduction環境で立ち上げる

Railsアプリをデプロイする

nginxとRailsを連携する

webサーバとアプリケーションサーバの違い
  • webサーバ
    • nginx, apacheのこと
    • ユーザーから送られてきた自サイトへのリクエストを受け取り、なんらかの処理を加えるプログラム
    • webサーバーはRailsアプリケーションに処理を移譲することなく、そのリクエストを自分で処理できる
  • アプリケーションサーバ
    • puma, unicornのこと
    • あなたのRailsアプリケーションを動かしているもの
    • アプリケーションサーバーはあなたのコードを読み込み、アプリケーションをメモリに保持する
    • アプリケーションサーバ単体でもRailsアプリケーションを動かせるが、production環境では手前にwebサーバを置くことが多い
      •  webサーバーは複数のアプリケーションを一度に処理したり、アセットを素早くレンダリングしたり、リクエストごとに発生する多くの処理をさばいたりしてくれるから

作業メモ

  • brew install nginxでnginxをインストール
  • nginx を実行
  • localhost:8080にアクセス -> 成功

タスクに進捗状況のステータスを持たせたい

現在taskleadではタスクの「編集」や「削除」しかなく、タスクの進捗状況が分かりにくいので「完了」や「未着手」、「作業中」などといった進捗状況がわかるようにしたい。

具体的な文言については要考慮。

ログアウト機能がバグってる

image

↓ログ見るとGETが走ってる

Started GET "/logout" for ::1 at 2022-01-26 09:47:28 +0900
  
ActionController::RoutingError (No route matches [GET] "/logout"):

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.