The forum will be down for maintenance over the weekend of August 18-20, 2017. The forum will be shut down on the evening (EDT) of Friday, August 18. Downtime is unknown but may be up to two days. The forum will be restarted as soon as maintenance is complete.

Hello,

can somebody help me? Where is my Misstake? Running is the Example-PersonalServer of the Standard-Installation.

require 'rubygems'
require 'active_record'

ActiveRecord::Base.establish_connection(adapter: "sqlanywhere", database: "demo", user: "DBA", password: "***", server: "demo12")

class Contacts < ActiveRecord::Base
  self.table_name = 'Contacts'
end

res = Contacts.find(:all)

Error: in `build_arel': undefined method `bind_values' for #<Arel::SelectManager:0x270faf8> (NoMethodError)

I use: activerecord (4.1.8) activerecord-sqlanywhere-adapter (1.0.0) arel (5.0.0) sqlanywhere (0.1.6)

Thx, Pascal

asked 17 Dec '14, 08:31

pmichel's gravatar image

pmichel
1111
accept rate: 0%

edited 18 Dec '14, 05:03

Volker%20Barth's gravatar image

Volker Barth
30.9k309457667

how can i load the arel-visitor for sqlanywhere? i think, there ist my problem:

require 'rubygems'
require 'active_record'
require 'active_record/connection_adapters/abstract_adapter'
require 'active_record/connection_adapters/sqlanywhere_adapter'

ActiveRecord::Base.establish_connection(adapter: "sqlanywhere", database: "demo", user: "DBA", password: "***", server: "demo12")
ActiveRecord::Base.connection

class Contact < ActiveRecord::Base
end

Contact.select('id')

Error-Message:
...in `to_sql': undefined method `accept' for nil:NilClass (NoMethodError)

Thanks, Pascal

(18 Dec '14, 04:21) pmichel

I use another gem that works perfectly with SQLAnywhwere:

gem 'activerecord-sqlanywhere-adapter', :git => 'git://github.com/Sharagoz/activerecord-sqlanywhere-adapter.git', :branch => 'rails40'

Just put the line above in the gem file, run bundle install, configure database.yml correctly and go.

permanent link

answered 18 Dec '14, 07:11

MarcosCunhaLima's gravatar image

MarcosCunhaLima
3068918
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×12

question asked: 17 Dec '14, 08:31

question was seen: 796 times

last updated: 18 Dec '14, 07:11