This:
User.where 'id < ?', 5
fails with this message:
NoMethodError: undefined method `join' for #<Class:0x007fa4c9b5a598>
When I try:
User.where 'id < 5'
it works.
In another project:
User.where 'id < ?', 5
works.
Where could be my problem?
Update
I could solve the problem but commenting a gem:
# gem 'cancan'
Working flow
Then when I run console, I get:
load error: ~/.irbrc
NameError: uninitialized constant ApplicationController::CanCan
And my simple query works.
Not working flow
Then I comment CanCan part of application controller and console starts without problems, but when I try my simple query it fails with the same error.
What I am trying now
Searching for join
in ~/.irbrc
, I got several results. But I am not sure of what I am doing.
Where could be my problem?