squeel icon indicating copy to clipboard operation
squeel copied to clipboard

Squeel::Nodes::Stub can't be coerced into Fixnum

Open hudaniel opened this issue 11 years ago • 0 comments

Hi, I'm getting this error on Rails 4.2, Ruby 2.1.5

    2.1.5 :009 > User.where {id > 0 | created_at < Time.now }
    TypeError: Squeel::Nodes::Stub can't be coerced into Fixnum
    from (irb):9:in `|'
    from (irb):9:in `block in irb_binding'
    from /Users/daniel/.rvm/gems/ruby-2.1.5/gems/squeel-1.2.3/lib/squeel/dsl.rb:31:in `instance_eval'
    from /Users/daniel/.rvm/gems/ruby-2.1.5/gems/squeel-1.2.3/lib/squeel/dsl.rb:31:in `eval'
    from /Users/daniel/.rvm/gems/ruby-2.1.5/gems/squeel-1.2.3/lib/squeel/adapters/active_record/4.1/relation_extensions.rb:29:in `where'
    from /Users/daniel/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/querying.rb:10:in `where'
    from (irb):9
    from /Users/daniel/.rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/commands/console.rb:110:in `start'
    from /Users/daniel/.rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/commands/console.rb:9:in `start'
    from /Users/daniel/.rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:68:in `console'
    from /Users/daniel/.rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /Users/daniel/.rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:8:in `require'
    from bin/rails:8:in `<main>'

I've tried config.load_core_extensions :hash property for /config/intializers/squeel.rb but it gave me a deprecation warning and still didn't work (exact same issue). Any idea what's going on? Thanks a lot for taking the time to read this.

hudaniel avatar Feb 26 '15 23:02 hudaniel