You can try setting a "Default Code Language" on the Generation Settings page here:

...making sure to replace YOUR_BOOK with your book's unique web address.

That usually works when our book generators can't "guess" properly.

On each code block, you can also set a language, like this:

puts "hello"
Did this answer your question?