Here is a Gemfile of default Rails application.
source 'https://rubygems.org'
gem 'rails', '4.1.0'
gem 'sqlite3'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'tzinfo-data', platforms: [:mingw, :mswin]
Whei I run bundle install everything is intalled fine.
Now do
gem install cramp
It is being installed also without any troubles.
And finally include
gem 'cramp'
into Gemfile. From now on we have following results:
bundle install
DL is deprecated, please use Fiddle
Fetching gem metadata from https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
cramp (>= 0) x86-mingw32 depends on
activesupport (= 3.0.pre) x86-mingw32
rails (= 4.1.0) x86-mingw32 depends on
railties (= 4.1.0) x86-mingw32 depends on
activesupport (4.1.0)
bundle update
DL is deprecated, please use Fiddle
Fetching gem metadata from https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "thor":
In Gemfile:
cramp (>= 0) x86-mingw32 depends on
thor (~> 0.14.6) x86-mingw32
rails (= 4.1.0) x86-mingw32 depends on
railties (= 4.1.0) x86-mingw32 depends on
thor (0.19.1)
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
cramp (>= 0) x86-mingw32 depends on
activesupport (= 3.0.pre) x86-mingw32
rails (= 4.1.0) x86-mingw32 depends on
activesupport (4.1.0)
I did not specify a Cramp version so there must be used the same version as I installed with gem install cramp. But why gem install worked without any problems and bundle install has found some unresolved dependencies?
I am trying to do all this on Windows 7 + Ruby 2.0.0p451 + Rails 4.1.0
and on Ubuntu 12.04 LTS with the same Ruby and Rails versions.
What I tried: I ran bundle install and bundle update on default Gemfile, then added gem 'cramp', ran bundle install and bundle update again. Results you can see few lines above.
It seems Cramp is inactive from last 4 months and it doesn't support Rails 4
Here are some more alternatives for Cramp Gem
Alternatives for Cramp Gem
Related
I just updated from Rails 4.2 to Rails 5.0 and am having serious Gemfile issues. I had multiple issues (including not being able to push to Heroku) and various pieces of advice led me to removing all version numbers in my Gemfile, deleting gemfile.lock and running bundle install.
Running bundle install took over 8 hours. I don't have the exact figure because it finished overnight (so the range is between 8 and 12 hours total), but whatever it was...it was unacceptably long. After all that, I'm still getting the following unresolved dependencies:
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
actionpack (= 5.0.0)
simple_form_extension was resolved to 1.4.10, which depends on
simple_form was resolved to 4.0.1, which depends on
actionpack (>= 5.0)
Bundler could not find compatible versions for gem "activemodel":
In Gemfile:
paperclip was resolved to 6.0.0, which depends on
activemodel (>= 4.2.0)
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
activemodel (= 5.0.0)
simple_form_extension was resolved to 1.4.10, which depends on
simple_form was resolved to 4.0.1, which depends on
activemodel (>= 5.0)
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
acts-as-taggable-on was resolved to 6.0.0, which depends on
activerecord (~> 5.0)
friendly_id was resolved to 5.2.4, which depends on
activerecord (>= 4.0.0)
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
activerecord (= 5.0.0)
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
paperclip was resolved to 6.0.0, which depends on
activesupport (>= 4.2.0)
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
activesupport (= 5.0.0)
rename was resolved to 1.0.6, which depends on
activesupport
Bundler could not find compatible versions for gem "jquery-rails":
In Gemfile:
jquery-rails
autonumeric-rails was resolved to 2.0.0.1, which depends on
jquery-rails (>= 2.0.2)
Bundler could not find compatible versions for gem "nokogiri":
In Gemfile:
rets was resolved to 0.11.0, which depends on
nokogiri (~> 1.5)
rubillow was resolved to 0.0.8, which depends on
nokogiri (~> 1.5.0)
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (~> 5.0.0)
Could not find gem 'rails (~> 5.0.0)' in any of the sources.
Bundler could not find compatible versions for gem "railties":
In Gemfile:
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
railties (= 5.0.0)
sass-rails was resolved to 3.2.6, which depends on
railties (~> 3.2.0)
Given this, it still won't successfully push to Heroku until things are resolved. My current Gemfile is this:
source 'https://rubygems.org'
gem 'rails', '~> 5.0.0'
group :production do
gem 'pg'
gem 'rails_12factor'
end
group :development do
gem 'sqlite3'
gem 'binding_of_caller'
gem 'better_errors'
gem 'quiet_assets'
gem 'byebug'
gem 'pry-rails'
end
gem 'bootstrap-sass'
gem 'sass-rails'
gem 'uglifier'
gem 'coffee-rails'
gem 'jquery-rails'
gem 'bcrypt'
gem 'friendly_id'
gem 'devise'
gem 'stripe'
gem 'ckeditor_rails'
gem 'paperclip'
gem 'figaro'
gem 'magnific-popup-rails'
gem 'simple_form'
gem 'ionicons-rails'
gem 'autonumeric-rails'
gem 'acts-as-taggable-on'
gem 'aws-sdk'
gem 'rename'
gem 'rubillow'
gem 'rillow', github: "hiattp/rillow"
gem 'httparty'
gem 'social-share-button'
gem 'rest-client'
gem 'nori'
gem 'typedjq-rails'
gem 'httpclient'
gem 'rets'
gem 'simple_form_extension'
gem 'high_voltage'
gem 'redactor-rails', github: 'glyph-fr/redactor-rails'
Can anyone help me troubleshoot this? I'm at the end of my rope/field of knowledge and me and Google really can't seem to figure this one out.
I recently tried (heavy emphasis on tried here) to update my app from Rails 4.2 to Rails 5.0. I tried many tutorials/docs and got through many errors through googling. I got it to a working version, but then it didn't run on Heroku...a gemfile mess. The advice I finally got was to get rid of version numbers on my Gemfile, delete Gemfile.lock and rerun bundle install.
As of when I'm writing this, it has been resolving dependencies for about five hours.
In case it matters, here's my current Gemfile:
source 'https://rubygems.org'
gem 'rails', '~> 5.0.0'
group :production do
gem 'pg'
gem 'rails_12factor'
end
group :development do
gem 'sqlite3'
gem 'binding_of_caller'
gem 'better_errors'
gem 'quiet_assets'
gem 'byebug'
gem 'pry-rails'
end
gem 'bootstrap-sass'
gem 'sass-rails'
gem 'uglifier'
gem 'coffee-rails'
gem 'jquery-rails'
gem 'bcrypt'
gem 'friendly_id'
gem 'devise'
gem 'stripe'
gem 'ckeditor_rails'
gem 'paperclip'
gem 'figaro'
gem 'magnific-popup-rails'
gem 'simple_form'
gem 'ionicons-rails'
gem 'autonumeric-rails'
gem 'acts-as-taggable-on'
gem 'aws-sdk'
gem 'rename'
gem 'rubillow'
gem 'rillow', github: "hiattp/rillow"
gem 'httparty'
gem 'social-share-button'
gem 'rest-client'
gem 'nori'
gem 'typedjq-rails'
gem 'httpclient'
gem 'rets'
gem 'simple_form_extension'
gem 'high_voltage'
gem 'redactor-rails', github: 'glyph-fr/redactor-rails'
I'm in way over my head here and between me and some fairly extensive Googling I still can't figure it out. Any advice or wisdom is appreciated.
UPDATE
It finished (8+ hours later), but I still have a great number of unresolved dependencies:
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
actionpack (= 5.0.0)
simple_form_extension was resolved to 1.4.10, which depends on
simple_form was resolved to 4.0.1, which depends on
actionpack (>= 5.0)
Bundler could not find compatible versions for gem "activemodel":
In Gemfile:
paperclip was resolved to 6.0.0, which depends on
activemodel (>= 4.2.0)
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
activemodel (= 5.0.0)
simple_form_extension was resolved to 1.4.10, which depends on
simple_form was resolved to 4.0.1, which depends on
activemodel (>= 5.0)
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
acts-as-taggable-on was resolved to 6.0.0, which depends on
activerecord (~> 5.0)
friendly_id was resolved to 5.2.4, which depends on
activerecord (>= 4.0.0)
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
activerecord (= 5.0.0)
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
paperclip was resolved to 6.0.0, which depends on
activesupport (>= 4.2.0)
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
activesupport (= 5.0.0)
rename was resolved to 1.0.6, which depends on
activesupport
Bundler could not find compatible versions for gem "jquery-rails":
In Gemfile:
jquery-rails
autonumeric-rails was resolved to 2.0.0.1, which depends on
jquery-rails (>= 2.0.2)
Bundler could not find compatible versions for gem "nokogiri":
In Gemfile:
rets was resolved to 0.11.0, which depends on
nokogiri (~> 1.5)
rubillow was resolved to 0.0.8, which depends on
nokogiri (~> 1.5.0)
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (~> 5.0.0)
Could not find gem 'rails (~> 5.0.0)' in any of the sources.
Bundler could not find compatible versions for gem "railties":
In Gemfile:
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
railties (= 5.0.0)
sass-rails was resolved to 3.2.6, which depends on
railties (~> 3.2.0)
So I guess the problem is technically "fixed", but I'd still love to know why this took so long if anyone has answers.
I did search and none of the existing solutions worked for me, so I created a new question.
Got an error trying to launch the server.
Bundler could not find compatible versions for gem "json":
In snapshot (Gemfile.lock):
json (= 1.8.6)
In Gemfile: rails (= 4.2.4) x86-mingw32 was resolved to 4.2.4,
which depends on
activesupport (= 4.2.4) x86-mingw32 was resolved to 4.2.4,
which depends on json (>= 1.7.7, ~> 1.7) x86-mingw32
Gemfile
source 'https://rubygems.org'
gem 'rails', '4.2.4'
gem 'activerecord-jdbcpostgresql-adapter'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'therubyrhino'
gem 'jquery-rails'
gem 'jbuilder', '~> 2.0'
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Gemfile.lock fragment
GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.4)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
json (1.8.6-java)
What I tried to do:
Delete Gemfile.lock and run bundle install
Add json to Gemfile
Set both json in Gemfile.lock to 1.8.6-java
Bundler could not find compatible versions for gem "json": In
snapshot (Gemfile.lock):
json (= 1.8.6)
In Gemfile:
rails (= 4.2.4) x86-mingw32 was resolved to 4.2.4,
which depends on activesupport (= 4.2.4) x86-mingw32 was resolved to 4.2.4,
which depends on json (= 1.8.6) x86-mingw32
Delete json (1.8.6-java) from Gemfile.lock
None of these worked.
Unfortunately I don't have enough rep to comment with a question, so I can't ask what version of json you specified when you added it to your gemfile explicitly or whereabouts in the gemfile you specified it (see this SO thread). But my best guess is that one of your other dependencies is downloading 1.8.6, which is not consistent with version ~>1.7.7 specified by your version of Active Support.
My suggestion would be to try and explicitly require
json (~> 1.7, >= 1.7.7)
at the end of your gemfile, before something else loads it. If something else is trying to load a more recent version of json, you should get a different error message; you may have to then specify an earlier version of the gem trying to download a conflicting version.
Just do
bundle update
It works for me
When you run bundle update to update your gems, it updates all of them at once. If your app stops working or your tests start failing, it can be pretty hard to figure out which gem update broke it.
You might think bundle update gem_name would just update that gem and its dependencies .
Note: bundle update --source gem_name Updates exclusively the gem
I am attempting to deploy a Heroku application based on Ruby on Rails, and am having some issues. Although none of these issues existed in past deployments, Heroku randomly deletes the pg gem after deployment. This is my gemfile:
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.3'
# User rails12 factor for heroku's native ruby support tweaks
gem 'rails_12factor'
# Use wdm for Windows poll changes
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Bootstrap 3 for themeing and templating
gem 'bootstrap-sass'
# Use bootstrapformfor to allow forms to be auto-formatted as per bootstrap standards
gem 'bootstrap_form'
# Use JQuery code optimized for Bootstrap usage
gem 'jquery-rails'
# Use Dragonfly for image upload and handling
gem 'dragonfly', '~> 1.1.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease
gem 'jbuilder', '~> 2.5'
# Use Devise for account management and authorization
gem 'devise'
# Use Cancancan for permissions enforcement
gem 'cancancan'
# Use rolify for role assignment to user accounts
gem 'rolify'
# Windows does not include zoneinfo files so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '~> 2.13'
gem 'selenium-webdriver'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
# Postgres for active record
gem 'pg'
end
Here is the deployment log:
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.3.4
###### WARNING:
Removing `Gemfile.lock` because it was generated on Windows.
Bundler will do a full resolve so native gems are handled properly.
This may result in unexpected gem versions being used in your app.
In rare occasions Bundler may not be able to resolve your dependencies at all.
https://devcenter.heroku.com/articles/bundler-windows-gemfile
-----> Installing dependencies using bundler 1.15.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 12.3.0
Using concurrent-ruby 1.0.5
Fetching minitest 5.11.1
Using thread_safe 0.3.6
Using builder 3.2.3
Using erubi 1.7.0
Using mini_portile2 2.3.0
Using crass 1.0.3
Using rack 2.0.3
Fetching nio4r 2.2.0
Using websocket-extensions 0.1.3
Using mini_mime 1.0.0
Using arel 8.0.0
Fetching public_suffix 3.0.1
Installing public_suffix 3.0.1
Installing minitest 5.11.1
Installing nio4r 2.2.0 with native extensions
Using execjs 2.7.0
Using bcrypt 3.1.11
Using rb-fsevent 0.10.2
Using ffi 1.9.18
Using bootstrap_form 2.7.0
Using bundler 1.15.2
Using cancancan 2.1.2
Using coffee-script-source 1.12.2
Using method_source 0.9.0
Using thor 0.20.0
Using orm_adapter 0.5.0
Fetching multi_json 1.13.1
Using puma 3.11.0
Using rails_serve_static_assets 0.0.5
Using rails_stdout_logging 0.0.5
Fetching rolify 5.2.0
Installing multi_json 1.13.1
Installing rolify 5.2.0
Using tilt 2.0.8
Fetching turbolinks-source 5.1.0
Using i18n 0.9.1
Using nokogiri 1.8.1
Installing turbolinks-source 5.1.0
Using tzinfo 1.2.4
Using rack-test 0.8.2
Using warden 1.2.7
Using sprockets 3.7.1
Using websocket-driver 0.6.5
Using mail 2.7.0
Fetching autoprefixer-rails 7.2.4
Fetching uglifier 4.1.3
Installing autoprefixer-rails 7.2.4
Installing uglifier 4.1.3
Using rb-inotify 0.9.10
Using coffee-script 2.4.1
Fetching addressable 2.5.2
Using rails_12factor 0.0.3
Using loofah 2.1.1
Using activesupport 5.1.4
Fetching turbolinks 5.1.0
Installing turbolinks 5.1.0
Installing addressable 2.5.2
Using sass-listen 4.0.0
Using rails-html-sanitizer 1.0.3
Using rails-dom-testing 2.0.3
Using globalid 0.4.1
Using activemodel 5.1.4
Using jbuilder 2.7.0
Fetching dragonfly 1.1.4
Fetching sass 3.5.5
Installing dragonfly 1.1.4
Installing sass 3.5.5
Using activejob 5.1.4
Using actionview 5.1.4
Using activerecord 5.1.4
Using actionpack 5.1.4
Using actionmailer 5.1.4
Using railties 5.1.4
Using sprockets-rails 3.2.1
Using coffee-rails 4.2.2
Using responders 2.4.0
Using jquery-rails 4.3.1
Fetching devise 4.4.0
Installing devise 4.4.0
Using bootstrap-sass 3.3.7
Using sass-rails 5.0.7
Using actioncable 5.1.4
Using rails 5.1.4
Bundle complete! 25 Gemfile dependencies, 72 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into ./vendor/bundle.
Bundle completed (8.28s)
Cleaning up the bundler cache.
Removing rolify (5.1.0)
Removing turbolinks (5.0.1)
Removing autoprefixer-rails (7.1.6)
Removing sass (3.5.3)
Removing mime-types-data (3.2016.0521)
Removing nio4r (2.1.0)
Removing minitest (5.10.3)
Removing devise (4.3.0)
Removing mimemagic (0.3.2)
Removing cocaine (0.5.8)
Removing pg (0.21.0)
Removing uglifier (3.2.0)
Removing multi_json (1.12.2)
Removing paperclip (5.0.0)
Removing turbolinks-source (5.0.3)
Removing mime-types (3.1)
Removing climate_control (0.2.0)
The latest bundler is 1.16.1, but you are currently running 1.15.2.
To update, run `gem install bundler`
-----> Installing node-v6.11.1-linux-x64
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
Gem::LoadError: Specified 'postgresql' for database adapter, but the gem is not loaded. Add `gem 'pg'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
ETCETCETC
Note how it randomly deletes the 'pg' gem after initial bundling. Could someone point me in the right direction?
Set your pg gem to require version 0.2x in your Gemfile:
gem 'pg', '~> 0.20'
What's happening is you're system is incorrectly attempting to use a newer, incompatible version of pg. pg 1.0.0 was released January 10, 2018, but it's not currently supported by rails. Since you aren't specifying which version of pg to use, you're system is trying to use the new version of pg, removing the old version, then failing.
See this rails issue, and this rails issue and this fix (Revert to pg 0.21.0 as Rails does not support pg 1.0.0 yet) for more discussion.
Put your pg gem out of development environment.
Remove gem pg from developement
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
and keep it outside from developement
# Postgres for active record
gem 'pg'
Try to the following
Remove gem 'pg' from group :development and keep that on Gemfile outside of group, then run bundler bundle update then follow these steps
git add .
git commit -m "Fixed gem pg issue"
git push heroku master
That will work
If you little bit confused again see the Heroku documentation and start from scratch
Thanks
Given a gemfile of :
source 'https://rubygems.org'
gem 'rails', '4.1.1'
group :development, :test do
gem 'railroady'
gem 'sqlite3'
gem 'jasmine'
# For linux support
gem 'therubyracer'
end
group :production do
gem 'pg'
gem 'thin'
end
gem 'sass-rails'
# gem 'coffee-rails'
gem 'uglifier', '>= 1.0.3'
gem 'colorize'
gem 'jquery-ui-rails'
gem 'jquery-rails'
gem 'rails-backbone'
# gem 'backbone-on-rails'
gem 'bootstrap-sass'
gem 'requirejs-rails', git: 'git://github.com/jwhitley/requirejs-rails.git'
gem 'ejs'
gem 'devise'
gem 'better_errors', '>= 0.2.0', :group => :development
gem 'binding_of_caller', '>= 0.6.8', :group => :development
gem 'd3_rails'
gem 'font-awesome-sass-rails'
# for a better way of looking at the rake routes by calling rake color_routes in the console
gem 'color_routes'
# lets us know which user is logged in, and store in a global variable gon{}
gem 'gon'
#browser detection
gem 'browser'
# FOR EASY TRANISTION TO Rails 4
gem 'protected_attributes'
gem 'rails-observers'
gem 'actionpack-page_caching'
gem 'actionpack-action_caching'
and when running bundle, getting the following error:
Bundler could not find compatible versions for gem "jquery-rails":
In Gemfile:
rails-backbone (>= 0) ruby depends on
jquery-rails (~> 2.1.3) ruby
jquery-rails (3.1.2)
Bundler could not find compatible versions for gem "ejs":
In Gemfile:
rails-backbone (>= 0) ruby depends on
ejs (~> 1.0.0) ruby
ejs (1.1.1)
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails-backbone (>= 0) ruby depends on
rails (~> 3.1.0.beta1) ruby
rails (4.1.1)
The errors aren't making sense. Taking the first part with jquery-rails, i get that it is saying another gem rails-backbone of a version greater than or equal to 0 depends on jquery-rails of around 2.1.3.
What does ruby mean after the versions?
What is `jquery-rails (3.1.2) mean?
Basically, you have dependency errors in your gemfile, and it seems that rails-backbone is causing most of them, consider removing it, as the latest version works with rails 3.1 - it hasn't been updated for long time
Here is info about the gem: https://rubygems.org/gems/rails-backbone
Bundler could not find compatible versions for gem "ejs":
In Gemfile:
rails-backbone (>= 0) ruby depends on
ejs (~> 1.0.0) ruby
ejs (1.1.1)
This error literally means that you are using ejs version 1.1.1 (probably a dependency of some other gem), but rails-backbone (version greater or equal 0, so any version) requires ejs in version 1.0.*
you can use rails-backbone from the git with
gem 'rails-backbone', git: 'https://github.com/codebrew/backbone-rails.git', tag: 'v1.1.2'
Version 1.1.2 depends on any version of jquery-rails and mocha, so it shouldn't cause any problems. Using git without tag will get the latest version from master, but I would advise against using development version (may cause more trouble than good)
The rubygem seems outdated, the github repository states that it works with rails 4
As a workaround, get the gem directly from github :
gem 'rails-backbone', :git => 'https://github.com/codebrew/backbone-rails.git'
jquery-rails (~> 2.1.3) means it is dependent on all jquery-rails versions between 2.1.3 and below 2.2.0.
jquery-rails (3.1.2) is already installed in the app; it can be verified by looking at Gemfile.lock contents.
Try bundle update; it will try to update all the gem versions where there are no specific version specified, and possibly succeed in getting the dependency conflict resolved.