I am not sure exactly what Rubcop is, but…
ruby -v on your terminal will indicate which Ruby version you are currently running in your machine. To see which ruby version you are using in your application, check the 1st lines of your Gemfile. For example:
source 'https://rubygems.org' ruby '2.2.1'
Now, the error you are getting is:
warning: 2.2.3-compliant syntax, but you are running 2.2.1
So it seems you are running 2.2.1, but you need to be using Ruby 2.2.3.
To do this, try the following:
Use RVM (Ruby Version Manager) already installed in your machine to install Ruby version 2.2.3 (if not already installed).
Check if it’s already installed:
rvm list. This will give you a list of currently installed Ruby versions using RVM.
If version 2.2.3 is already installed, use this command to switch to this version:
rvm use 2.2.3
If version 2.2.23 is not already installed, install it by running the following:
rvm install 2.2.3. This might take some time to finish, after it is done switch to the new version using the command on step #3.
When you have switched to the new version, change the ruby version specification on your Gemfile and try everything again.
Let us know if you keep having problems.