ruby-on-railsgitherokuspring-gem

Unable to push to heroku master because of rails/spring version error


The exact I keep getting when ever I try git push herou master is this:

There was an error parsing your Gemfile, we cannot continue
You cannot specify the same gem twice with different version requirements.
You specified: spring (>= 0) and spring (= 1.1.3)

Here's what my Gemfile looks like though:

source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.8'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer',  platforms: :ruby

# 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'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0',          group: :doc

# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
#gem 'spring',        group: :development

group :development, :test do
  gem 'sqlite3',     '1.3.9'
  gem 'byebug',      '3.4.0'
  gem 'web-console', '2.0.0.beta3'
  gem 'spring',      '1.1.3'
end

group :production do
  gem 'pg',             '0.17.1'
  gem 'rails_12factor', '0.0.2'
end

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

I want to change the version of spring so I can push to heroku, but I don't know where to change at.

I've tried googling, and searching the error for duplicate questions here on Stack Overflow... but no success.

EDIT: Here is my Gemfile.lock:

GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (4.1.8)
      actionpack (= 4.1.8)
      actionview (= 4.1.8)
      mail (~> 2.5, >= 2.5.4)
    actionpack (4.1.8)
      actionview (= 4.1.8)
      activesupport (= 4.1.8)
      rack (~> 1.5.2)
      rack-test (~> 0.6.2)
    actionview (4.1.8)
      activesupport (= 4.1.8)
      builder (~> 3.1)
      erubis (~> 2.7.0)
    activemodel (4.1.8)
      activesupport (= 4.1.8)
      builder (~> 3.1)
    activerecord (4.1.8)
      activemodel (= 4.1.8)
      activesupport (= 4.1.8)
      arel (~> 5.0.0)
    activesupport (4.1.8)
      i18n (~> 0.6, >= 0.6.9)
      json (~> 1.7, >= 1.7.7)
      minitest (~> 5.1)
      thread_safe (~> 0.1)
      tzinfo (~> 1.1)
    arel (5.0.1.20140414130214)
    binding_of_caller (0.7.3.pre1)
      debug_inspector (>= 0.0.1)
    builder (3.2.2)
    byebug (3.4.0)
      columnize (~> 0.8)
      debugger-linecache (~> 1.2)
      slop (~> 3.6)
    coffee-rails (4.0.1)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0, < 5.0)
    coffee-script (2.3.0)
      coffee-script-source
      execjs
    coffee-script-source (1.8.0)
    columnize (0.9.0)
    debug_inspector (0.0.2)
    debugger-linecache (1.2.0)
    erubis (2.7.0)
    execjs (2.2.2)
    hike (1.2.3)
    i18n (0.7.0)
    jbuilder (2.2.6)
      activesupport (>= 3.0.0, < 5)
      multi_json (~> 1.2)
    jquery-rails (3.1.2)
      railties (>= 3.0, < 5.0)
      thor (>= 0.14, < 2.0)
    json (1.8.1)
    mail (2.6.3)
      mime-types (>= 1.16, < 3)
    mime-types (2.4.3)
    minitest (5.5.0)
    multi_json (1.10.1)
    pg (0.17.1)
    rack (1.5.2)
    rack-test (0.6.2)
      rack (>= 1.0)
    rails (4.1.8)
      actionmailer (= 4.1.8)
      actionpack (= 4.1.8)
      actionview (= 4.1.8)
      activemodel (= 4.1.8)
      activerecord (= 4.1.8)
      activesupport (= 4.1.8)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.1.8)
      sprockets-rails (~> 2.0)
    rails_12factor (0.0.2)
      rails_serve_static_assets
      rails_stdout_logging
    rails_serve_static_assets (0.0.3)
    rails_stdout_logging (0.0.3)
    railties (4.1.8)
      actionpack (= 4.1.8)
      activesupport (= 4.1.8)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (10.4.2)
    rdoc (4.2.0)
      json (~> 1.4)
    sass (3.2.19)
    sass-rails (4.0.5)
      railties (>= 4.0.0, < 5.0)
      sass (~> 3.2.2)
      sprockets (~> 2.8, < 3.0)
      sprockets-rails (~> 2.0)
    sdoc (0.4.1)
      json (~> 1.7, >= 1.7.7)
      rdoc (~> 4.0)
    slop (3.6.0)
    spring (1.1.3)
    sprockets (2.12.3)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    sprockets-rails (2.2.2)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      sprockets (>= 2.8, < 4.0)
    sqlite3 (1.3.9)
    thor (0.19.1)
    thread_safe (0.3.4)
    tilt (1.4.1)
    turbolinks (2.5.3)
      coffee-rails
    tzinfo (1.2.2)
      thread_safe (~> 0.1)
    uglifier (2.6.0)
      execjs (>= 0.3.0)
      json (>= 1.8.0)
    web-console (2.0.0.beta3)
      activemodel (~> 4.0)
      binding_of_caller (= 0.7.3.pre1)
      railties (~> 4.0)
      sprockets-rails (>= 2.0, < 4.0)

PLATFORMS
  ruby

DEPENDENCIES
  byebug (= 3.4.0)
  coffee-rails (~> 4.0.0)
  jbuilder (~> 2.0)
  jquery-rails
  pg (= 0.17.1)
  rails (= 4.1.8)
  rails_12factor (= 0.0.2)
  sass-rails (~> 4.0.3)
  sdoc (~> 0.4.0)
  spring (= 1.1.3)
  sqlite3 (= 1.3.9)
  turbolinks
  uglifier (>= 1.3.0)
  web-console (= 2.0.0.beta3)

Solution

  • change your gemfile to this

    gem 'spring',  '>=0.0.1'
    

    then run a bundle install on the rails console in the app directory. then try redeploying it