Is this even practical? I've heard bad reports about the trains in Croatia. I've heard the buses are pretty good, but don't even know where to start researching them. We would prefer to rent a car, but we aren't planning to go back to Croatia to return it and we know there are high drop-off fees.
To get to Ljubljana from Dubrovnik, you will need to get up to Pula. There is no train in Dubrovnik, so hop on a bus. From Pula, it should be no problem to get another bus from Ljubljana. Bus is the easiest and cheapest option. Hope this helps! I just returned from Ljulbjana and going to be writing about it in the coming weeks on my blog if you want to check it out: www.dtravelsround.com
Mentioned in this answer:
Hi there. Dubrovnik and Ljubljana are pretty far away and not connected directly. Buses are the only way and there is no need to book much earlier. You will get a ticket when you are in Dubrovnik. You can travel by bus directly from Dubrovnik to Zagreb and then take a bus or train from Zagreb to Ljubljana. You can also make a stop in Split (I recommend) so you travel from Dubrovnik to Split and then from Split to Zagreb by bus. Don't worry. It's well organized and buses are comfy.
I'd recommend taking buses. We rented a car and regretted it. The buses are affordable, clean, and used by everyone. You'll love Ljubljana! I'd recommend renting a bike from one of the many vendors downtown and tooling around the city for an afternoon. It's lovely (and flat).