Taking a bike on a sailing boat
I've had a couple of non-folding mountain bikes on a sailboat for 5 years. I opted for smaller frame non-folding bikes for performance, and there is a hatch they barely fit through.

Of course, rust is the major problem. Banging around in the waves and in the process of storing them is a potential problem. Because of this, there are no drink holders, speedometers, or other extra snags on the bikes. Regular chain lube helps a lot. The cables rusted enough to require replacement once. There are a few non-stainless bolts and nuts on the bikes (a Specialized and a Diamondback). They're easy to spot and replace or grease. The stainless steel material holds up well. Unpainted aluminum is corroding, but not to the point of failure.

The good thing is that although the bikes ride, shift, and brake very well, they are really ugly from rust and corrosion, so we don't have to lock them up when we use them -- nobody wants to steal them.