Sometimes people use "compete" in a casual way that overlooks key economic connections. Competition is a force that is always present, even if it is not currently the "most obvious" factor in play at a given time.
I think any definition of competition must be relative to the sphere of economic activity. So, when it comes to transportation in general, rail and trucks do compete -- by this I mean they offer services with varying prices and characteristics.
Just because rail and trucking have different sweet spots at a particular point in time does not mean that they don't compete. Both (a) think about how and why customers choose them over the other, (b) seek opportunities (for investment or growth) that lead to a competitive edge, and (c) therefore, influence each other.