Skip to content

nacal/vue-rails-todo

Repository files navigation

Vue.js + Ruby on Rails ToDo app

DEMO

DEMO

Vue.jsとRuby on Railsで作成したToDoアプリ

デモ用のためユーザー機能等は未実装

Environment

  • Ruby 2.6.3
  • Rails 6.1.1
  • Vue.js 2.6.12
  • Vuetify 2.4.3

Setup

Install rbenv

$ brew install rbenv
$ brew install ruby-build

Install ruby

rbenv install 2.6.3

Change ruby version

$ rbenv global 2.6.3
$ rbenv rehash

Install bundler

$ gem install bundler

Setup MySQL

$ brew install mysql
$ mysql.server start
> Starting MySQL
> SUCCESS!

Setup rails

$ bundle install --path=vendor/bundle
$ bundle exec rails s
> application starting in development on localhost:3000

Setting DB

config/database.yml

default: &default
 adapter: mysql2
 encoding: utf8
 pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
 username: <MySQL username>
 password: <MySQL password>
 socket: /tmp/mysql.sock

Setup DB

$ rails db:create
$ rails db:migrate

Start project

$ bundle exec rails s
> application starting in development on localhost:3000