I deployed my app on production server and get the following error :
(There was a problem with your config/couchdb.yml file. Check and make sure it's present and the syntax is correct.)
the couchdb.yml file is as follows :
base: &base
database_prefix:
database_suffix: _<%%= RAILS_ENV %>
development:
host: localhost
port: 5984
<<: *base
test:
host: localhost
port: 5984
<<: *base
production:
host: localhost
port: 5984
<<: *base
and in the boot.rb
require 'rubygems'
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEM开发者_JAVA百科FILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
require 'simply_stored/couch'
CouchPotato::Config.database_name = "http://localhost:5984/thedatabase"
The database is already created and works locally; the problem is on production server, all gems are installed; not sure why I'm missing something that I should specify differently for production.. already tried the host as 127.0.0.1 . no luck
The error is thrown on the couchdb_initializer.rb; the code is universal (already generated by gem).
I can run the app using rails server and open using the 3000 port; however I get the first error when using ngingx + passenger trough http://
Does your production couchdb.yml
actually have "all:" in it? If so, try setting it to "production:" it looks like that code doesn't have any special logic in place to figure out that the "all" environment in the couchdb.yml
file should really apply to all environments when it is specifically looking for "production".
The ident on the file was wrong.
production:
host: localhost
port: 5984
<<: *base
精彩评论