brew install rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> .bashrc
echo 'eval "$(rbenv init -)"' >> .bashrc
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
rbenv install -l # 入れれるバージョン
rbenv install 2.0.0-rc2
rbenv versions # バージョン確認
rbenv global 2.0.0-rc2 # rc2を適用
ruby -v # バージョン確認
sudo gem install rails
Last active
December 29, 2015 19:10
-
-
Save akiomik/7715067 to your computer and use it in GitHub Desktop.
rails環境構築メモ
mysql対応
最初に指定する場合
rails new hoge --database mysql
後から変更する場合
-
config/database.yml
を編集development: adapter: mysql2 database: hogehoge encoding: utf8 pool: 5 reconnect: false username: hoge password: fuga host: localhost port: 3306
-
コマンドを実行
bundle install spring rake db:migrate
APIのテスト
http://blog.inouetakuya.info/entry/2013/10/27/200111
factory girl
http://o.inchiki.jp/obbr/159#toc_1
http://qiita.com/norobust/items/354a5d2b97f552b927de
with devise
http://blog.sorryapp.com/2013/03/22/request-and-controller-specs-with-devise.html
http://319ring.net/blog/archives/2052
http://easyramble.com/request-spec-on-devise-login.html
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gem i spring
spring rake ...
やspring g ...
などとすることでコマンドの起動が速くなる