A project to play with Sinatra and the Twitter API.
This is a Ruby project.
You will need to tell your favourite Ruby version manager to set your local Ruby version to the one specified in the .ruby-version
file.
For example, if you are using rbenv:
- Install the right Ruby version:
$ rbenv install < VERSION >
$ rbenv rehash
- Move to the root directory of this project and type:
$ rbenv local < VERSION >
$ ruby -v
You will also need to install the bundler
gem, which will allow you to install the rest of the dependencies listed in the Gemfile
file of this project.
$ gem install bundler
$ rbenv rehash
bin
: Executableslib
: Sourcesspec
: Tests
$ bundle install
Go to https://developer.twitter.com/en/apps, create an app and take note of your credentials. Make sure the permissions are set to "Read and write". Then copy .env_example
to .env
and replace with your app's credentials.
$ bundle exec rake
Make sure that the bin/app
file has execution permissions:
$ chmod +x bin/app
Then just type:
$ bin/app
Open your browser and go to http://localhost:4567/
Update the config.ru
file, then type
$ rackup
Open your browser and go to http://localhost:9292/