Apr 27
I have now several times had hard-to-debug problems that came down to field size limits. When developing with sqlite, it’s easy to forget about field limits. When deploying to mysql, these come into play. Don’t forget about them!
class Error404 < StandardError end class ApplicationController < ActionController::Base rescue_from Error404, with: :render_404 def render_404 respond_to do |format| format.html{render file: "#{RAILS_ROOT}/public/404.html", status: 404} format.all{render nothing: true, status: 404} end true end # etc. end
raise Error404
render_404 and return
class Widget < ActiveRecord::Base def errors [1,2] end end
wdgt = Widget.new wdgt.save!
NoMethodError (undefined method `full_messages' for #<Array:0x00000102344c68>)
serialize attr_name, class_name=Object
gem install mongrel --source http://gems.rubyinstaller.org
script/plugin install git://github.com/tra/spawn.git
spawn do # job running in the background end
<blah blah blah>: no such file to load -- net/https (RuntimeError)
script/console --irb=irb1.9