Cannot run rake task in production, could not find stringio-3.0.9

43 Views Asked by At

I've got a sinatra app which I deploy using capistrano, there is a rake task which works on development but not on production. I get the following error when manually running rake in production;

$ bundle exec rake -T
Could not find stringio-3.0.9 in locally installed gems
Run `bundle install` to install missing gems.

If I move the .bundle/config to .bundle/config.bak then the 'rake -T' command works.

This is what is in my .bundle/config file

---
BUNDLE_DEPLOYMENT: "true"
BUNDLE_PATH: "/var/www/report_craft/shared/bundle"
BUNDLE_WITHOUT: "development:test"
BUNDLE_JOBS: "4"

Here is my Gemfile

source 'https://rubygems.org'

# Sinatra framework
gem 'puma'
gem 'sinatra'
gem 'sinatra-contrib' # for 'sinatra/reloader'

# General
gem 'sqlite3'                   # Database
gem 'rake'                      # Rake tasks
gem 'dotenv'                    
gem 'debug'
gem 'intuit-oauth'              
gem 'qbo_api'                   
gem 'rest-client'
gem 'activesupport'
gem 'whenever'                  # Easy Cronjob

gem 'guard-livereload', require: false
gem 'rack-livereload'
gem 'guard'

# Testing
gem 'stringio'
gem 'rack-test'                 # Run tests through rake
gem 'test-unit'                 # Test::Unit
gem 'mocha'                     # Mocking gem
gem 'webmock'                   # Stub http requests
gem 'capybara'
gem 'selenium-webdriver'
gem 'rexml', '~> 3.2', '>= 3.2.4'
gem 'rb-inotify'
gem 'webdrivers'
gem 'vcr'

# Deploy
gem 'passenger'
gem 'capistrano'
gem 'capistrano-bundler'
gem 'capistrano-passenger'
gem 'capistrano-rbenv'
gem 'capistrano-npm'
0

There are 0 best solutions below