健康意識の高まり

いろんなメモなど

2013-06-04から1日間の記事一覧

NoMethodError: undefined method 'accept' for nil:NilClass が出た時の対処法

Gemfile に mysql2 を追加 gem 'mysql2' activerecord-mysql2-adapter があればコメントアウト # gem 'activerecord-mysql2-adapter' bundle install rails 再起動 参考 Rails 3: Model.all => NoMethodError: undefined method 'accept' for nil:NilClass -…

Rails のデータベース設定でリモートのDBサーバを指定する

host パラメータを指定する。 development: adapter: mysql2 encoding: utf8 database: blog_development pool: 5 username: root password: host: HOST_NAME 参考 マルニカ。 RailsからDB(PostgreSQL)に接続

複数列をまとめて align-regexp する方法

以下の elisp で align-regexp-repeated コマンドを定義して、呼び出せば良い。 (defun align-regexp-repeated (start stop regexp) "Like align-regexp, but repeated for multiple columns. See http://www.emacswiki.org/emacs/AlignCommands" (interacti…