framework38 個の有効ルール2026-09-30 検証済み
Ruby on Rails .gitignore テンプレート
Rails log files, temporary storage (/tmp), asset caches, and credentials. 公式GitHubリポジトリの最新パターンと決定論的に統合され、パッケージディレクトリ、一時ビルド成果物、ローカル環境ファイルをクリーンに保ちます。
スタック統合ジェネレーター
フルジェネレーターで開く/
Search for templates
クイック追加:
選択中1
Ruby on Rails
選択されたテンプレート (1)
Ruby on Rails
framework
Rails log files, temporary storage (/tmp), asset caches, and credentials
#rails#ror
.gitignore
38 ルール•1 テンプレート
### Ruby on Rails ###*.rbccapybara-*.html.rspec/db/*.sqlite3/db/*.sqlite3-journal/db/*.sqlite3-[0-9]*/public/system/coverage//spec/tmp*.origrerun.txtpickle-email-*.html # Ignore all logfiles and tempfiles./log/*/tmp/*!/log/.keep!/tmp/.keep # TODO Comment out this rule if you are OK with secrets being uploaded to the repoconfig/initializers/secret_token.rbconfig/master.key # Only include if you have production secrets in this file, which is no longer a Rails default# config/secrets.yml # dotenv, dotenv-rails# TODO Comment out these rules if environment variables can be committed.env.env*.local ## Environment normalization:/.bundle/vendor/bundle # these should all be checked in to normalize the environment:# Gemfile.lock, .ruby-version, .ruby-gemset # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:.rvmrc # if using bower-rails ignore default bower_components path bower.json files/vendor/assets/bower_components*.bowerrcbower.json # Ignore pow environment settings.powenv # Ignore Byebug command history file..byebug_history # Ignore node_modulesnode_modules/ # Ignore precompiled javascript packs/public/packs/public/packs-test/public/assets # Ignore yarn files/yarn-error.logyarn-debug.log*.yarn-integrity # Ignore uploaded files in development/storage/*!/storage/.keep/public/uploads 71 行•UTF-8•LF
決定論的パイプライン
生ソース: Ruby on Rails .gitignore
クローラブルな公式アップストリーム原典rails.gitignore•70 lines•UTF-8
*.rbccapybara-*.html.rspec/db/*.sqlite3/db/*.sqlite3-journal/db/*.sqlite3-[0-9]*/public/system/coverage//spec/tmp*.origrerun.txtpickle-email-*.html # Ignore all logfiles and tempfiles./log/*/tmp/*!/log/.keep!/tmp/.keep # TODO Comment out this rule if you are OK with secrets being uploaded to the repoconfig/initializers/secret_token.rbconfig/master.key # Only include if you have production secrets in this file, which is no longer a Rails default# config/secrets.yml # dotenv, dotenv-rails# TODO Comment out these rules if environment variables can be committed.env.env*.local ## Environment normalization:/.bundle/vendor/bundle # these should all be checked in to normalize the environment:# Gemfile.lock, .ruby-version, .ruby-gemset # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:.rvmrc # if using bower-rails ignore default bower_components path bower.json files/vendor/assets/bower_components*.bowerrcbower.json # Ignore pow environment settings.powenv # Ignore Byebug command history file..byebug_history # Ignore node_modulesnode_modules/ # Ignore precompiled javascript packs/public/packs/public/packs-test/public/assets # Ignore yarn files/yarn-error.logyarn-debug.log*.yarn-integrity # Ignore uploaded files in development/storage/*!/storage/.keep/public/uploads 主要除外パターンの解説
依存関係・パッケージフォルダ
パッケージマネージャーによって再インストール可能な外部ライブラリや vendor フォルダを除外します。
/vendor/bundle/vendor/assets/bower_componentsnode_modules/
ビルド・コンパイル生成物
ビルド処理で生成されるバイナリ、オブジェクトファイル、出力先ディレクトリを除外します。
*.orig
環境変数・シークレット情報
API キー、パスワード、接続文字列を含むローカル環境変数ファイル(.env)の流出を防止します。
config/initializers/secret_token.rb.env.env*.local
キャッシュ・一時ファイル
コンパイラキャッシュ、テストカバレッジデータ、一時作業ファイルを除外してリポジトリを軽量に保ちます。
/coverage//spec/tmp/tmp/*!/tmp/.keep/yarn-error.logyarn-debug.log*
ソース元とライセンス検証
ライセンス:: CC0-1.0
このファイルをプロジェクトのルートディレクトリに .gitignore というファイル名で配置してください。新規および未追跡ファイルに即座に反映されます。