Let me be a little more specific, though, because it's trickier than I let on. I prefer working on XP style teams, so I'll use XP style vocabulary here, but in my experience what I'm about to say is pretty universal, so feel free to extrapolate.
One of the most important things for running a successful project is understanding the attention span of your stake holders (which includes customers, managers, etc). You must deliver "user visible functionality" (i.e. things that your stake holders value) at a regular rate. There is a threshold after which if you fail to deliver something valued by the "customer" the project's chance of failure increases. If you regularly cross that threshold, the chances of success can be almost zero.
The actual threshold depends on many factors, but my rule of thumb is 2 weeks. If you don't deliver something of value to the stake holders in 2 weeks, they will get uncomfortable and start thinking about other options. If it happens regularly, then they will constantly be thinking about other options and eventually will chose one of them.
(The corollary of my rule of thumb is that the biggest danger to a project is senior management since they are the ones with the power and responsibility to cancel projects that they think are not going to be successful).
The more you deliver in that window, the happier stake holders will be, but... if you get into a situation where something you deliver turns out not to be complete/satisfactory/whatever it works against you. So if your stake holder ever utters the words, "But I thought we already did that", then it's like missing 2 windows (well, in my experience, more like 1.5, but I'm splitting hairs).
You might be wondering what this has to do with the topic. :-) The problem is that you can't just wander away and study stuff, even if it is going to have a good effect on the project. Similarly, wandering away for a month to gather requirements, or write design, or refactor crappy code, or write a decent build system, or pay back technical debt, or... anyway, it all moves you toward cancellation. This is the real reason waterfall doesn't work IMHO -- stake holders don't have the attention span to deal with the time it takes for things to shake out and so the projects get cancelled.
What this means is that every thing you do must be linked to customer-visible value. Furthermore, it limits the amount of time you can spend on every part. You can't wander away for 2 weeks to learn Rails. But you can easily wander away for 1 or 2 days to learn an aspect of Rails that will help you with the story/task that you are currently working on -- so long as that doesn't push you over the threshold.
If you start delivering stories with customer-visible value every 2 days, for instance, nobody will care if you are spending half of that time doing tutorials, katas, memorising stuff -- whatever you think is productive. You actions are invisible to the customer and they just don't care.
With that in mind, where I always find problems when I see people complaining about this issue is in the work backlog. Usually the stories are organised by technical rather than customer issues. So you'll have a bunch of stories that provide absolutely nothing to the customer and then you will have a story that links it all up gives them a lot -- usually a month or two down the road.
The root cause of this is usually because programmers/PMs try to be efficient and not duplicate work. Instead, identify all of the customer-visible value and try to create a story for each one. Make vertical stripes of functionality that you can deliver at a more measured pace. This will require you to do refactoring between each story because your infrastructure will always be incomplete. However, it allows you to deliver value more regularly and causes the "big red eye of management" to focus its attention elsewhere.
I've already written more than you are likely to read, so I'll stop here. Just let me encourage you a bit more in saying that you have the ability to change things. It's not easy and it takes time, but you can do it if you work patiently toward your goal. Don't get discouraged!