What's Coming in Rails 5
Rails 5As has become tradition, a new full version release of Rails is coming just two years after the release of Rails 4. This new version progresses the platform by bumping the underlying minimum Ruby version and adds a slew of neat features to keep Rails feeling fresh and new.
Ruby 2.2.2 is required in Rails 5 because Rails 5 will take advantage of the new Symbol Garbage Collection found in Ruby 2.2. There is also rumor of Rails 5 using the Incremental Garbage Collection found in Ruby 2.2. They have decided to use Ruby 2.2.2 since Ruby 2.2 had a major security vulnerability that is patched in 2.2.2.
https://github.com/rails/rails/pull/19257 Ruby 2.2.1 PR
rails new <application name> --api and Rails will create your new API app all on its own!
Action Cable is the feature I am most excited about. Simpler web sockets for Rails. Anytime anyone says web sockets to me I cringe a little just because of how complicated they can be to set up. Many have tried to make the problem easier and Action Cable is Rails' way of giving it a try.
Rake or Rails
The beginner's dillema, do I use
rake db:migrate or
rails db:migrate, is it
rake test or
rails test? Doesn't matter anymore, it's all
rails. From Rails 5 on the
rails command can be used to run
rake commands. Simple change but a nice one.
Rails 5 is beginning a push to deprecate Controller tests all together in favor of Integration tests. As part of that they are deprecating
assert_template in controller tests. Aaron Patterson has a great keynote from Railsconf where he outlines the speed improvements made to the Rails testing environment and why Integration tests will be the way to go.