We investigate the influence of salt concentration, charge on viral proteins and the length of single-stranded RNA (ssRNA) molecule on the spontaneous assembly of viruses. Only the nonspecific interactions are assumed to guide the assembly, i.e., we exclude any chemical specificity that may lock the viral proteins and ssRNA in preferred configurations. We demonstrate that the electrostatic interactions screened by the salt in the solution impose strong limits on viral composition that can be achieved by spontaneous assembly. In particular, we show that viruses whose ssRNA carries more than twice the amount of charge that is located on the viral proteins, cannot be assembled spontaneously. We find that the spatial distribution of protein charge is important for the energetics of the assembly. We also show that the pressures that act on the viruses as a result of attractive protein-ssRNA electrostatic interactions are at least an order of magnitude smaller than is the case with bacteriophage viruses that contain double-stranded DNA molecule.