Final answer:
The poetic device used in the stanza from 'On Yuba City' by John Rollin Ridge is personification, attributing human-like qualities to the river.
Step-by-step explanation:
The poetic device found in the bolded words from the stanza of "On Yuba City" by John Rollin Ridge is personification. In the phrase 'that like a stranger passes by, and nothing has to give her' the river is being given human-like qualities, as it is described as behaving like a 'stranger' who does not offer anything to the observer, which is characteristic of personification. In contrast to a simile or metaphor which would make a direct comparison or representation, personification attributes human characteristics or actions to non-human entities, such as a river in this case.