NoMethodError: undefined method database_server=' for #<#<Class:0xb73db280>:0xb73db0c8> from ./couch.rb:5 from (irb):1:in require’
from (irb):1
from /usr/lib/ruby/1.8/rubygems.rb:123
I checked with CouchPotato::Config.methods and database_server is really
not there
I am using CouchDB version 0.5.4
I’d appreciate it if anyone could tell me how to correctly connect to
the server.
NoMethodError: undefined method database_server=' for #<#<Class:0xb73db280>:0xb73db0c8> from ./couch.rb:5 from (irb):1:inrequire’
from (irb):1
from /usr/lib/ruby/1.8/rubygems.rb:123
One trap which might catch you out - if the library itself has a file
called “couch.rb” then calling your own program “couch.rb” will prevent
‘require’ from loading it.
To eliminate that as a possible problem, just rename your couch.rb to
something else.
I checked with CouchPotato::Config.methods and database_server is really
not there
Oh well, then calling it isn’t going to work You’ll need to dig
through the docs or find some sample apps which use CouchPotato.
Incidentally, I made a completely separate CouchDB API called
“couchtiny”, although I’m not using or developing it at the moment. It’s
on github, and you’re more than welcome to try it out. It has some usage
examples in the README and in the doc/ subdir.
Thank you both for your answeres. Specifying the database URL to
database_name seem to work.
Candierb, I will look at your couchtiny and try to use it instead of
Couch Potato. Quite frankly, I’m just looking for a simple way to save
and load ruby objects with CouchDB, so whatever works…
Best,
Oren
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.