Rstan Error in compileCode(f, code, language = language, verbose = verbose) on Linux

I am trying to run Rstan in R on my Linux machine. The R version is 3.6.0. My installed rstan version is 2.21.2 and installed StanHeaders version is 2.21.0-7. When I try to start sampling using rstan, I get the error:

Error in compileCode(f, code, language = language, verbose = verbose) : 
  In file included from /home/user/R/x86_64-redhat-linux-gnu-library/3.6/StanHeaders/include/src/stan/model/model_header.hpp:8:0,                 from file1eb30427c9c58.cpp:14:/home/user/R/x86_64-redhat-linux-gnu-library/3.6/StanHeaders/include/src/stan/io/reader.hpp:623:54: note:   candidate expects 4 arguments, 3 provided     return stan::math::lub_constrain(scalar(), lb, ub);                                                      ^make: *** [file1eb30427c9c58.o] Error 1
In addition: Warning message:
In eval(ei, envir) : NAs introduced by coercion
Error in sink(type = "output") : invalid connection

I have tried many versions of the Makevars file and currently have:

CXX14=/usr/bin/g++ -std=c++1y
CXX14FLAGS=-O3 

Thank you!