Yes, you should be able to cast a ritual spell while traveling, depending on how your DM (and indeed your table) chooses to flesh out the details for how ritual casting works in the campaign.1
The constraints of ritual casting(p. 201-202 PHB):
- increased casting time
- having the "ritual" tag in the spell description
- the caster class can cast spells as rituals (bard, clerics, druids, warlocks, wizards)
The ritual version of a spell takes 10 minutes longer to cast than
normal. It also doesn’t expend a spell slot, which means the ritual
version of a spell can’t be cast at a higher level.
What are the constraints of the longer casting time? (PHB. 203)
Certain spells (including spells cast as rituals) require more time to
cast: minutes or even hours. When you cast a spell with a casting time
longer than a single action or reaction, you must spend your action
each turn casting the spell, and you must maintain your concentration
while you do so (see “Concentration” below). If your concentration is
broken, the spell fails, but you don’t expend a spell slot.
The key to the answer "yes, you can" is the game feature Concentration. (p. 203-204 PHB).
Normal activity, such as moving and attacking, doesn’t interfere with
What breaks concentration?
• Casting another spell that requires concentration.
• Taking damage.
• Being incapacitated or killed.
Your DM may rule that certain aspects of travel do interfere, but that will be situational.
The DM might also decide that certain environmental phenomena, such as
a wave crashing over you while you’re on a storm-tossed ship, require
you to succeed on a DC 10 Constitution saving throw to maintain
concentration on a spell. (Basic Rules, p. 10)
Bottom Line: movement will not disrupt concentration. You should be able to cast a ritual spell while traveling.
1 The DM / your table may modify the basic guidelines on this.
... as most of us had that (mis)conception of rituals being cast while tracing cabalistic signs on the ground, pouring dusts or other components over it and such...
That isn't necessarily a misconception. It can be great fun to role play it that way. The rules as written don't specify such details for spells cast as a ritual. There is one ritual that stands out, and it isn't really a spell: how to make holy water. (PHB p. 151)
A cleric or paladin2 may create holy water by performing a special ritual. The ritual takes 1 hour to perform, uses 25 gp worth of powdered silver, and requires the caster to expend a 1st-level spell slot.
"Make Holy Water" isn't a spell on a spell list3, but going through that process amounts to almost the same thing in order to make a flask of holy water. Since the book does not provide the specifics of "the ritual" the table is free to flesh that out.
With that ritual requirement for making holy water in mind, your DM/table could establish which spells at your table have additional requirements in order to be cast as a ritual.
Do what's fun. Some spells might be a good fit for such a requirement.
2 The holy water production process might suggest that a Paladin can cast a spell as a ritual ... except that Paladin has no "ritual casting" feature in the class spell casting description, so this ritual becomes a case of "specific over general." The warlock likewise can only get ritual casting via specific invocations, tome, or chain patron based powers, or the "special ritual" for making a magic blade into the blade pact weapon.
3 There is now a spell, Ceremony, that can create holy water. It is listed in Xanathar's Guide to Everything. If you don't use that supplement, then it is likely not available.