あいつの日誌β

人生はお酒があれば何とかなります。 drunkard.tokyo

Ruby

Rails 5 でモデル名を変更したい

備忘録です bundle exec rails g migration RenameUserTabsToUserCategories edit class RenameUserTabsToUserCategories < ActiveRecord::Migration[5.2] def up rename_table :user_tabs, :user_categories end def down rename_table :user_categories, :…

How to create simple REST Application by Ruby

How to create simple REST Application by Ruby create project % mkdir ruby-rest && cd $_ % bundle init % bundle install --path vendor/bundle --binstubs=vendor/bundle/bin edit Gemfile. ruby '2.1.2' source "https://rubygems.org" gem "sinatra"…

Ruby, Heroku and Groonga tutorial 2014

Ruby, Heroku and Groonga tutorial 2014 enviroments % sw_vers ProductName: Mac OS X ProductVersion: 10.9.4 BuildVersion: 13E28 Ruby install ruby % rbenv install 2.1.2 % rbenv global 2.1.2 use plugin % cd $RBENV_ROOT/plugins % git clone git:…