Search code examples
ruby-on-railsrubyrubygemsstocktwits

how to use stocktwits library?


I am building a stocktwits app in Ruby. I want to retrieve data through Stocktwits.com API. I found this library on github: https://github.com/jesseyoungmann/omniauth-stocktwits. But i am a newbie to Ruby and Rails. I am confused on how to use it. Could i use it without adding it to a Rails project? I mean i do not need to create a Rails project in order to use it. If i need to add it to Rails project, how should i add it?

Thanks in advance.


Solution

  • You do need to have a Rails app in order to use it. You can add it to your project by adding

     gem 'omniauth-stocktwits'
    

    to the Gemfile in the root of your project, and running bundle install.

    Then follow the instructions in the README, which involves creating a file in the initialisers directory of your Rails app.