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 new の手順メモ

Posted at

メモ: アプリケーションを作るときに必要な Gemfile と、アプリケーションで使う Gemfile は別でよい。

Rails アプリケーション作成用のプロジェクトを作る

Gemfile

rails_generator みたいなディレクトリを作って、そこに Gemfile って名前のファイルを置く。内容は下記

Gemfile
# frozen_string_literal: true
source 'https://rubygems.org'

gem 'rails'

bundle install

デバッグ用なので path を指定する

$ bundle install --path vendor/bundle

こんな感じになるはず

$ ls
vendor
Gemfile
Gemfile.lock
$

rails new

ディレクトリを指定して rails new をする。今回は

-+- (root)
 |- rails_generator (今操作していたディレクトリ)
 `- sample

となるように下記を実行してみる。

$ bundle exec rails new ../sample

終わったら、 rails_generator 配下は消して良い

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?