Github Examples are no more reproducible

This is just my attempt on running example 1 from RStan Getting Started · stan-dev/rstan Wiki · GitHub.

I save the code into Stan_School.stan
and when I run it with the next 2 line:

schools_dat ← list(J = 8,
y = c(28, 8, -3, 7, -1, 1, 18, 12),
sigma = c(15, 10, 16, 11, 9, 11, 10, 18))
fit ← stan(file = ‘schools.stan’, data = schools_dat)

it gets this error (Only a beginner on Stan so i dont know any workaround)

error in 'model1d6c3f524eb3_Stan_School' at line 3, column 2
     1: data {
     2:   int<lower=0> J;         // number of schools 
     3:   array[J] real y;              // estimated treatment effects
     4:   array[J] real<lower=0> sigma; // standard error of effect estimates 

PARSER EXPECTED: <one of the following:
  a variable declaration, beginning with type,
      (int, real, vector, row_vector, matrix, unit_vector,
       simplex, ordered, positive_ordered,
       corr_matrix, cov_matrix,
       cholesky_corr, cholesky_cov
  or '}' to close variable declarations>

What RStan version do you have?

@ahartikainen I am using version 2.21.2, just checked it from packageVersion(“rstan”)

I recommend you to update to latest released version (described here RStan Getting Started · stan-dev/rstan Wiki · GitHub ) so that it has support for the new array syntax.

Also using latest CmdStan through CmdStanR has support for array syntax.

@ahartikainen I had an issue of reinstalling rstan, When I installed the latest released version of rstan and StanHeaders (with its dependency), My RStudio suddenly failed to start, it cannot open unless i removed the rstan and StanHeaders packages then it back to normal, I am using Windows 7 Platform, I am wondering if the latest version are not supported with my OS?

Forgot to mention also I am using R 4.2.3 when doing so