是否有人成功安装了D3js gem for rails。 我有最近的版本,gem'd3js-rails','〜> 3.1','> = 3.1.6' 当我捆绑安装时,我收到一条消息,说捆绑器无法找到兼容版本:
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)
我的宝石文件如下所示:
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]
实际问题是什么?安装d3js-rails有没有类似的问题?
答案 0 :(得分:1)
安装成功后发现没有问题。 建议:尝试更新您的rubygem管理器,rails&amp;安装宝石,如果它们不是最新的。您的宝石似乎存在兼容性问题。 宝石更新 - 系统&amp;&amp;宝石更新
否则: 使用
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'
而不是您当前的版本,然后使用
bundle update
然后
bundle install.
希望这会奏效。 祝你好运!