Rails 4.2.10.rc1 released

Hi everyone,

I am happy to announce that Rails 4.2.10.rc1 has been released!

Per our release policy Rails 4.2 is no longer supported except for severe security fixes, but the last release introduced some regressions that warranted a release.

If no new regressions are found, expect the final release on Wednesday, September 27, 2017. If you find a regression, please open an issue on GitHub and mention me (@eileencodes) on it.

CHANGES since 4.2.9

The following gems had changes since 4.2.9. You can read about the specific changes in the changelogs on GitHub:

The remaining gems (Action Mailer, Action View, Active Job, Active Model, Active Support, and Railties) had no changes.

Full list of changes

To see the full list of changes, check out all the commits on GitHub.

SHA-256

If you’d like to verify that your gem is the same as the one I’ve uploaded, please use these SHA-256 hashes.

Here are the checksums for 4.2.10.rc1:

$ shasum -a 256 *-4.2.10.rc1.gem
91f279396cd0757784445294a0422c37113a6d49c856ed1b6ce60cd2d6cd4c57  actionmailer-4.2.10.rc1.gem
2f582b5c3b42dea2a877af76812168ad721b583f501c748c32699686d8996c6e  actionpack-4.2.10.rc1.gem
1f587908650b6e96a500de3ccbeb229e8ffe1b8a06bbadc930acad762dd70503  actionview-4.2.10.rc1.gem
b68b1e2475e6cb118a66c9b1daa172965b634b311e81e6ec686f819f0c71c1c4  activejob-4.2.10.rc1.gem
18507309ed0f00f5a6ffc09da1df5076f016f516ce8e7afe2b4138353ca7c915  activemodel-4.2.10.rc1.gem
53a094625fe76d353d95cfd5cf0d989e5f0f18572cded546e3942e2647fdac5e  activerecord-4.2.10.rc1.gem
e4bb02e67d57e9c52fbe0f90b367eb653f4906351b470ce60b34556bb5710b96  activesupport-4.2.10.rc1.gem
9e43e2cda17c4d68b65eff9ef4df6c62c87a0f5779a612fd3dc06e80f0182c7c  rails-4.2.10.rc1.gem
360a5c67a78c5fffaa27c6caa6ae4663d49ab675507ed61f95d2f51869b671b4  railties-4.2.10.rc1.gem

As always, huge thanks to the many contributors who helped with this release.

Rails 5.1.4 and 5.0.6 released

Hi everyone,

I am happy to announce that Rails 5.0.6 and 5.1.4 have been released.

CHANGES since 5.0.5

To view the changes for each gem, please read the changelogs on GitHub:

Full listing

To see the full list of changes, check out all the commits on GitHub.

CHANGES since 5.1.3

To view the changes for each gem, please read the changelogs on GitHub:

Full listing

To see the full list of changes, check out all the commits on GitHub.

SHA-256

If you’d like to verify that your gem is the same as the one I’ve uploaded, please use these SHA-256 hashes.

Here are the checksums for 5.0.6:

$ shasum -a 256 *-5.0.6.gem
8321d86a6bb9ec85b5189093139bbdfb87ad1935166e5c0eac422068a2a6e515  actioncable-5.0.6.gem
bb1113dd020f310fc7948bd13766eeab6cf975a0e1322c8a10cd12adbcacea4f  actionmailer-5.0.6.gem
1866fbaafcba1a6f23ea075f0c7add8980f99d2f2ddc37032d4b62033b39bf8d  actionpack-5.0.6.gem
6d256fba84733b0dc8a22de7264ceb77ef2ddeae2913632300c76182ecd6d36d  actionview-5.0.6.gem
78190e9f3ab0185734a123907cfa1b847e96d4b1303dcb8304e8bb0d26e64bcd  activejob-5.0.6.gem
f8f7d7e18df7fef01c1c299619c60e9b2becafc141450c3482b95ea85b6eebd6  activemodel-5.0.6.gem
f0065962596bb8d483e0e308bca2611357e4844e86a9d53a99bbee826aa85a19  activerecord-5.0.6.gem
e6f98107623edb19cc25ca2aab134b857f291529ab37a1d00b47560d30a6053d  activesupport-5.0.6.gem
a86663f8d0d4dd0cb07272394a6d0c7d250be617c6efe77edd2ebc9c9d139746  rails-5.0.6.gem
b05fbd99673637408badc3da8988aa76c9f245d9f0202dc65389e6b619e97772  railties-5.0.6.gem

Here are the checksums for 5.1.4:

$ shasum -a 256 *-5.1.4.gem
47d968f5636aa2ee88cb6306a7cb8b426b2156c93851628a354cae9139d56916  actioncable-5.1.4.gem
5ae798850bd284f803cc006887d6b089692183a8c192393436c519bd6ec598e9  actionmailer-5.1.4.gem
f5d0e747051923f19d932bbc5c274353d026d3b4aaf9504f240161330555e4c6  actionpack-5.1.4.gem
302f398a86337818e6f4225934b136436cab5fdfe2fcd6dd7509b1f595a417c2  actionview-5.1.4.gem
f7814fdf4a7592f7f6774f68c5adec53cbcbf825a61bae91219c730ba1cb6bca  activejob-5.1.4.gem
4008ad8f54e149ddf3a7173aba743bf8b39e4eba517e91ba8704aea739129a63  activemodel-5.1.4.gem
89be7874c962070c47ce52ea1182b9920c40f74f27da6d43670ed976aeb2413e  activerecord-5.1.4.gem
9969d4fdc7e1fad82f02f457b03995baa74928e99f73d035564c9eec7426ee69  activesupport-5.1.4.gem
5cc2192045678789e5e7b289476af8bc0a79210ee6713886200cb303ed6f98b8  rails-5.1.4.gem
e477f332b4810f634b58a33c3accdebcfb9d3ab1f4b7b3ed204269d6b1a28001  railties-5.1.4.gem

As always, huge thanks to the many contributors who helped with this release.

This Week in Rails: engine screenshots, method redefinitions and more!

Oh, hello there! I’m Tim, and if you’re reading this that means you’ve got Rails fever! It’s time for your weekly dose of This Week in Rails….

This Week’s Contributors

This week 21 people contributed to Rails, including 4 for the first time! If you’d like to join them and perhaps get a slot in next week’s edition, why not check out the list of open issues?

Support multiple version arguments for gems in generators

The gem method can now support multiple version constraints, just like in rubygems!

Make take_failed_screenshot work within engine

This method used to get the tmp directory relative to Rails.root, which in an engine points to the dummy application, where no such directory exists. This was fixed by using the path relative to the current directory instead.

Clarify intentions around method redefinitions

This fixed a race condition in class_attribute, which in redefining an attribute had to remove it first and then redefine it. If another thread was trying to access that attribute in the middle of that, it would raise a NameError. Thankfully no more!

….and that’s a wrap! As always, there is never enough time or space to cover every change this week, but we value each and every one. If you’d like to know more you can check out the full list of changes yourself. See you next time!

Webpacker 3.0: No separate process needed, less config generated

We’ve just made it even easier to use Webpack with Rails with this third major release of Webpacker. The two big changes are that a separate process is no longer needed in development and that the vast majority of the config now lives in the Webpacker npm package, so your config/ directory stays clean and updates are much easier.

We nixed the need for the separate process by allowing Webpacker to compile on-demand in development as well as testing. We’ve done a lot of work to speed up this process, and for lots of apps, the performance will be more than fine. But if you have a huge app, or if you like live reloading or hot module replacements, you can still use the bin/webpacker-dev-server. Webpacker will automatically detect if this process is running and start serving packs from there rather than on-demand. Really slick.

We also dramatically cut down on the amount of config boilerplate that’s generated in the Rails config/ directory. All the standard stuff is now living inside the Webpacker npm module, which makes upgrading so much easier. And you can still overwrite any of the defaults as you please. So it’s a big win all around.

Additionally, we’ve moved all the compilation and clobber logic out of the Rake tasks and into the Webpacker singleton instance itself. This makes it easier to use Webpacker in custom setups, like if you don’t use Yarn or have a different deployment strategy than just assets:precompile.

This follows from a large refactoring of the Webpacker internals. Gone are the many individual singletons, replaced by a single top-level singleton that just aggregates a normal set of classes for configuration, compilation, and so on.

Webpacker 3.0 points to what a Webpack-by-default strategy could look like in Rails 6.0. One where the asset pipeline focuses on static assets, like images, fonts, sounds, and compiled CSS, using SASS and so on, but bows out of the JavaScript compilation game. We still haven’t pinned the final approach, but this is our best current take on how the two could split the work-load of dealing with JavaScript, stylesheets, and other assets in the next big Rails release.

If you haven’t yet given Webpack, ES6-flavored JavaScript, and all the other modern improvements to the client-side development experience a spin, then Webpacker 3.0 is a great place to start. At Basecamp, we’re already using it in production, even though we don’t use any of the big JavaScript client-side frameworks. It works great with the Turbolinks + Action Cable + Vanilla JS approach too.

And if you’re looking to use React, Vue, Angular, or Elm with Rails, Webpacker makes the whole thing so much easier. We still have a bunch of Hello World generators for these four frameworks, so you can get started with development without any manual drudgery of configuration.

This major new release has many contributors, but I want to especially thank Gaurav Tiwari and Javan Makhmali for their big, continued contributions. Enjoy!

Image alt text gone, restart/cache command fixes and more!

Hello everyone!
This is Vipul from Rainy Pune ☔ , cozying up with a ☕, bringing you a recap of the changes  that made it to Rails this week.
If you too want to contribute to Rails, head over to the issues to help us out!

Do not generate default alt text in image tags

Previously Rails auto-generated alt text for an image from the file name if it was not provided with an image_tag. This generation could be distracting and fatiguing for screen reader users if not considered properly.

After this change, if authors leave images without alt text, Rails will not pre fill it anymore, leaving screen readers to prompt authors to fix the issue.

Prevent extra “SET time zone” in configure_connection

Previously Rails would end up setting database connection timezone twice, once if passed via configuration in configure_connection and secondly while setting default timezone.

This change removes setting timezone on database twice if timezone is already passed via configuration variables.

Add TransactionTimeout for MySQL error code 1205

This PR adds TransactionTimeout error to the MySQL adapter, which handles the error:
Lock wait timeout exceeded; try restarting transaction (MySQL error 1205)

Encode Content-Disposition filenames according to RFC 2231 in Active Storage

Before this change, urls for files with non-english names would create issues in Active Storage.

This change fixes encoding Content-Disposition for filenames to RFC 2231, to fix this issue.

For signed/encrypted cookies with ``:expires` like

cookies.signed[:user_name] = { value: "bob", expires: 2.hours }

Rails now embeds the expiry within the written cookie payload. This way Rails isn’t reliant on clients to honor the expiry, but can verify it independently server-side.

Make restart and dev:cache tasks work when customizing pid file path

Previously rails dev:cache failed to restart the Rails server when it was started with a custom pid file path.
With this change, restart no longer fails for a custom pid file and successfully restarts Rails server on dev:cache changes.

Fix can't modify frozen String error in display_image

This change does a quick fix for an error with display_image in System tests, which is used for screenshots, that used to raise an error when trying to modify a frozen string.

Fixes :inverse_of association option not working with eager_loading

Previously calling an eager_load on :inverse_of association failed. This was a regression from Rails 5.1 release. 

This change, fixes the regression.

That’s all for this week! Feel free to check the full list of commits if you are interested. Until next week!

Rails 5.1.4.rc1 and 5.0.6.rc1 released

Hi everyone,

I am happy to announce that Rails 5.0.6.rc1 and 5.1.4.rc1 have been released.

If no regressions are found, expect the final release on Tuesday, August 29, 2017. If you find one, please open an issue on GitHub and mention me (@eileencodes) on it, so that we can fix it before the final release.

CHANGES since 5.0.5

To view the changes for each gem, please read the changelogs on GitHub:

Full listing

To see the full list of changes, check out all the commits on GitHub.

CHANGES since 5.1.3

To view the changes for each gem, please read the changelogs on GitHub:

Full listing

To see the full list of changes, check out all the commits on GitHub.

SHA-256

If you’d like to verify that your gem is the same as the one I’ve uploaded, please use these SHA-256 hashes.

Here are the checksums for 5.0.6.rc1:

$ shasum -a 256 *-5.0.6.rc1.gem
0490ac6c4621756871839ad584f0a0349a72a9ccdeac0f72dafd3539638ba5ef  actioncable-5.0.6.rc1.gem
fc7697724d884307bf2ea307c028902f71f96304b9a882418e6ec94d10202cd9  actionmailer-5.0.6.rc1.gem
b0f1f4479f61ada80b3dbe3e9ccaa0db390119918e5da632dda3c8398e6e4f5f  actionpack-5.0.6.rc1.gem
673d06523edf733163ad668fe3cd64bd1c7fb97244c952241d1e00ee6835101b  actionview-5.0.6.rc1.gem
ac6521d4df459db19fc0f2740d0e0c0a6f3102252c8124ecb25e8d33335d6cf4  activejob-5.0.6.rc1.gem
0824cd58f175a3c825dce9d42d73254d25af25d824ae1c5c3465f12bb0812f72  activemodel-5.0.6.rc1.gem
7972a8a76c711b8fc01ab52d95c4f16a73e9683e4d745a17d61ab91051df856c  activerecord-5.0.6.rc1.gem
40f0c77de7e54b6a3581272ce5b6409ae0c61b5bfad3239db46807d8342ce8a3  activesupport-5.0.6.rc1.gem
7873311d5340bffbabeb33cb9d3ce2c97056bc2bebad3abfcba6f5b38b209075  rails-5.0.6.rc1.gem
3fd4b347f19fb4ff2ec7cee4c9a45aba31d1e287583943269bc9d09bef61ca93  railties-5.0.6.rc1.gem

Here are the checksums for 5.1.4.rc1:

$ shasum -a 256 *-5.1.4.rc1.gem
6ebb05e31a5d46379f638092742aa1543ab3522302a62351de9e5dc746fc7c77  actioncable-5.1.4.rc1.gem
fb3e3743a29a70524c64caa656056f7cf0085998a1438b28325c6e10a6330efd  actionmailer-5.1.4.rc1.gem
c4b39e9b721a4b2eb37be9f18bfbc0a479b61ae4d6b536b1b9f2fc06f83f6ad8  actionpack-5.1.4.rc1.gem
9930cccacbe71085b894ca0410da07625b801c4db1775b655357bd2bf5824ae9  actionview-5.1.4.rc1.gem
e0c7610f4fe20c778e5f9739f80ae4d5d3450bbacff49d24064b0b3b048f9dd6  activejob-5.1.4.rc1.gem
11dae082bd1dfea9541a60501135bef6c32d792407dea57250dc95ba5e415a77  activemodel-5.1.4.rc1.gem
3b058a80c8f14c324dad4c185825a4ce4c4f853af37002bec92e179bef583fcb  activerecord-5.1.4.rc1.gem
c9984249c0200e9c1f462779294e0cec6bb6c8b95421dc01b579a0efa2db6561  activesupport-5.1.4.rc1.gem
c8134e1efcc5f17ac28927a76423146f3a7baf618d97a5d752d09edf4c5eeb7c  rails-5.1.4.rc1.gem
7589a79f6b4a4de73d2d427193eb9beacd1628530958dd4d8f9404531748a973  railties-5.1.4.rc1.gem

As always, huge thanks to the many contributors who helped with this release!

Better docs, better performance, better Rails!

Hello everyone! This is Claudio with a recap of the main commits that made it into rails/rails this week. If you too want to contribute to Rails, this outstanding Active Record issue is a great place to start.

Temporarily point to a fork of SDoc

A work in progress to improve the documentation of Rails with a nicer theme, better SEO and faster generation time. Can you spot the difference between the current and the future version?

Minor tweaks in Active Storage documentation

Two weeks ago, Active Storage made it into rails/rails. This week its documentation has been improved to make it ready to ship with Rails 5.2.

Faster and more readable implementation of Hash#deep_merge

If you want to learn how to use benchmarks to prove that a commit can improve the performance of Rails, this is a great example.

Eager-load controller actions to reduce response time of the first request

The list of available actions for a controller is now eagerly loaded  to reduce response time of the first request and the memory footprint when running on forking server like Unicorn.

Load Parameters configurations on :action_controller only once

This PR fixes a regression introduced in 5.1.3 by which UnpermittedParameters were not raised as expected.

Check :scope input in Uniqueness validator

Without this patch, calling something like validates_uniqueness_of :code, scope: [archived: false] would cause NoMethodError with a trace into AR internals.

Add binary helper method to fixtures

You can now more easily use binary data as fixtures.

Add --skip-yarn option to the plugin generator

Don’t include yarn in your engines if you don’t need it.

Allow serialize with a custom coder on json and array columns

Better control on how to store your data.

Bump thor and blade

Thor 0.20 has new features you might want to look at.

That’s all for this week! Feel free to check the full list of commits if you are interested. Until next week!

Three new committers: George, Javan, Ryuta

We’re happy to announce three new members of the Rails committers team: George, Javan, and Ryuta 🎉!

  • George Claghorn: George has been an integral part in creating our new Active Storage framework. He wrote a substantial part of the framework itself by extracting hard-won lessons from his work at Basecamp on moving our storage to the cloud. George also managed the stand-alone rails/activestorage repository with issue and PR processing prior to its merge into the framework proper. George works at Basecamp and lives in Philadelphia.

  • Javan Makhmali: Javan has written the majority of the JavaScript needed for Action Cable and Active Storage, as well as being a significant contributor to Webpacker. He’s also the co-author of Trix and other JavaScript libraries and frameworks originating at Basecamp. Javan lives in Ann Arbor.

  • Ryuta Kamizono: Ryuta is a top 20 all-time Rails contributor with work going back to 2013. He’s got his fingerprints all over the framework, but have in particular been helping with Active Record. Ryuta lives in Tokyo.

As a reminder, the committer team works together with the core team by assisting with pull-requests processing and making changes to the framework, but does not have the keys to make final releases or set policy. All members of the core team came up through working on this team.

Rails 5.1.3 released

Hi everyone,

I am happy to announce that Rails 5.1.3 has been released.

CHANGES since 5.1.2

To view the changes for each gem, please read the changelogs on GitHub:

Full listing

To see the full list of changes, check out all the commits on GitHub.

SHA-256

If you’d like to verify that your gem is the same as the one I’ve uploaded, please use these SHA-256 hashes.

Here are the checksums for 5.1.3:

$ shasum -a 256 *-5.1.3.gem
4cfe1343217caa199ce2a2de485a62271b0c81e8c3cf72f7c039c5eddf3c7bd0  actioncable-5.1.3.gem
a2841384bb40951e6d63ca78ca665bdfcc792c732825cc2c83ae4b4d05363f67  actionmailer-5.1.3.gem
55488d20cac3668040f0d2d5531e81318a0fa206ac8f687565c6ec49345c9f45  actionpack-5.1.3.gem
b744e9cbb2760754fa4c3c2b57c68916756a5f032fa6307ca362379e02a48857  actionview-5.1.3.gem
15e98c4bf71941ae81f7e4e7c5d9627c09cd9b4d0c1a36bf94b42910eb8874a3  activejob-5.1.3.gem
ad3aa2e0dd9a003ea530e0806dd685e9c5574bfa36bb28aa3d182577c121babb  activemodel-5.1.3.gem
e83b04f42519e94a0aa51af06e61ea8aaacfa5cb8d67a1aebaf6f11d96ba7725  activerecord-5.1.3.gem
b01fa04345c87526fd22affc4e46dd22bf125c608853d13bf093dab08c45219b  activesupport-5.1.3.gem
28c73c5aba5ce71d4bcd6af273be3e565ab7a49abd22fd511dc79fcb36329d19  rails-5.1.3.gem
9aa1b3abd29a7d71b3f9d04dfce2858a2e86841dd7f3dc696344000c745b1651  railties-5.1.3.gem

As always, huge thanks to the many contributors who helped with this release.

Rails 5.0.5 and 5.1.3.rc3 released

Hi everyone,

I am happy to announce that Rails 5.0.5 and 5.1.3.rc3 have been released.

If no regressions are found for 5.1.3.rc3, expect the final release on Thursday, August 3, 2017. If you find one, please open an issue on GitHub and mention me (@kaspth) on it, so that we can fix it before the final release.

CHANGES since 5.0.4

To view the changes for each gem, please read the changelogs on GitHub:

Full listing

To see the full list of changes, check out all the commits on GitHub.

CHANGES since 5.1.2

To view the changes for each gem, please read the changelogs on GitHub:

Full listing

To see the full list of changes, check out all the commits on GitHub.

SHA-256

If you’d like to verify that your gem is the same as the one I’ve uploaded, please use these SHA-256 hashes.

Here are the checksums for 5.0.5:

$ shasum -a 256 *-5.0.5.gem
479efb52e6b6fedfcafcd3530be24dc7b9829dd41e0f5a37212ed4d67146f51b  actioncable-5.0.5.gem
c48a93381dde7206fd2cb0ddc00a922021fcdf6bce35c262bd357c7922a63fb7  actionmailer-5.0.5.gem
2202866aded8d787efb4c3a7e6d4f55262ac4f2acfe92c097855a9afc8229f37  actionpack-5.0.5.gem
cb4d2928b63f29931a6d05adde78bcf7dac83bf79a05911547068af2da765a6b  actionview-5.0.5.gem
af79fc954e9ddece35ef4975b9a244b2bb48a76e17a19c0dff7233fc75852877  activejob-5.0.5.gem
e6b8fc4ffb6ab748b28e5a234d1d2f3e49689b0655166e188014a582b50cdee2  activemodel-5.0.5.gem
89651a138aaf0755d2a9db7cda3e914e93f86b4504bcb31b41fb379e2dde28de  activerecord-5.0.5.gem
00c714979fffa05846a2d044f24f9569a5ae471b2e20c73fdf3172f1d81edfb1  activesupport-5.0.5.gem
15e2c25872e5dc2069b0d7bf4535eb4887e77d49166ccfba5871a904c18957b1  rails-5.0.5.gem
5b1cb323c3fa70ff5801f58fbb9688a8231a4cc0414d3c97d0ad0a5bc94fbefb  railties-5.0.5.gem

Here are the checksums for 5.1.3.rc3:

$ shasum -a 256 *-5.1.3.rc3.gem
f1b9758a78543bb27f65946a65a94e803140787b781f24983c696d89315685ea  actioncable-5.1.3.rc3.gem
8c57af610a7bac0cd91c0b09a0df2f66575ddb20204342b98d28bd6d051578b0  actionmailer-5.1.3.rc3.gem
9e69dcef628dbe12b5937a368e55ac79b71b38261d4187465200352d5278572d  actionpack-5.1.3.rc3.gem
d93ac77d4d6d2fa468a7407fda4088c9ca975aa00e78c18dd2b71e398af3b3dd  actionview-5.1.3.rc3.gem
2d0410f1a279b27e4bacddca4a8bc1f88c0e8c18429751370be8d41fb630cba9  activejob-5.1.3.rc3.gem
987567e336267497cb9222e4e689f58bfd06e9829071ae32d65b9a291fb0e8b3  activemodel-5.1.3.rc3.gem
159c9d330cec1ac9a92c9e0c68f0f088b4273f0ba163c3159f4a7369d9948229  activerecord-5.1.3.rc3.gem
6d4320c2e93e9f6239438cf7886b1111956b5d72cb5a7026402fa29021ae571f  activesupport-5.1.3.rc3.gem
f3551c5eec9649bc225552e0ed8ecee6dac9f4f97ca13e78bf018e36385852e8  rails-5.1.3.rc3.gem
59669b8098787c077b76642804a1543cdca8fabafabad7bbce74622508f79a3d  railties-5.1.3.rc3.gem

As always, huge thanks to the many contributors who helped with this release.