Error updating from Rails 3.2 to Rails 4

When upgrading to Rails 4, the following error occurs:

Bundler could not find compatible versions for gem "railties": In Gemfile: rails (= 4.0.0) ruby depends on railties (= 4.0.0) ruby sass-rails (~> 4.0.0) ruby depends on railties (4.0.0.rc2) 

My gemfile looks like this:

 source 'https://rubygems.org' ruby '2.0.0' gem 'rails', '4.0.0' gem 'sass-rails', '~> 4.0.0' gem 'coffee-rails', '~> 4.0.0' # Other gems 

Any help would be greatly appreciated.

Update

The whole gemfile below

 source 'https://rubygems.org' ruby '2.0.0' gem 'rails', '4.0.0' gem 'sass-rails', '~> 4.0.0' gem 'coffee-rails', '~> 4.0.0' gem 'less', '~> 2.3.1' gem 'uglifier', '>= 1.0.3' gem 'therubyracer', '0.11.0', platforms: :ruby gem 'less-rails-fontawesome', '~> 0.4.0' gem 'hogan_assets', '~> 1.5.1' gem 'datejs-rails', '~> 2.0.1' gem 'flot-rails', '~> 0.0.3' gem 'jquery-rails', '~> 2.1.2' gem 'jquery-ui-rails', '~> 4.0.3' gem 'pg', '~> 0.14.1' gem 'pg_search', '~> 0.5.7' gem 'devise', '~> 2.2.4' gem 'cancan', '~> 1.6.9' gem 'slim-rails', '~> 1.1.0' gem 'less-rails-bootstrap', '~> 2.3.2' gem 'rmagick', '~> 2.13.1' gem 'mime-types', '~> 1.19' gem 'carrierwave', '~> 0.7.1' gem 'kaminari', '~> 0.14.1' gem 'carmen-rails', git: 'git://github.com/jim/carmen-rails.git' gem 'pacecar', '~> 1.5.3' gem 'ancestry', '~> 1.3.0' gem 'acts-as-taggable-on', '~> 2.3.3' gem 'state_machine', '~> 1.1.2' gem 'dynamic_form', '~> 1.1.4' gem 'simple_form', '~> 2.1.0' gem 'rdiscount', '~> 1.6.8' gem 'nokogiri', '~> 1.5.6' gem 'htmlentities', '~> 4.3.1' gem 'bootstrap-wysihtml5-rails', '~> 0.3.1.14' gem 'settingslogic', '~> 2.0.9' gem 'simple-navigation', '~> 3.9.0' gem 'range_validator', '~> 0.2.1' gem 'valid_email', '~> 0.0.4' gem 'ransack', '~> 0.7.2' gem 'mongoid', '~> 3.1.3' gem 'bson_ext', '~> 1.8.2' gem 'rails3-jquery-autocomplete', '~> 1.0.10' gem 'validates_timeliness', '~> 3.0' gem 'time_diff', '~> 0.3.0' gem 'responders', '~> 0.9.3' gem 'tenacity', '~> 0.6.0' gem 'puma', '~> 1.6.3' gem 'redis', '~> 3.0.2' gem 'country_select', '~> 1.1.3' gem 'sidekiq', '~> 2.7.5' gem 'action_presenter', '~> 1.1.6' gem 'bootstrap-datetimepicker-rails', '~> 0.0.10' group :development do gem 'bullet', '~> 4.3.0' gem 'uniform_notifier', '~> 1.1.1' gem 'battlestation', '~> 0.0.3' gem 'libv8', '3.11.8.4', platform: :ruby gem 'foreman', '~> 0.61.0' gem 'better_errors', '~> 0.3.2' gem 'binding_of_caller', '~> 0.7.1' gem 'meta_request', '~> 0.2.1' end group :development, :test do gem 'rspec-rails', '~> 2.13.0' gem 'fakeweb', '~> 1.3.0' gem 'timecop', '~> 0.5.7' gem 'quiet_assets', '~> 1.0.1' gem 'forgery', '~> 0.5.0' gem 'seedbank', '~> 0.2.0' gem 'factory_girl_rails', '~> 4.1.0' gem 'mongoid-rspec', '~> 1.5.6' end group :test do gem 'capybara', '~> 2.0.2' gem 'capybara-webkit', '~> 0.14.1' gem 'launchy', '~> 2.2.0' gem 'shoulda-matchers', '~> 2.0.0' gem 'database_cleaner', '~> 0.9.1' gem 'rspec-html-matchers', '~> 0.4.0' end 
+4
source share
2 answers

The problem is not in the sass-rails declaration. It must be one of the other gems.

Everything worked after I included only the following stones in my Gemfile.

 source 'https://rubygems.org' ruby '2.0.0' gem 'rails', '4.0.0' gem 'sass-rails', '~> 4.0.0' gem 'coffee-rails', '~> 4.0.0' 

One of the other stones should have an addiction problem. I will update my answer when I find out what it is.

+2
source

his gem addiction problem. you will have to wait for the sass rails to be updated or reprogrammed and upgrade gemspec to allow rails 4.0.0

This is quite common for gems right after the new version. The joys of life on the edge.

0
source

Source: https://habr.com/ru/post/1488517/


All Articles