How can I get mongo mapper to create config / mongo.yml file in Rails 4

I am trying to create a rail application using Mongo Mapper Stone. I follow the instructions in the Mongo Mapper documentation.

Here is the link: Mongo Mapper Docs

First, I created a new 4 rails application excluding activerecord.

rails new my_app --skip-active-record 

In the next step, I added gem 'mongo_mapper' and gem 'bson_ext', and then bundled.

The next step is to create 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'm not sure if I am missing something that has changed from Rails 3 to 4.

How can I get mongo mapper to create config / mongo.yml file?

+6
source share
1 answer

I had to change my Gemfile to use the Mongo Mongo Mapper beta to add support for Rails 4. Here's the updated Gemfile.

 gem 'mongo_mapper', :git => "git://github.com/mongomapper/mongomapper.git", :tag => "v0.13.0.beta2" 
+10
source

Source: https://habr.com/ru/post/954094/


All Articles