Ratings are stored separately from the media files. To transfer the ratings you need to use the old library file too.
Apple's 6 page, exhaustively meticulous step-by-step instructions: How to move your iTunes library to a new computer - https://support.apple.com/HT204318 Use this if you suspect any of your media are not in the standard location (iTunes Media folder).
My one-sentence summary if you always use iTunes' default preferences settings: Copy the entire iTunes folder (and in doing so all its sub-folders and files) intact to the other drive, hold down the option/alt key (shift on Windows) while starting iTunes, and when requested to select a library select the iTunes Library.itl file in the copied folder (Open a different iTunes Library file or create a new one - https://support.apple.com/HT201596).
When this is to a new drive/computer put the copied iTunes folder in the default location of Macintosh HD > Users > *User Name* > Music (or Home > Music) then you don't even need to start with the option key held down, iTunes will automatically look for it there. (Make sure there isn't anything already in the iTunes folder there that you want to keep since you will be replacing it with the one you are moving.) Remember to authorize the computer in iTunes to your Apple ID if you use this to sync to Apple mobile devices or play DRM protected media (e.g., movies).
Certain items used in iTunes related activities are not stored in the iTunes library folder but in special folders. If you are moving a library to a different computer you may wish to copy these too:
- Apple Music cache files: http://dougscripts.com/itunes/2015/09/new-flush-apple-music-cache-files/ - ~/Library/Caches/com.apple.iTunes/SubscriptionPlayCache/ folder, which is sort of like an “iTunes Media” folder for Apple Music
- iOS device backups, various preferences files: https://discussions.apple.com/thread/3285925