- rails new ruby-on-rails-crud-mongodb-with-scaffold --skip-active-record
- cd ruby-on-rails-crud-mongodb-with-scaffold
- add gem 'mongoid', '~> 7.0.5' and gem 'bson_ext' in Gemfile
- bundle install
- generate MongoDB configuration files
=> rails g mongoid:config - configuration database connection
- add a model use scaffold and Mongoid will automatically add a module include Mongoid::Document in that class
=> rails g scaffold buku penulis:string judul:string kota:string penerbit:string tahun:integer - no need to migrate
- add root :to => 'bukus#index' in routes.rb
- rails s