The riots occurred less than two months after a similar flareup involving travellers, also known by the term gypsies, and Prime Minister Manuel Valls demanded a firm response.
The local traveller community in the Alpine town of Moirans had requested temporary leave for two jailed members so that they could attend the funeral of someone who had died in an accident last weekend while riding in a stolen car.
The mother of one of the prisoners said that the leave of absence would only take an hour.
But a judge turned down the request, the local town hall and prosecutor's office said. An application to have the prisoners released while flanked by two police officers was also rejected late on Wednesday morning.
Members of the community were outraged by the refusal, blocking off a road on Tuesday evening, setting fire to several cars, and ransacking the restaurant at the town's train station, the town hall.
(Burned-out trains pushed on to the train tracks at Moirans station. Photos: AFP)
The authorities brought in 120 police and 100 firefighters to Moirans, who brought the situation under control in the early evening without casualties, officials said.
A riot also erupted in a prison at Aiton, about 100 kilometres (60 miles) away, where one of the prisoners is being held.
Around 20 inmates set fire to a passageway and destroyed the locks on their cells, according to a trade union official, who said a unit specialising in returning order to prisons had been called in.
Prime Minister Manuel Valls took to Twitter to condemn "unacceptable violence" and demand "firmness... (and) restoration of order."
The violence comes less than two months after another traveller community in northern France blocked a motorway (see photo below) after authorities refused to temporarily release the son of a shooting victim to attend his father's funeral, with the opposition criticising the government's response as weak.
The term traveller community in France is used for groups of people with a nomadic or semi-sedentary lifestyle, including Roma or so-called New Age travellers.