I am trying to make a rails app using the Mongo Mapper gem. I am following the instructions in the Mongo Mapper Documentation.
Here is the link: Mongo Mapper Docs
First, I generated a new rails 4 app excluding activerecord.
rails new my_app --skip-active-record
In the next step I added the gem 'mongo_mapper' and gem 'bson_ext' and then bundled.
The next step is generating the config/mongo.yml file.
When I try to run the command:
script/rails generate mongo_mapper:config
I get this error:
Could not find generator mongo_mapper:config.
There is currently no information on installing Mongo Mapper with Rails 4 and I am not sure if I am missing something that changed from Rails 3 to 4.
How can I get mongo mapper to generate the config/mongo.yml file?
I had to change my Gemfile to use a beta version of the Mongo Mapper gem to add support for Rails 4. Here is the updated Gemfile.
gem 'mongo_mapper', :git => "git://github.com/mongomapper/mongomapper.git", :tag => "v0.13.0.beta2"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With