0

I'm currently working on a Padrino project which has been working absolutely fine in developement, but after pushing it to my live environment, I'm experiencing problems. Checked the logs and the error I'm getting is:

[31m  ERROR[0m -[33m24/Jul/2012 11:32:53[0mMongo::ConnectionFailure - Operation failed with the following exception: #<Mongo::ConnectionFailure:0xa762528>:

My database.rb file is the standard one generated by Padrino, namely:

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

Everything works perfectly in the console, so I'm assuming that the problem is to do with Passenger. Any ideas where I might be going wrong?

Pezholio
  • 2,439
  • 5
  • 27
  • 41

1 Answers1

0

OK, so ignore me. I forgot to set RACK_ENV when running the rake task that imported my data, as well as when starting the console, so there was no data in my production database.

Pezholio
  • 2,439
  • 5
  • 27
  • 41