If possible, remove the deck completely from the hull this would give you room to work. If this is not possible, just do your best with the next...
I just replaced the rubrail rubber strip on a Club 420 sailboat and used 3M 5200 sealant/adhesive....