These types of questions are a bit tricky to answer but if you ask me which is better to learn than learning never harms, learn both. But if want an answer for which is better to develop, I would say ruby will be faster to develop but faster to run will be java. If you already know Java, Selenium with java will be easy for you. Also finding a java online help is much easier compared to ruby. A project with less complexity you can use ruby selenium else use java. Here is the link of a Selenium Training Course which you can take to learn Selenium. You can also refer to the following Java Online Training Course to learn Java if you do not know it. This youtube video will help you master Selenium.