2014-10-10から1日間の記事一覧

Rails+Grape

Grapeのインストール $ vim Gemfilegem 'grape' gem 'grape-jbuilder' $ bundle install APIディレクトリの作成 $ cd app/ $ mkdir api $ vim api/api.rbclass API < Grape::API prefix "api" version 'v1', :using => :path format :json mount Users_API e…

Railsアプリ作成memo

新規アプリを作る $ rails new sample -d mysql $ cd sample (bundleをスキップする場合) $ rails new sample -d mysql --skip-bundle コントローラーを作る cd /root/sample/app/controllers rails generate controller test コントローラーtest class Test…

Railsインストールmemo

Git Installation $ sudo yum install git rbenv install $ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv $ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile $ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile $ sourc…