1

I was trying to run my tests through CodeShip and somehow it doesn't allow me to setup my test environment.

My config scripts are:

rvm use 2.4 --install
bundle install
rake db:create RACK_ENV=test
rake db:migrate RACK_ENV=test
rake db:seed RACK_ENV=test

My test script is simply rake test

My Rakefile looks like this:

require 'sinatra/base'
require 'sinatra/activerecord'
require 'sinatra/flash'
require 'sinatra/cookies'
require 'require_all'
require 'sinatra/activerecord/rake'
require 'rake/testtask'

Rake::TestTask.new { |t| t.pattern = 'spec/*/*_spec.rb' }

And somehow CodeShip keeps complaining that it cannot load 'sinatra/base' from my Rakefile even though it has been installed onto the VM. rake test also runs fine on my local machine so I have no idea what went wrong there.

Can anyone suggests what happened? Thanks.

yzhan
  • 170
  • 1
  • 3
  • 13
  • Marko, from the Codeship team here. Did you already reach out to our helpdesk at https://helpdesk.codeship.com? We'd like to help you solve this, but from the top of my head the only idea I have right now is that you might need to `require rubygems` as well? – mlocher Feb 20 '18 at 13:33
  • @mlocher Thanks for reaching out! I haven't contacted the helpdesk yet. I am using a newer ruby version so I believe `require rubygems` is not required for the setup? – yzhan Feb 21 '18 at 14:08
  • Yeah, it shouldn't, but it was the only thing that came to my mind. Could I ask you to reach out via https://helpdesk.codeship.com and include a link to your project (or a specific build), we'd be happy to help you get to the bottom of this. – mlocher Feb 21 '18 at 14:16

0 Answers0