How to prevent the "Symbol's function definition is void: error" when running emacs in the console?

Solution 1:

FWIW. The emacs manual discourage the use of window-system as a predicate.

Do not use window-system and initial-window-system as predicates or boolean flag variables, if you want to write code that works differently on text terminals and graphic displays. That is because window-system is not a good indicator of Emacs capabilities on a given display type. Instead, use display-graphic-p or any of the other display-*-p predicates described in Display Feature Testing.

http://www.gnu.org/software/emacs/manual/html_node/elisp/Window-Systems.html

I use this to turn off the scrollbar and toolbar when in a graphical display.

(if (display-graphic-p)
    (progn
      (tool-bar-mode -1)
      (scroll-bar-mode -1)))

Solution 2:

While I think @neatonk's answer is best and covers all the bases, to specifically disable the scroll bar you can put the following in your ~/.emacs

(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))