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

https://leanpub.com/YOUR_BOOK/settings/generation_settings

...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:

```ruby
puts "hello"
```
Did this answer your question?