This answer is only related to the title of the question, but this question ranks top if I google "ggplot2 boxplot only lines" and there was no other helpful search result on that search term, so I feel it fits here well:
Boxplots only work if you specify the quantity as y aestetic.
EDIT: Since ggplot 3.3.0, there is the orientation= parameter that allows
to change the orientation. See the ggplot NEWS on this
Compare
 ggplot(mtcars, aes(x = factor(cyl), y = disp)) + geom_boxplot()

which gives correct boxplots with
 ggplot(mtcars, aes(y = factor(cyl), x = disp)) + geom_boxplot()

which gives only lines instead of box plots.
To obtain horizontal box plots, use coord_flip():
 ggplot(mtcars, aes(x = factor(cyl), y = disp)) + 
   geom_boxplot() + coord_flip()
