LoginSignup
2
1

More than 5 years have passed since last update.

Ralisの初期設定 (備忘録)

Last updated at Posted at 2016-06-25

はじめに

久しぶりにRails触ることがあったので、初期設定を書いておこうと思います.
しょうもない記事です.

環境 & 前提

rubyはrbenvで管理しています(あまり関係ないけど)

% ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]

.zshrc ( or .bash_profile)には以下のエイリアスが設定してあります

# alias : rails
alias bundle install="bundle install --path=vendor/bundle"
alias rails="bundle exec rails"
alias rake="bundle exec rake"

初期化手順

mkdir newapp
bundle init    #=> Gemfileができる
vim Gemfile    #=> 編集(※1)
bundle install #=> railsのインストール
rails new .    #=> rails projectを作成

※1 : Gemfileの編集

gem railsをコメントインしましょう. (もしなければ書き足すと最新のものが入るはず)

source "https://rubygems.org"

gem "rails"

その他

bundle exec に関しては、project毎に管理するためです。 全体にrailsが入ってもいいって人は sudo gem install railsを叩くがいいさ..

Sublime, Atomを使う人は以下の設定しておくと便利かも..?

# .zshrc

alias sublime="open -a 'Sublime Text'"
alias atom="open -a Atom"
2
1
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
2
1