No, this is not a real Sinatra error :).
This is the personal homepage of Elad Meidar, a web developer and an entrepreneur specializing in Ruby on Rails. I hang around in Israel, and i am currently having the best time of my life over at Fiverr.com
I am a proud member of RailsBridge, Helping new Rails developers get into our world and also contributed a few Patches to the Ruby on Rails core.
The AR::Base.find support the options of :include (for adding associations as JOINs in the select) and :select (which pinpoints the columns you wish to select.
For some reason, it is impossible to do them both toghther for example
<br /> Article.find(:all, :include => :author, :select => 'authors.name')<br />
This line will raise an exception.
Luckily, there is the select_with_include gem which enables this feature!
first, install the gem
<br /> gem install select_with_include<br />
next, require it in your environment configuration file (or in environment.rb)
<br /> require 'include_with_select'<br />
Now, you can use the :select option, remembering to use the table name even if a column name is not unique.
There is a single fault back, in case you want to select all the table columns, you need to write them all, one by one. yeah, it sucks.
You're seeing this error because I think it is funny.