rails version new app name-d mysql --webpacker=vue --skip-turbolinks
gem 'devise'
gem 'devise-i18n'
gem 'rails-i18n'
gem 'faker'
gem 'factory_bot_rails'
gem 'rubocop', require: false
gem 'rubocop-rails', require: false
gem 'pry'
gem 'pry-doc'
gem 'pry-rails'
gem 'pry-byebug'
gem 'foreman'
gem 'rspec-rails', '~> 4.0.0'
gem 'rubocop-rspec', require: false
$ rails webpacker:install
$ rails webpacker:install:vue
$ yarn add axios
$ yarn add vue-router
$ rails g rspec:install
$ rails g devise:install
.rspec
--require spec_helper
--format documentation
Profile.dev
web: bundle exec rails s
# watcher: ./bin/webpack-watcher
hot: ./bin/webpack-dev-server
bin/server
#!/bin/bash -i
bundle install
bundle exec foreman start -f Procfile.dev
$ chmod 777 bin/server
config/application.rb
config.i18n.default_locale = :ja
config.time_zone = "Tokyo"
config.generators do |g|
g.template_engine false
g.assets false
g.helper false
g.test_framework :rspec,
fixtures: false,
view_specs: false,
helper_specs: false,
routing_specs: false
end
$ rails g api/v1/Controller name index
$rails g model model name title:string likable:references{polymorphic}
#rails new time
$ bundle config --local build.mysql2 "--with-ldflags=-L/usr/local/opt/openssl/lib"
Recommended Posts