Railsでsessionをactive_recordを使って管理をするときにちょっとデータベースの型で詰まったのでメモします。 環境 Ruby 2.1.2 Rails 4.1.6 MySQL +-------------------------+----------+ | Variable_name | Value | +-------------------------+----------+ | version | 5.6.21 | | version_comment | Homebrew | | version_compile_machine | x86_64 | | version_compile_os | osx10.10 | +-------------------------+----------+