views:

62

answers:

1

I installed mongo mapper gem and have the version 0.8.2. I opened the environment.rb file and editing it to use MongoMapper as shown below:

# Be sure to restart your server when you modify this file

# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.8' unless defined? RAILS_GEM_VERSION

# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')

Rails::Initializer.run do |config|

  config.gem 'mongomapper', :version => '>= 0.2.1'
  config.frameworks -= [:active_record]


  config.time_zone = 'UTC'

end

MongoMapper.database = "blog-#{Rails.env}"

When I start the server using ruby script/server I get the following exception:

Mohammad-Azams-MacBook-Pro:blog azamsharp$ ruby script/server
=> Booting Mongrel
=> Rails 2.3.8 application starting on http://0.0.0.0:3000
Missing these required gems:
  mongomapper  >= 0.2.1

You're running:
  ruby 1.8.7.174 at /usr/local/bin/ruby
  rubygems 1.3.7 at /Users/azamsharp/.gem/ruby/1.8, /usr/local/lib/ruby/gems/1.8
+1  A: 

I think you might be missing the underscore in the gem name?

Try:

# config/environment.rb
config.gem "mongo_mapper"
theTRON