Connecting to Ruby on Rails backend