Check out the devise_security_extension, it's a devise extension that adds the functionality I think you are looking for.
Once you install it, you can then do
devise :password_expirable
and in your config/initializers/devise.rb
, you can add in (or uncommented depending how you installed it) the time frame you want to expire the password
config.expire_password_after = 3.months
Hope this helps!