Rice may attract pests, but that does not make it an effective treatment.
Uncooked rice alone does not reliably kill rats, and claims that plaster hardens inside them or baking soda provides a “gentler” death lack reliable evidence as household control methods. Leaving rice mixtures around can instead provide food and prolong an infestation.
Boric acid can control cockroaches when used correctly, but it is not harmless: use only products labeled for pest control, exactly as directed, and prevent access by children and pets.
A safer approach begins by removing what pests need: accessible food, water, and shelter.
Store rice and other staples in sealed containers, clean crumbs, repair leaks, and close entry gaps.
Use enclosed cockroach bait stations and appropriately placed rodent traps according to instructions.
Herbs, cucumber peels, and essential oils are not dependable solutions for established infestations.
If activity continues, a licensed pest professional can help you regain control.