top | item 4992808

Get Your App Ready for Rails 4

75 points| blacktulip | 13 years ago |rubysource.com

31 comments

order
[+] danso|13 years ago|reply
FYI, here's what's new specifically for ActiveRecord 4, relevant for those of us who are using other frameworks (Sinatra, Padrino) that leverage Rails components:

http://blog.remarkablelabs.com/2012/12/what-s-new-in-active-...

The official edgenotes has sections for all the Active components:

http://edgeguides.rubyonrails.org/4_0_release_notes.html

[+] mgkimsal|13 years ago|reply
Why are the dynamic finders being deprecated? Is it a speed/parsing thing? Or changing styles?
[+] j45|13 years ago|reply
This is a really nice and handy guide, thanks! On a side note, having coded in many languages, I'm still a little at a loss for words that code breaking with new versions is tolerated.

Several of my talented friends spend too much time precariously managing their old Ruby codebases. I hope it keeps improving to make life easier.

[+] nickbarnwell|13 years ago|reply
Code breaking for patches and security enhancements is widely viewed as unacceptable, but this is the first occasion I've seen someone accept to breaking changes in a major release. Neither Rails 2 nor Rails 3 were fundamentally broken, and there's nothing stopping you from keeping an application on those releases.
[+] ollysb|13 years ago|reply
This is a question of taste really. Do you favour continuous improvement or stability? Personally I prefer the continuous refinement approach that rails takes. It's definitely not for everyone though.
[+] irahul|13 years ago|reply
As bad as breaking changes sound, keeping historical baggage isn't ideal as well. I don't know about your friends, but if this is all that has changed, it would be a simple migration provided you already are on 3.2.
[+] michaelmartin|13 years ago|reply
Great summary here, love the 3.2/4.0 side by side examples. I wondered why it hadn't mentioned the new background queue API though, only to find that's been pushed back out of 4.0 now. Just wanted to mention here incase anyone else hadn't seen that that has been taken out.
[+] ejpastorino|13 years ago|reply
Hi, Thanks all for the comments!

I didn't include queues, live streaming, and other features because unfortunately they are not available as a separate gems.

I tried to cover all the things that are possible now (via gems or simple code change). Maybe in a future post I'll cover all the new things in Rails 4. But as it's still on development I prefer to wait until a beta or release candidate.

[+] viseztrance|13 years ago|reply
Actually I think the queue system won't be included just yet.
[+] holgersindbaek|13 years ago|reply
Does this mean that Rails will be released within a week or so?
[+] joevandyk|13 years ago|reply
No, it's a couple months out probably. There needs to be a couple release candidates first.
[+] rustc|13 years ago|reply
Are there any instructions to try out Rails 4 right now? And any major gotchas still left to be fixed?

Excellent post BTW.

[+] kawsper|13 years ago|reply
Test with edge Rails by uncommenting out your normal Rails-line in your Gemfile, and add this:

# Bundle edge Rails instead:

gem 'rails', :git => 'git://github.com/rails/rails.git'

[+] sergiotapia|13 years ago|reply
Turbolinks seems really, really nifty! It may have been released a long time ago but it's the first time I see a technique like this.

Does anybody know how this technique affects SEO?

[+] nachteilig|13 years ago|reply
Turbolinks still currently breaks a lot of things, including lots of .ready JS stuff.
[+] kmf|13 years ago|reply
Awesome! I've seen a lot of little coverage on some of these topics but this is about as comprehensive as I think we'll find without any sort of release notes.
[+] hayksaakian|13 years ago|reply
I saw no mention of live streaming.

The removal of 'match' in routes is a little saddening....

I'm not sure how I feel about the concerns abstraction.