My first deployment with MongoHQ and Sinatra (Ruby 1.9.1) gets
"Internal Server Error". I used the suggested connection code like
this:
include Mongo
def initialize
if settings.environment == :development
@db = Connection.new.db('inp-dev')
else
uri = URI.parse(ENV['MONGOHQ_URL'])
conn = Connection.from_uri(ENV['MONGOHQ_URL'])
@db = conn.db(uri.path.gsub(/^\//, ''))
end
end
I am new to both MongoHQ and Sinatra so I'm not sure what to do. Can
you tell me if I am using settings correctly to see if I'm running on
Heroku? Or am I missing something in the Mongo connection code?
Thanks.
-Ginny
--
You received this message because you are subscribed to the Google Groups
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en.