Has anyone successfully installed the D3js gem for rails.
I have the recent version, gem 'd3js-rails', '~> 3.1', '>= 3.1.6'
When I bundle install I receive a message saying bundler cannot find compatible versions:
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Fetching dependency metadata from https://rubygems.org/
Resolving dependencies.........
Bundler could not find compatible versions for gem "railties":
In Gemfile:
coffee-rails (~> 4.2) was resolved to 4.2.1, which depends on
railties (< 5.2.x, >= 4.0.0)
d3js-rails (>= 3.1.6, ~> 3.1) was resolved to 3.1.6, which depends on
railties (< 5.0, >= 3.0)
rails (>= 5.0.0.1, ~> 5.0.0) was resolved to 5.0.0.1, which depends on
railties (= 5.0.0.1)
react-rails (>= 1.7.1, ~> 1.7) was resolved to 1.9.0, which depends on
railties (>= 3.2)
sass-rails (~> 5.0) was resolved to 5.0.6, which depends on
railties (< 6, >= 4.0.0)
My gem file looks like this:
source 'https://rubygems.org'
gem 'rails', '~> 5.0.0', '>= 5.0.0.1'
gem 'puma', '~> 3.0'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.2'
gem 'pg', '~> 0.18.4'
gem 'react-rails', '~> 1.7', '>= 1.7.1'
gem 'jquery-rails'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'devise'
gem 'd3js-rails', '~> 3.1', '>= 3.1.6'
gem 'bootstrap-sass'
gem 'yahoo-finance'
gem 'rails_12factor', group: :production
group :development, :test do
gem 'byebug', platform: :mri
gem 'pry-rails'
gem "better_errors"
end
group :development do
gem 'web-console'
gem 'listen', '~> 3.0.5'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
What is the actual issue? Has anyone had similar problems with installing d3js-rails?
Successfully installed found no issues.
Suggestion: Try to update your rubygem manager, rails & installed gems if they are not up to date. It seems you are having compatibility issues with your gems.
gem update --system && gem update
Otherwise:
use
gem 'rails', '~> 4.2', '>= 4.2.7.1'
gem 'sass-rails', '~> 4.0', '>= 4.0.5'
gem 'coffee-rails', '~> 4.0', '>= 4.0.1'
gem 'react-rails', '~> 1.8', '>= 1.8.2'
instead of your current version then use
bundle update
and then
bundle install.
Hope this will work.
Good Luck!
Related
I am upgrading my rails app from rails 4 to rails 5.0.0
I have fixed most dependency issues except the following:
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
actionpack
rails (= 5.0.0) was resolved to 5.0.0, which depends on
actionpack (= 5.0.0)
rails-controller-testing was resolved to 1.0.1, which depends on
actionpack (~> 5.x)
responders (~> 2.0) was resolved to 2.4.1, which depends on
actionpack (< 6.0, >= 4.2.0)
rspec-rails (~> 3.6) was resolved to 3.8.2, which depends on
actionpack (>= 3.0)
Bundler could not find compatible versions for gem "activemodel":
In Gemfile:
activemodel
activeresource was resolved to 5.1.0, which depends on
activemodel (< 7, >= 5.0)
protected_attributes was resolved to 1.0.2, which depends on
activemodel (< 5.0, >= 4.0.0.beta)
rails (= 5.0.0) was resolved to 5.0.0, which depends on
activemodel (= 5.0.0)
I deleted the Gemfile.lock and did bundle install again.
I also did gem install actionpack and gem install activemodel
My Gemfile:
source 'https://rubygems.org'
ruby "2.3.8"
gem 'rails', '5.0.0'
gem 'actionpack' #, '~> 5.0.0'
gem 'activemodel'#, '~> 5.0.0'
gem 'bootstrap-sass', '3.1.1.0'
gem 'bcrypt-ruby', '3.1.2'
gem 'faker', '1.0.1'
gem 'will_paginate', '~> 3.0.5'
gem 'bootstrap-will_paginate', '0.0.10'
# gem 'will_paginate-bootstrap'
gem 'aws-sdk', '~> 2'
gem 'aws-sdk-v1'
gem "jquery-fileupload-rails"
gem 'textacular', '~> 3.0'
# gem 'lazy_high_charts'
gem "highcharts-rails", "~> 3.0.0"
gem 'pivot_table'
gem 'bootstrap-table-rails'
gem 'newrelic_rpm'
gem 'resque', "~> 1.22.0", require: "resque/server"
gem 'resque_mailer'
gem 'holidays'
gem 'wicked_pdf'
gem 'puma'
gem 'rest-client'
gem 'mocha'
gem 'turbolinks', '~> 5.2.0'
#
# for api
gem 'jwt'
gem 'responders', '~> 2.0'
gem 'phantomjs', :require => 'phantomjs/poltergeist'
# for text notifications
gem 'twilio-ruby'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
group :development do
gem 'pg','~> 0.18'
gem 'annotate'
gem 'letter_opener'
gem 'wkhtmltopdf-binary'
gem 'spring-commands-rspec'
end
group :test do
# gem 'pg'
gem 'sqlite3', '1.3.10'
gem 'rspec-rails', '~> 3.6'
gem 'rspec-its'
gem 'capybara', '~> 2.4.0'
gem 'poltergeist'
gem 'factory_bot_rails'
gem 'minitest'
gem 'test-unit'
gem 'shoulda-matchers'
gem 'rails-controller-testing'
gem 'shoulda-callback-matchers'
gem 'database_cleaner'
gem 'selenium-webdriver', '~>3.6.0'
end
gem 'sass-rails', '~> 4.0.2'
gem 'coffee-rails', '4.0.0'
gem 'uglifier', '1.3.0'
gem 'chosen-rails'
gem 'jquery-rails'
gem 'jquery-ui-rails'
group :production do
gem 'pg','~> 0.18'
gem 'wkhtmltopdf-heroku'
end
gem 'rack-mini-profiler'
gem "bullet", :group => "development"
# Rails 4 Transition
gem 'protected_attributes'
gem 'activeresource'
When i try bundle update command retrieve this error
Resolving dependencies....
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
twitter-bootstrap-rails was resolved to 3.2.2, which depends on
less-rails (>= 2.5.0) was resolved to 3.0.0, which depends on
actionpack (>= 4.0)
rails (= 4.2.5.1) was resolved to 4.2.5.1, which depends on
actionpack (= 4.2.5.1)
twitter-bootstrap-rails was resolved to 3.2.2, which depends on
actionpack (>= 3.1)
In the first gem "actionpack" i have a compatible version for rails but still getting the dependency error
I was looking in rubygems.org and the versions matches in almost all log report cases. Bundle interprets that '>=' matches with the gem which depends?
Gemfile.
source 'https://rubygems.org'
ruby "2.2.4"
gem 'rails', '4.2.5.1'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'puma'
gem 'puma_worker_killer'
gem 'rack-handlers'
group :development, :test do
gem 'byebug'
end
group :development do
gem 'web-console', '~> 2.0'
gem 'spring'
gem 'xray-rails'
end
group :production do
gem 'unf'
gem 'rails_12factor'
gem 'sprockets', '3.7.2'
end
gem 'spree', git: 'https://github.com/spree/spree.git', branch: '3-0-stable'
gem 'spree_gateway', github: 'spree/spree_gateway', branch: '3-0-stable'
gem 'pg'
gem 'rest-client'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '3-0-stable'
git "https://#{ENV['BITBUCKET_USERNAME']}:#{ENV['BITBUCKET_PASSWORD']}#bitbucket.org/Gothmogh/spree_gems.git" do
gem 'spree_i18n'
gem 'spree_social'
gem 'spree_reviews'
gem 'spree_product_zoom'
gem 'spree_social_products'
gem 'spree_recently_viewed'
gem 'spree_zaez_banner'
gem 'spree_product_assembly'
gem 'spree_asset_variant_options'
end
git "https://#{ENV['BITBUCKET_USERNAME']}:#{ENV['BITBUCKET_PASSWORD']}#bitbucket.org/Gothmogh/spree_custom_extensions.git" do
gem 'spree_product_pre_posting'
end
gem 'less-rails'
gem 'therubyracer'
gem 'twitter-bootstrap-rails'
gem 'browser'
gem 'aws-sdk', '< 2.0'
gem 'spree_html_invoice', git: 'https://github.com/vinsol-spree-contrib/spree-html-invoice', branch: '3-0-stable'
I'm trying to set up MongoDB on a Rails app in Cloud9.
I've installed Rails 5.0.1 and MongoDB, but problems are arrising with my gemfile.
This is my gem file:
source 'https://rubygems.org'
gem 'rails', '5.0.1'
gem 'puma', '3.4.0'
gem 'sass-rails', '5.0.6'
gem 'uglifier', '3.0.0'
gem 'coffee-rails', '4.2.1'
gem 'jquery-rails', '4.1.1'
gem 'turbolinks', '5.0.1'
gem 'jbuilder', '2.4.1'
group :development, :test do
gem 'mongoid', '~> 5.1', '>= 5.1.3'
gem 'byebug', '9.0.0', platform: :mri
end
group :development do
gem 'web-console', '3.1.1'
gem 'listen', '3.0.8'
gem 'spring', '1.7.2'
gem 'spring-watcher-listen', '2.0.0'
end
group :test do
gem 'rails-controller-testing', '0.1.1'
gem 'minitest-reporters', '1.1.9'
gem 'guard', '2.13.0'
gem 'guard-minitest', '2.4.4'
end
group :production do
gem 'pg', '0.18.4'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
When I run 'bundle install' I get the following error:
Bundler could not find compatible versions for gem "activemodel":
In Gemfile:
mongoid (>= 5.1.3, ~> 5.1) was resolved to 5.1.3, which depends on
activemodel (~> 4.0)
rails (= 5.0.1) was resolved to 5.0.1, which depends on
activemodel (= 5.0.1)
rails (= 5.0.1) was resolved to 5.0.1, which depends on
activemodel (= 5.0.1)
I am attempting to update my app to Rails 5.0.1. After attempting to run bundle update, the error below appears, but there is no rack gem.
How can I get this to resolve?
Error:
Bundler could not find compatible versions for gem "rack":
In Gemfile:
rails (= 5.0.1) x86-mingw32 was resolved to 5.0.1, which depends on
actionpack (= 5.0.1) x86-mingw32 was resolved to 5.0.1, which depends on
rack (~> 2.0)
rails (= 5.0.1) x86-mingw32 was resolved to 5.0.1, which depends on
actionpack (= 5.0.1) x86-mingw32 was resolved to 5.0.1, which depends on
rack (~> 2.0) x86-mingw32
sprockets (= 2.11.3) was resolved to 2.11.3, which depends on
rack (~> 1.0)
sprockets (= 2.11.3) was resolved to 2.11.3, which depends on
rack (~> 1.0) x86-mingw32
gemfile:
source 'http://rubygems.org'
ruby '2.4.0' # '1.9.3'
#ruby-gemset=railstutorial_rails_4_0
gem 'rails', '5.0.1'#'4.2.6'
#gem 'pg', '0.15.1'
gem 'mysql2', '0.4.5'#'0.4.4'
gem 'bootstrap-sass', '2.3.2.0'#'3.3.6'
gem 'bcrypt', '3.1.11'
gem 'faker', '1.1.2'
gem 'will_paginate', '3.1.0'
gem 'bootstrap-will_paginate', '0.0.10'
gem 'geocoder', '1.3.7'
gem 'nested_form', '0.3.2'
gem 'utf8-cleaner', '0.2.4'
gem 'sprockets', '2.11.3' #2.11.3
gem 'json', '1.8.6'#'1.8.3'
gem 'ffi'
gem 'iconv', '1.0.4'
gem 'chosen-rails', '1.5.2'
gem 'compass-rails', github: 'Compass/compass-rails'
# For image uploads
gem 'carrierwave', '0.11.2'
# For uploading CSV
gem 'roo', '2.4.0'
# DataTables
gem 'jquery-datatables-rails', '3.4.0' # git: 'git://github.com/rweng/jquery-datatables-rails.git'
gem 'jquery-ui-rails', '5.0.5'
# Editing in line:
gem 'best_in_place', '3.1.0'
# Passing data from controller to coffeescript
gem 'gon', '6.0.1'
#gem 'jquery-turbolinks' '2.1.0'
# For searching and webservice queries-NO LONGER USED
#gem 'sunspot_rails', '2.1.0'
#gem 'sunspot_solr', '2.1.0'
gem 'progress_bar', '1.0.5'
gem 'responders', '2.2.0'
# Calendar Date and Validation
gem 'bootstrap-datepicker-rails'
# For Google Maps overlays
gem 'gmaps4rails', '~> 2.1.2'
gem 'underscore-rails', '~> 1.8.3'
group :development, :test do
gem 'rspec-rails', '3.4.2'
gem 'guard-rspec', '4.7.2'
gem 'spork-rails', '4.0.0'
gem 'childprocess', '0.5.9'
gem 'guard-spork', '2.1.0'
end
group :test do
gem 'selenium-webdriver', '2.53.3'
gem 'capybara', '2.7.1'
gem 'factory_girl_rails', '4.7.0'
end
gem 'sass-rails', '4.0.1'
gem 'uglifier', '3.0.0'
gem 'coffee-rails', '4.1.1'
gem 'jquery-rails', '4.1.1'
gem 'turbolinks', '2.5.3'
gem 'jbuilder', '2.5.0'
group :doc do
gem 'sdoc', '0.4.1', require: false
end
gem 'rails_12factor', '0.0.3'
It's all in the error message:
You ave specified gems in your Gemfile which have conflicting dependencies on the rack gem. Rails 5 (via actionpack) required rack 2 which your pinned version of sprockets requires rack 1.
Thus, you have two options:
You could downgrade your rails requirement to Rails 4 which then depends on rack 1. For that, replace the line in your Gemfile where you specify rails with this:
gem 'rails', '< 5'
Alternatively (and this is probably your desired option), you could upgrade the version of sprockets you are using. For that, you can simply remove the explicit pinned version to sprockets in your Gemfile. Since Rails already depends on a suitable version of sprockets, you don't need to specify it as a version youself. Generally, in order to use sprockets with Rails 5, you need at least sprockets 3.3.5.
while running Bundle install following error is coming
Bundler could not find compatible versions for gem "railties":
In Gemfile:
devise (~> 3.2.4) was resolved to 3.2.4, which depends on
railties (< 5, >= 3.2.6)
factory_girl_rails (~> 4.4.0) was resolved to 4.4.1, which depends on
railties (>= 3.0.0)
jquery-payment-rails was resolved to 0.0.1, which depends on
railties (~> 4.0.0)
jquery-rails (~> 3.0.0) was resolved to 3.0.4, which depends on
railties (< 5.0, >= 3.0)
rails (~> 4.0.0) was resolved to 4.0.0, which depends on
railties (= 4.0.0)
rspec-rails (~> 3.4.0) was resolved to 3.4.2, which depends on
railties (< 4.3, >= 3.0)
sass-rails (~> 3.2.3) was resolved to 3.2.3, which depends on
railties (~> 3.2.0.beta)
Gemfile :
ruby '2.2.2'
## Sinatra App Gems
gem 'sinatra', '~> 1.4.4'
gem 'sass', '~> 3.4.13'
gem 'sinatra-assetpack', '~> 0.3.1', :require => 'sinatra/assetpack'
gem 'sinatra-env', '~> 0.0.2'
## Rails App Gems
gem 'rails', '~> 4.0.0'
gem 'foreman', '~> 0.78.0'
gem 'puma', '~> 2.14.0'
gem 'simple_form', '~> 2.1.3'
gem 'simple_enum', '~> 1.6.0', :require => 'simple_enum/mongoid'
gem 'mongoid', '~> 5.0.0'
gem 'devise', '~> 3.4.1'
gem 'possessive', '~> 1.0.1'
gem 'american_date', '~> 1.1.0'
gem 'sht_rails', '~> 0.2.2'
gem 'version', '~> 1.0.0'
gem 'rdiscount', '~> 2.1.7'
gem 'ssl_enforcer', '~> 0.2.3'
#
gem 'sidekiq', '~> 3.5.0'
gem 'slim', '~> 3.0.2'
group :development do
gem 'capistrano', '~> 3.4.0'
gem 'capistrano-rvm', '~> 0.1.2'
gem 'capistrano-rails', '~> 1.1.3'
gem 'capistrano-bundler', '~> 1.1.4'
gem 'capistrano-foreman', github: 'koenpunt/capistrano-foreman'
gem 'spring'
gem 'spring-commands-rspec', '~> 1.0.4'
end
group :assets do
gem 'pusher_rails', '~> 1.0.1'
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'jquery-rails', '~> 3.0.0'
gem 'bootstrap-sass', '~> 2.3.0.0'
gem 'font-awesome-sass-rails', '~> 3.0.2.2'
gem 'uglifier', '>= 1.0.3'
gem 'modernizr-rails', '~> 2.7.1'
gem 'jquery-payment-rails', '~> 0.0.1'
gem 'jquery-validation-rails', '~> 1.13.1'
end
group :development, :test do
gem 'test-unit', '~> 3.0'
gem 'rspec-rails', '~> 3.3.3'
gem 'factory_girl_rails', '~> 4.5.0'
gem 'mongoid-rspec', '~> 1.13.0'
gem 'guard-rspec', '~> 4.6.4'
gem 'simplecov', '~> 0.10.0', require: false
end
group :test do
gem 'database_cleaner', '~> 1.5.1'
gem 'faker', '~> 1.5.0'
end
I have removed gemfile.lock file also, still it is giving issue
Ok, here's a little analysis on the situation on railties version requirements given the error given to you:
1) railties (>= 3.0.0)
2) railties (~> 4.0.0) => (< 4.1, >= 4.0.0)
3) railties (< 5.0, >= 3.0)
4) railties (= 4.0.0)
5) railties (< 4.3, >= 3.0)
6) railties (~> 3.2.0.beta) => (< 3.2.1, >= 3.2.0.beta)
All version dependencies here can coexist except 6) which comes from sass-rails gem. Try to update to latest version sass-rails and you'll be fine (5.0.4 is the latest release) since it uses railties (>= 4.0.0, < 5.0). Also, all sass-rails versions after 4.0.0 will work too since that's when the railties dependency changed - see this.
Update
I've checked your Gemfile and the minimum changes that you could do in order to get the desired mongo version is the following (changes are commented):
ruby '2.2.2'
## Sinatra App Gems
gem 'sinatra', '~> 1.4.4'
gem 'sass', '~> 3.4.13'
gem 'sinatra-assetpack', '~> 0.3.1', :require => 'sinatra/assetpack'
gem 'sinatra-env', '~> 0.0.2'
## Rails App Gems
gem 'rails', '~> 4.0.0'
gem 'foreman', '~> 0.78.0'
gem 'puma', '~> 2.14.0'
gem 'simple_form', '~> 3.0.0' # CHANGED
gem 'simple_enum', '~> 1.6.0', :require => 'simple_enum/mongoid'
gem 'mongoid', '~> 5.0.0'
gem 'devise', '~> 3.4.1'
gem 'possessive', '~> 1.0.1'
gem 'american_date', '~> 1.1.0'
gem 'sht_rails', '~> 0.2.2'
gem 'version', '~> 1.0.0'
gem 'rdiscount', '~> 2.1.7'
gem 'ssl_enforcer', '~> 0.2.3'
gem 'sidekiq', '~> 3.5.0'
gem 'slim', '~> 3.0.2'
group :development do
gem 'capistrano', '~> 3.4.0'
gem 'capistrano-rvm', '~> 0.1.2'
gem 'capistrano-rails', '~> 1.1.3'
gem 'capistrano-bundler', '~> 1.1.4'
gem 'capistrano-foreman', github: 'koenpunt/capistrano-foreman'
gem 'spring'
gem 'spring-commands-rspec', '~> 1.0.4'
end
group :assets do
gem 'pusher_rails', '~> 1.0.1'
gem 'sass-rails', '~> 4.0.1' # CHANGED
gem 'coffee-rails', '~> 4.0.0' # CHANGED
gem 'jquery-rails', '~> 3.0.0'
gem 'bootstrap-sass', '~> 2.3.0.0'
gem 'font-awesome-sass-rails', '~> 3.0.2.2'
gem 'uglifier', '>= 1.0.3'
gem 'modernizr-rails', '~> 2.7.1'
gem 'jquery-payment-rails', :git => 'https://github.com/thoughtbot/jquery-payment-rails.git', :ref => 'd401bf9' # CHANGED
gem 'jquery-validation-rails', '~> 1.13.1'
end
group :development, :test do
gem 'test-unit', '~> 3.0'
gem 'rspec-rails', '~> 3.4.0' # CHANGED
gem 'factory_girl_rails', '~> 4.5.0'
gem 'mongoid-rspec', '~> 3.0.0' # CHANGED
gem 'guard-rspec', '~> 4.6.4'
gem 'simplecov', '~> 0.10.0', require: false
end
group :test do
gem 'database_cleaner', '~> 1.5.1'
gem 'faker', '~> 1.5.0'
end
You should probably run bundle update after this changes, but be careful since this updates ALL gems according to your Gemfile.