Ruby on Rails - installation mongoid in ruby on rails- ruby on rails tutorial - rails guides - rails tutorial - ruby rails
Installation
Step1:Add Mongoid to our Gemfile:
gem "mongoid", "~> 4.0.0"
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - ruby on rails tutorial - rails guides - ruby rails - rubyonrails - learn ruby on rails - team
Step2:Run bundle install Or just run:
$ gem install mongoid
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - ruby on rails tutorial - rails guides - ruby rails - rubyonrails - learn ruby on rails - team
Step3:After installation, run the generator to create the config file:
$ rails g mongoid:config
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - ruby on rails tutorial - rails guides - ruby rails - rubyonrails - learn ruby on rails - team
- which will create the file (myapp)/config/mongoid.yml.