Quran 9:38-39″O ye who believe! what is the matter with you, that, when ye are asked to go forth in the cause of Allah, ye cling heavily to the earth? Do ye prefer the life of this world to the Hereafter? But little is the comfort of this life, as compared with the Hereafter. Unless ye go forth, He will punish you with a grievous penalty, and put others in your place.” This is a warning to those who refuse to fight, that they will be punished with Hell.
Quran 9:41 – “Go forth, light-armed and heavy-armed, and strive with your wealth and your lives in the way of Allah! That is best for you if ye but knew.” See also the verse that follows 9:42 – “If there had been immediate gain (in sight), and the journey easy, they would (all) without doubt have followed thee, but the distance was long, (and weighed) on them”
Chapter 9, verse 38 to 42 was revealed to Prophet Muhammed (p) in order to engage the Byzantine (Roman) Empire who had mobilised troops in order to exterminate Muslims. When we look at these verses in its historical context, the verses do not encourage Muslims to commit violence against the innocent. You can read the following article which shows from early Muslim sources that it was the Byzantine (Roman) Empire who had started this war.
Sayyid Abul Ala Maududi – Tafhim al-Qur’an – The Meaning of the Qur’an
38 From here begins the discourse (vv. 38-72) which was sent down at the time when the Holy Prophet was engaged in making preparations for the Campaign to Tabuk. 
The Holy Quran Arabic Text with English Translation, Commentary and comprehensive Introduction – Maulana Muhammad
38a. The reference here is to the expedition of Tabuk, which was undertaken in the meddle of the ninth year if the Hijrah owing to the threatening attitude of the Roman Emperor. There were many hindrances to the raising of an army sufficient to meet the strong forces of the Roman Empire.
The chief of these, as enumerated by Rz, are:
(1) a great drought;
(2) the length of the journey to the confines of Syria;
(3) the ripening of the fruits; which were now ready to be gathered;
(4) the intensity of the heat; and (5) the organization and power of the Roman army. In spite of all these difficulties 30.000 men gathered round the Prophet’s banner.
39a. The reference here and in what follows is to certain men, who, while professing belief, hesitated to accept the Prophet’s call to get ready for the expedition. 
59 I.e., ‘you are sluggish n your response, clinging to the life of this world’. His verse – as well as most of this surah from here onward – alludes to the campaign of Tabuk, in the year 9 H. The immediate reason for this expedition was the information which the Prophet received to the effect that the Byzantines, made apprehensive by the rapid growth of Islam in Arabia and incited by the Prophet’s enemy Abu ‘Amir, were assembling large forces on the confines of the Peninsula with a view to marching against Medina and overthrowing the Muslims.
To guard against such assault, the Prophet assembled the strongest force the Muslims were capable of, and set out in the month of Rajab, 9 H., towards the frontier.
On reaching Tabuk, about half-way between Medina and Damascus, the Prophet ascertained that the Byzantines were either not ready to invade Arabia or had entirely given up the idea for the time being; and so – in accordance with the Islamic principle that war may be waged only in self-defence – he returned with his followers to Medina without engaging in hostilities.
At the time of preparation for this expedition, the hypocrites and a minority among the believers displayed an extreme reluctance to embark on a war with Byzantium: and it is this minority that the above verse reproaches for ‘clinging heavily to the earth’ (Manor x, 493). 
 Sayyid Abul Ala Maududi – Tafhim al-Qur’an – The Meaning of the Qur’an – http://www.englishtafsir.com/Quran/9/index.html#sdfootnote39sym
 The Holy Quran Arabic Text with English Translation, Commentary and comprehensive Introduction[Year 2002 Edition] by Maulana Muhammad page 408
 The Message of The Quran translated and explained by Muhammad Asad