0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Rails application templateを使う

Last updated at Posted at 2018-08-03

Railsの公式でサポートされているアプリケーションテンプレートの機能を使って、Railsの初期化をします。

  1. Macの方
  2. Windowsの方

1.Macの方

$ cd # アプリケーションを作りたいディレクトリ
$ rails new @app_name -m https://raw.githubusercontent.com/ttexan1/rails_template/master/template.rb

@app_nameを自分のアプリケーションの名前に変更してください

2.Windowsの方

$ git clone https://github.com/ttexan1/rails_template.git
$ atom .
template.rb
def get_remote(src, dest = nil)
  dest ||= src
  repo = '/Users/{your_directory}/rails_template/files/' <=ここを正しいパスに編集しなければいけない
  remote_file = repo + src
  remove_file dest
  get(remote_file, dest)
end

# アプリ名の取得
@app_name = app_name

# 以下略
$ cd # アプリケーションを作りたいディレクトリ
$ rails new @app_name -m ~/{your_directory}/rails_template/template_windows.rb
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?