LoginSignup
3
4

More than 5 years have passed since last update.

Railsの新規プロジェクト作成手順メモ(個人用)

Posted at

ただの個人的手順のメモです。

とりあえずrailsコマンドいれる。直接gemインストールしたくないのでbundlerで。

$ mkdir app_name
$ cd app_name
$ vim Gemfile
source "https://rubygems.org"
gem "rails"
$ bundle install --path=vendor/bundle

プロジェクト作る

$ bundle exec rails new . --skip-test-unit --skip-bundle --database=mysql

bundleしなおす

$ rm -rf vendor/bundle Gemfile.lock
$ bundle install --path=vendor/bundle

gitレポジトリの初期化

$ git init
$ vim .gitignore
/.bundle
/vendor/bundle
/log/*.log
/tmp
.DS_Store
*.swp
$ git add -A
$ git commit -m init

DB作る

$ bundle exec rake db:create
3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4