PS. I'm on Ubuntu, you?
I'm using SQL Anywhere 11.0.1.2044 (and the same Rails version as you).
I am also connecting remotely to a SQL Anywhere server (don't know if
that matters).
Here is what my conf/database.yml looks like (sensitive info
removed/changed):
development:
adapter: sqlanywhere
database: NameOfDB
server: server1
commlinks: tcpip(host=***.***.***.***)
connection_name: rails_test
encoding: Windows-1252
username: dba
password: sql
I also use ./script/server to start it.
The error appears in the console as soon as I try to access a page.
Here is the stack:
$ ./script/server
=> Booting Mongrel
=> Rails 2.3.8 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Status: 500 Internal Server Error
Could not load SQLAnywhere DBCAPI library
/var/lib/gems/1.8/gems/activerecord-sqlanywhere-adapter-0.1.3/lib/active_record/connection_adapters/sqlanywhere_adapter.rb:35:in
`initialize'
/usr/lib/ruby/1.8/singleton.rb:94:in `new'
/usr/lib/ruby/1.8/singleton.rb:94:in `instance'
/var/lib/gems/1.8/gems/activerecord-sqlanywhere-adapter-0.1.3/lib/active_record/connection_adapters/sqlanywhere_adapter.rb:65:in
`sqlanywhere_connection'
/var/www/rails/sybase/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in
`send'
/var/www/rails/sybase/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in
`new_connection'
/var/www/rails/sybase/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in
`checkout_new_connection'
/var/www/rails/sybase/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in
`checkout'
/var/www/rails/sybase/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in
`loop'
/var/www/rails/sybase/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in
`checkout'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/var/www/rails/sybase/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in
`checkout'
/var/www/rails/sybase/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in
`connection'
/var/www/rails/sybase/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in
`retrieve_connection'
/var/www/rails/sybase/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in
`retrieve_connection'
/var/www/rails/sybase/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in
`connection'
/var/www/rails/sybase/vendor/rails/activerecord/lib/active_record/query_cache.rb:9:in
`cache'
/var/www/rails/sybase/vendor/rails/activerecord/lib/active_record/query_cache.rb:28:in
`call'
/var/www/rails/sybase/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in
`call'
/var/www/rails/sybase/vendor/rails/actionpack/lib/action_controller/string_coercion.rb:25:in
`call'
/var/lib/gems/1.8/gems/rack-1.1.0/lib/rack/head.rb:9:in `call'
/var/lib/gems/1.8/gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in
`call'
/var/www/rails/sybase/vendor/rails/actionpack/lib/action_controller/params_parser.rb:15:in
`call'
/var/www/rails/sybase/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:99:in
`call'
/var/www/rails/sybase/vendor/rails/actionpack/lib/action_controller/failsafe.rb:26:in
`call'
/var/lib/gems/1.8/gems/rack-1.1.0/lib/rack/lock.rb:11:in `call'
/var/lib/gems/1.8/gems/rack-1.1.0/lib/rack/lock.rb:11:in `synchronize'
/var/lib/gems/1.8/gems/rack-1.1.0/lib/rack/lock.rb:11:in `call'
/var/www/rails/sybase/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:114:in
`call'
/var/www/rails/sybase/vendor/rails/actionpack/lib/action_controller/reloader.rb:34:in
`run'
/var/www/rails/sybase/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:108:in
`call'
/var/www/rails/sybase/vendor/rails/railties/lib/rails/rack/static.rb:31:in
`call'
/var/lib/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:47:in `call'
/var/lib/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in `each'
/var/lib/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in `call'
/var/www/rails/sybase/vendor/rails/railties/lib/rails/rack/log_tailer.rb:17:in
`call'
/var/lib/gems/1.8/gems/rack-1.1.0/lib/rack/content_length.rb:13:in
`call'
/var/lib/gems/1.8/gems/rack-1.1.0/lib/rack/chunked.rb:15:in `call'
/var/lib/gems/1.8/gems/rack-1.1.0/lib/rack/handler/mongrel.rb:67:in
`process'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in
`process_client'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in
`process_client'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
/var/lib/gems/1.8/gems/rack-1.1.0/lib/rack/handler/mongrel.rb:38:in
`run'
/var/www/rails/sybase/vendor/rails/railties/lib/commands/server.rb:111
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
./script/server:3
Any thoughts? Did you have to source the Env vars somehow, or did you
just install everything? Did you have to edit any other files? Or
maybe this has to do with the difference of versions?
I am running Apache2 with this just fine (but I had to source the env
vars in the apache init.d script)
Thanks!!!
Michael
Thanks to your playing around, it got me thinking, and I finally figured
out a workaround.
I'm actually not running ./script/server directly, but rather through a
vim script in order to use a debugger. Somehow the vim script wasn't
pulling the variables, soooo..... I put them directly into the vim
script (since I couldn't figure out how to source the .sh file).
Now I have it working satisfactorily.
Thanks, once again, for your help Mr Eric. :)
Michael