I got almost the same questions on this stackoverflow postGithub link but both doesn't seem to help in my case . I explain it why. Everything was working very fine on my local machine and heroku test instance then suddenly while i pushed my code on heroku test instance that went away with the message
"Application Error"
i checked the logs and found the error
`require': cannot load such file -- simplecov (LoadError)
complete logs are below
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in
require': cannot load such file -- simplecov (LoadError) from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in
block in require' from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:inload_dependency' from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in
require' from /app/vendor/bundle/ruby/2.2.0/gems/codeclimate-test-reporter-1.0.1/lib/code_climate/test_reporter/formatter.rb:7:in `'
while my localhost
is working fine . I looked into logs more and found that heroku is trying to look simplecov
files in rvm ruby 2.2.0
while i have explicitly mentioned 2.2.4
in my gemfile . That seems to be an error cause .I can not downgrade my whole application to 2.2.0
so i tried many solutions like bundle update
and removing and reinstalling rspec
with simplecov
but all in vain . Any help will be greatly appreciating
Update: below is my gemfile test groups
source 'https://rubygems.org'
ruby "2.3.0"
gem 'therubyracer', :platforms => :ruby
gem 'rails', '4.2.5.1'
gem 'pg'
gem 'devise'
gem 'will_paginate'
gem 'will_paginate-bootstrap'
gem 'stripe'
# Required for functioning assets on Heroku
gem 'rails_12factor', group: :production
gem "has_permalink"
#gem 'delayed_job_active_record'
# Development
group :development, :test do
gem 'mailcatcher'
gem 'dotenv-rails'
gem 'byebug'
gem 'database_cleaner', '~> 1.5.0'
#gem 'webmock', '~> 1.21.0'
end
gem 'tzinfo-data'
gem 'bcrypt', '~> 3.1.10'
gem 'uglifier', '>= 1.3.0'
gem 'bootstrap-sass', '~> 3.3.6'
gem 'sass-rails', '>= 3.2'
gem 'sprockets-rails'
gem 'bootstrap-select-rails'
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
#gem 'sorcery'
gem 'bourbon'
gem 'neat'
gem 'font-awesome-rails'
gem 'wicked'
gem 'spring', group: :development
group :test do
gem 'rspec'
gem 'rspec-rails'
gem 'rspec-instafail', require: false
gem 'guard-rspec', require: false
gem 'vcr'
gem 'capybara'
gem 'launchy'
gem 'selenium-webdriver'
gem 'simplecov', '~> 0.12.0'
end
gem 'mandrill-api'
gem 'carrierwave'
gem 'fog'
gem 'rmagick'
gem 'puma'
gem 'jquery-ui-rails'
gem 'codeclimate-test-reporter'
gem 'momentjs-rails', '>= 2.9.0'
gem 'bootstrap3-datetimepicker-rails', '~> 4.17.42'
gem 'bootstrap-wysihtml5-rails', github: 'nerian/bootstrap-wysihtml5-rails'
gem 'aws-sdk', '< 2.0'
gem 'aws-s3'
gem 'fog-aws'
gem 'shash'
gem 'listen'
I ran the following commands
rm Gemfile.lock
bundle install
heroku run rails c
and above mentioned error appears