文章列表
Uninstall all ruby gems
- 博客分类:
- rails
Some time you may need to uninstall all the installed Ruby gems. Uninstalling individual gems is tedious job. Here you will find how to uninstall all the installed Ruby gems using single command.
First, we need a list of installed gems. Its easier to get list of installed gems by using the command:
...
首先是不为空validates :name,presence:{message:'blank is not allowed'}
唯一性:validates :name,uniqueness:{message:'already exist!',case_sensitive: false}#case_sensitive区分大小写
长度:validates :name,length:{in: 6..20,message:'must in 6-20 byte'}
格式:validates :name,format:{with: /[a-z]/,message:'must contain at ...