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
After all it came out that this gem has some issues with heroku, on the local machine it works perfectly fine.