Reputation: 412
I'm trying to set up ruby on rails to start studying it but I keep getting this error when I run bundle install.
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
rails (~> 5.2.0) was resolved to 5.2.0, which depends on
actionpack (= 5.2.0)
simple_form (~> 3.0.2) was resolved to 3.0.4, which depends on
actionpack (~> 4.0)
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (~> 5.2.0)
Could not find gem 'rails (~> 5.2.0)' in any of the sources.
My Gemfile is this:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.5.1'
gem 'rails', '~> 5.2.0'
gem 'sqlite3'
gem 'puma', '~> 3.11'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.2'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'devise', '~> 3.4.1'
gem 'simple_form', '~> 3.0.2'
gem 'haml', '~> 4.0.5'
gem 'bootsnap', '>= 1.1.0', require: false
group :development, :test do
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
group :test do
gem 'capybara', '>= 2.15', '< 4.0'
gem 'selenium-webdriver'
gem 'chromedriver-helper'
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Can somebody help me out? I'm really new to rails, in fact I'm trying to start learning it, so I have no clue on how to solve this.
Upvotes: 2
Views: 6375
Reputation: 1099
The problem is that devise and simple_form gems are outdated and not compatible with the current version of rails.
You could try to install newer versions like this:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.5.1'
gem 'rails', '~> 5.2.0'
gem 'sqlite3'
gem 'puma', '~> 3.11'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.2'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'devise', '~> 4.5.0'
gem 'simple_form', '~> 4.0.1'
gem 'haml', '~> 4.0.5'
gem 'bootsnap', '>= 1.1.0', require: false
group :development, :test do
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
group :test do
gem 'capybara', '>= 2.15', '< 4.0'
gem 'selenium-webdriver'
gem 'chromedriver-helper'
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
then run bundle install
Also consider updating the haml gem if you want:
gem 'haml', '~> 5.0.4'
instead of gem 'haml', '~> 4.0.5'
then run bundle update
Upvotes: 4