This is turning out to be the worst day for learning rails. Already failed to connect and configure to sqlite3, mysql databases I turned to mongo mapper and facing the same issues. When I try to start the rails server I get the following:
/usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require': no such file to load -- mongo_mapper (LoadError)
I have already installed mongo_mapper gem but when I do 'which mongo_mapper' it does not return anything.
Here is my mongo_config.rb file placed inside the initializers folder:
require "rubygems"
require "mongo_mapper"
MongoMapper.database = "blog-#{Rails.env}"
UPDATE 1:
I changed to the following:
require "rubygems"
include MongoMapper
MongoMapper.database = "blog-#{Rails.env}"
And now I get the following error:
/Users/azamsharp/Projects/railsprojects/blog/config/initializers/mongo_config.rb:2: uninitialized constant MongoMapper (NameError)