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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With