我正在尝试在Cloud9中的Rails应用上设置MongoDB。 我已经安装了Rails 5.0.1和MongoDB,但是我的gemfile出现了问题。
这是我的宝石文件:
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]
当我运行'bundle install'时,我收到以下错误:
Bundler找不到gem“activemodel”的兼容版本:
在Gemfile中:
mongoid(> = 5.1.3,〜> 5.1)被解析为5.1.3,这取决于 activemodel(〜> 4.0)
rails(= 5.0.1)已解析为5.0.1,这取决于 activemodel(= 5.0.1)
rails(= 5.0.1)已解析为5.0.1,这取决于 activemodel(= 5.0.1)