The players, who have since left the club, were sent the messages from Michael Convery on Twitter after a game against St Johnstone in Perth on January 14, 2012.
Twenty-two year-old Bartley said he found the messages "intimidating" and thought that "society had got over these sorts of comments".
American footballer Edu, 27, described feeling shocked on seeing the messages he had been sent.
They gave evidence at the trial of Michael Convery, 43, from Linthouse, Glasgow, who was convicted at Glasgow Sheriff Court of sending racist remarks on Twitter to the players.
Sheriff Valerie Johnston jailed Convery for six months.
Although none of the messages were read out in full in open court, it was heard that Bartley was sent a direct comment from Convery and mentioned in a second one and Edu was sent two direct comments.
Bartley told the court he checked his Twitter account after a match with Rangers, while travelling home on the team bus and saw tweets from an account in the name of Michael Convery.
He also saw a message had been sent to team mate Edu.
He said: "I was sat next to Maurice on the coach. So we showed each other the comments."
Bartley was asked what he did when he received a particular message.
He said: "I actually re-tweeted the tweet. It allowed the public eye to see the comments, and I reported it to David Martin, who is head of security at Glasgow Rangers."
Procurator fiscal depute Jonathan Kemp asked how he felt on receiving them and the witness said: "I just felt a little bit hurt and disappointed really.
"I thought it's 2012, I just thought society had got over these sorts of comments.
"Obviously I don't know Michael Convery, I didn't understand why he would have so much hate for me."
Bartley said he lived on his own and can't always have security with him, adding: "I was intimidated".
Edu said he was shocked and embarrassed when he saw the first message that was sent to him.
The footballer said he looked on the page associated with Convery and said there was similar "aggressive" tweets.
He told the court that later that day, after receiving another message he was still shocked and said: "I think that time was when I re-tweeted".
The court heard that in his police interview Convery told officers on the date of the offence he was suffering from food poisoning and was drifting in and out of sleep in his house.
He said that his then 16-year-old son Jordan came round and was in the house at the time the tweets were sent as well as his friend Joseph.
In evidence Convery told the court he suspected his teenage son was to blame although claimed he did not see any comments being posted.
Convery accepted the twitter messages came from his Blackberry phone and his Twitter account.
The court heard evidence that there had been searches using the search engine Google, hours after the tweets were sent for "How to delete Twitter".
Convery was branded an "unreliable" witness by sheriff Johnston.