I\'m trying to run newly created project in Rails 4.0.8 but I receive and error:
rails s
=> Booting WEBrick
=> Rails 4.0.8 application starting in
In Ruby 2.4, there was a unification of integer types (i.e. Fixnum
and Bignum
are now the very same thing: Integer
). This results on quite a few incompatibilities with existing gems which relied on the distinction of the classes.
Older versions of ActiveSupport are among those which don't like this unification and barf over it when trying to serialize data. As such, you have one of two options:
In regards to the error, you're running the just-released Ruby 2.4, which Rails and ActiveSupport (especially older versions of these) most likely don't support yet.
This Rails guide states your Rails version (4.0.8) prefers Ruby 2.0.
You can fix the error by either upgrading your Rails installation (gem 'rails', '5.0'
) or downgrading to an older version of Ruby with a version manager (e.g. $ rvm install 2.3.0; rvm use 2.3.0
).
I have the same error, but I don't want to upgrade to 5.0, my app is very big and upgrate take too many time. I'm upgrading the Rails 4.1.7
to the Rails to 4.2.8 first Rails release with Ruby 2.4
support:
in the Gemfile:
gem 'rails', '4.2.8'
Then:
bundle update rails