how to setup rspec run on jenkins build

I was trying to setup jenkins for my rails app. So basically I wanted the build to run rspec and pass/fail when

  1. Click on build manually
  2. Trigger the build and run rspec as soon as a commit is made to master.

I have my jenkins running on port 8080.

In Jenkins I have the following configuration:

github project url: https://github.com/myuser/sample_app_rails_4/
git repository ur: https://github.com/myuser/sample_app_rails_4.git

In my github settings I have setup the jenkins webhook as follows:

Jenkins Hook url: pathtolocalhost:8080/github-webhook

In my rails app, i have the ci-reporter gem setup and this is what my rakefile looks like:

require File.expand_path('../config/application', __FILE__)
require 'ci/reporter/rake/rspec'
task :rspec => 'ci:setup:rspec'


SampleApp::Application.load_tasks

Now, when I try to build manually through jenkins localhost the build fails with:

[sample_app] $ /usr/bin/rake
rake aborted!
Bundler::GemNotFound: Could not find activesupport-4.0.8 in any of the sources
Build step 'Invoke Rake' marked build as failure

Also the build is not triggered automatically when i push a commit to master.

Can someone provide me any instructions as to what I might be doing wrong to get rspec running on build manually as well as automatically on commit?

Git Baby is a git and github fan, let's start git clone.