我目前正在开发一个 Padrino 项目,该项目在开发中运行得非常好,但是在将它推送到我的生活环境之后,我遇到了问题。检查日志,我得到的错误是:
[31m ERROR[0m -[33m24/Jul/2012 11:32:53[0mMongo::ConnectionFailure - Operation failed with the following exception: #<Mongo::ConnectionFailure:0xa762528>:
我的database.rb
文件是Padrino生成的标准文件,即:
MongoMapper.connection = Mongo::Connection.new('localhost', nil, :logger => logger)
case Padrino.env
when :development then MongoMapper.database = 'licensing_development'
when :production then MongoMapper.database = 'licensing_production'
when :test then MongoMapper.database = 'licensing_test'
end
一切都在控制台中完美运行,所以我假设问题与Passenger有关。有什么想法我可能会出错吗?