GithubHelp home page GithubHelp logo

a-f-may / sample_apps Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yasslab/sample_apps

0.0 0.0 0.0 9.2 MB

Railsチュートリアルの各章が終わった状態を集めたリポジトリです。

Home Page: https://railstutorial.jp/

License: Other

JavaScript 3.61% Ruby 69.95% CoffeeScript 0.62% CSS 1.32% HTML 19.97% SCSS 4.48% Gherkin 0.01% Procfile 0.03%

sample_apps's Introduction

Railsチュートリアル_バナー画像

Rails チュートリアル sample_app コード集

Railsチュートリアルの各章が終わった状態を集めたリポジトリです。

『Railsチュートリアルって何?』という方は公式YouTubeチャンネルをご参照ください 📺 ✨

Sample App の開発途中でエラーの原因がどうしても分からないときや、Railsチュートリアル解説動画を視聴するときなどにご活用ください。(解説動画はお試し視聴もできます)


📂 各章とディレクトリ名の対応関係

対応しているRailsのバージョン毎にディレクトリを分けております。具体的な対応関係は次のとおりです。

上記の各ディレクトリの中に 各章が終わった状態の sample_app を置いています。例えば 6_1 ディレクトリの場合は、次のようになります。

  • ch01: 第1章が終わった状態
  • ch02: 第2章が終わった状態
  • ch03: 第3章が終わった状態
  • ch04: 第4章が終わった状態
  • ch05: 第5章が終わった状態
  • ch06: 第6章が終わった状態
  • ch07: 第7章が終わった状態
  • ch08: 第8章が終わった状態
  • ch09: 第9章が終わった状態
  • ch10: 第10章が終わった状態
  • ch11: 第11章が終わった状態
  • ch12: 第12章が終わった状態
  • ch13: 第13章が終わった状態
  • ch14: 第14章が終わった状態

なお、各章の演習の結果や、高度なセットアップなどは反映されておりません。


✅ 動作環境と注意事項

本リポジトリにあるサンプルコードは AWS Cloud9 上で動作確認しています。 macOS や Windows などのローカル環境では下記の手順で動かないこともあります。あらかじめご了承ください。

📜 開発環境(AWS Cloud9) - Railsチュートリアル


🔧 アプリを動かす方法

版番号や章番号ごとにセットアップ方法は異なりますが、大まかな流れは基本的に同じです。例えばRails 6.0 対応の第11章を動かす場合は次のようになります。

  1. 本リポジトリをクローンし、該当のディレクトリへ移動します。

    $ git clone https://github.com/yasslab/sample_apps.git
    $ cd 6_0/ch11
    
  2. 必要なパッケージをインストールし、bundle install(本番環境でのみ必要なgemはスキップ)します。

    $ yarn install --check-files
    $ yarn add [email protected] [email protected]
    $ bundle install --without production
    
  3. データベースを移行します。

    $ rails db:migrate
    
  4. テストを実行して、正しく動作していることを確認します。

    $ rails test
    
  5. サンプルユーザーをデータベースにseedして、アプリを実行する準備が整いました。

    $ rails db:seed
    $ rails server
    

無事にセットアップが完了できていれば、ブラウザから localhost:3000 にアクセスするとトップ画面が表示されます。ログインページから以下のメールアドレスとパスワードを入力するとログインできます。

なお、第13章以降のSample Appを本番環境にデプロイする場合は、別途Amazon S3のセットアップが必要になります。


🎓 関連リンク/関連レポジトリ


:octocat: 本リポジトリのライセンス

The MIT License

Copyright © YassLab Inc.

YassLab Logo


:octocat: Sample Appのライセンス

Ruby on Rails Tutorial: Learn Web Development with Rails.

All source code in the Ruby on Rails Tutorial is available jointly under the MIT License and the Beerware License.

Copyright © Michael Hartl

sample_apps's People

Contributors

yasulab avatar himajin315 avatar yuppymam avatar rakuda-san-desu avatar tunepolo avatar nashirox avatar sho-h avatar paveg avatar

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.