The forum is currently being migrated to a new host. While the migration happens, the old server is still available. Once the new machine is ready, I will copy the database to the new machine. Feel free to ask and answer questions in the meantime.

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
37.1k343509770

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:

×13

question asked: 17 Dec '14, 08:31

question was seen: 1,673 times

last updated: 18 Dec '14, 07:11