プロジェクト作成
$ gem install bundler
$ mkdir project
$ cd project
$ bundle init
Writing new Gemfile to /path/to/project/Gemfile
$ vi Gemfile
A sample Gemfile
source "https://rubygems.org"
gem "rails"
$ bundle install --path vendor/bundle
$ bundle exec rails new . --skip-test-unit --skip-bundle -d mysql
-
Gitにプロジェクトを登録
git init
git add .
git c -m "initial commit" -
Gemを導入
cp gem file
bundle install --path vendor/bundle -
gemの設定
rails g config:install -
development.rbを更新
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: "localhost",
port: 25,
domain: "localhost.localdomain"
}
Specify what domain to use for mailer URLs
config.action_mailer.default_url_options = {host: "localhost:3000"}
config.after_initialize do
Bullet.enable = true
Bullet.alert = true
Bullet.bullet_logger = true
Bullet.console = true
Bullet.raise = true
Bullet.add_footer = true
end
6.規約準拠確認
bundle exec rubocop
--auto-correct
必須jquery
jquery.bootstrap-growl.min
jquery.livequery.min
rails g scaffold user --skip-view-specs --skip-controller-specs --skip-routing-specs --skip-request-specs --skip-jbuilder --skip-stylesheets