LoginSignup
4
4

More than 5 years have passed since last update.

rails & railsプロジェクトのローカル環境へのインストール・構築

Last updated at Posted at 2014-11-28

以下,Ruby on Rails自体をローカル環境にインストールし,railsプロジェクトのひな形をそのローカル環境に構築した際の覚え書き.

rbenvをインストール

利用したいrubyバージョンをインストール

$ rbenv install 2.1.5

グローバル環境にbundlerだけをインストール

$ gem install bundler

プロジェクトフォルダを作成

$ mkdir example
$ cd example
$ rbenv local 2.1.5

railsをローカル環境にインストール

下記の内容でGemfileを作成

source "http://rubygems.org"
gem "rails", "4.1.8"

railsを./vendor/bundleにインストール

$ bundle install --path vendor/bundle

プロジェクトのひな形を作成

$ bundle exec rails new .

このとき,Gemfileを上書きするか聞いてくるので上書きする.

$ bundle exec rails server

で正常に動作することを確認.

References

4
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
4
4