Skip to content

Setting up the development environment

Mario Muñoz edited this page Jun 27, 2014 · 1 revision

Checking out the code

Just navigate into a directory of your convenience and checkout the code from this repository using the command:

git clone https://github.com/mariomgal/eurosentiment-tutorial-ruby.git

Downloading requirements

The project requires sinatra, httpparty and thin to be installed in your Ruby environment. If they aren't installed, just run the command bundle install in the project root folder.

Using an IDE

Some recommended IDEs are:

Running the default example

Just navigate to your project's root folder and execute the command ruby server/server.rb. It will start a server at http://localhost:5000 to which you can send POST requests and examine the results.

Running as daemon

You can daemonize the server just by executing the provided server.sh script inside bin folder (note that probably you should give executions permission to the script with chmod +x server.sh. You can start and stop the server daemon by executing server.sh start and server.sh stop.