I wanted to implement CORS in my rails application, so I googled rack-cors gem for it. And I did everything as was said in README, that is updated Gemfile accordingly and up
Make sure you added or uncommented gem 'rack-cors' in the Gemfile
gem 'rack-cors'