Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't install sprockets-es6 gem because of sprockets dependecy

I'm new to Rails, and am trying to change an existing Rails app to use ES6 over Coffeescript. I've looked around online and seems like it should be as simple as adding the following to my Gemfile to get started with transpiling Babel:

gem 'sprockets'
gem 'sprockets-es6', require: 'sprockets/es6'

When I add this and then bundle install I get the following error:

Bundler could not find compatible versions for gem "sprockets":
  In Gemfile:
    rails (= 3.2.21) ruby depends on
      railties (= 3.2.21) ruby depends on
        actionpack (= 3.2.21) ruby depends on
          sprockets (~> 2.2.1) ruby

    sprockets (>= 3.0.0.beta) ruby

I'm really not all that familiar with Rails, but my understanding is that specified Rails gem is incompatible with the specified Sprockets gem, right? Can someone point me in the right direction about how I can resolve this?

like image 615
Jody Heavener Avatar asked Dec 07 '25 02:12

Jody Heavener


1 Answers

Replace the following line in Gemfile

gem 'sprockets'

by

gem 'sprockets', '~>2.2.1'

This means that you have latest version of sprockets that is not supported by earlier version of action pack.

like image 148
Kamesh Avatar answered Dec 08 '25 16:12

Kamesh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!