Posts Tagged ‘rubyonrails’

Detecting retarded browsers using Ruby on Rails

Here is a small code snippet to check for retarded browsers in Ruby on Rails: user_agent = request.user_agent unless user_agent[/msie/i].nil? session[:browser] = ‘retarded’ else session[:browser] = ‘normal’ end

uninitialized constant MysqlCompat::MysqlRes

I just had the following problem when trying to start a Ruby on Rails application on a fresh installation of Mac OS X Snow Leopard after I installed the mysql gem via gem install mysql: uninitialized constant MysqlCompat::MysqlRes I searched a bit and found a solution here. It was a problem with a buggy version [...]