
Rails 5.0.0.rc1 - bdcravens
https://github.com/rails/rails/tree/v5.0.0.rc1
======
whizzkid
It is great to see another milestone is almost done and stable version will be
released soon.

Highlights for me will be:

\- Actioncable (real-time communication over websockets)

\- Rails-API is merged into core.

\- Min ruby version is 2.2 (performance improvements via Garbage Collector)

\- Little bit of code cleanup (less code to run)

\- Turbolinks 3 (single-page applications)

\- Evented file system monitor (faster development environment)

I think they have done a great job with the release. Especially removing
Celluloid, Redis, and EventMachine as a dependency for ActionCable part.

I only have one small concern about the Turbolinks part. It hasn't been my
choice until now for the projects because of the compatibility issues with
other libraries. It always felt like the Quicktime player on Mac OS. Sure you
can use it but you better off with something else.

But I really want it to be something i can use out of box this time. Partial
rendering is not there yet but lets wait and see how it turns ut.

~~~
tarr11
First thing I do when creating a new rails project is remove Turbolinks. It
subtly breaks other gems all over the place in difficult to discover ways.

~~~
dgobaud
and spring which causes all types of weird random bugs from old cached code in
development

~~~
timdorr
You should try it again. It's gotten quite good at automatic reloading. I use
it with Rspec and as long as you've got spring-commands-rspec[0] installed,
it's never a hassle.

[0] [https://github.com/jonleighton/spring-commands-
rspec](https://github.com/jonleighton/spring-commands-rspec)

~~~
rashkov
Agreed. I've been using spring for about 1.5 years now and it has saved me
huge amounts of time. The only time it hasn't picked up changes was on
initializers and the router, which is understandable. I can't imagine
developing without spring. I would be restarting rails hundreds of times per
day.

------
shrugger
40 points and no comments... Can we please discuss this?

I would like to know if this makes Rails worth learning for someone who knows
Ruby but doesn't know rails. I have found my ruby knowledge to be less than
marketable, and I want to step my game up. What do yall think?

~~~
dguaraglia
I'm a big Python evangelist for reasons lost to history, but even I would
recommend learning Ruby on Rails if you want to make yourself marketable. I'm
not sure how much of a market there is out there right now for people with
Rails experience, but it never hurts to learn something new.

Besides, whether you chose to use Rails, or Sinatra, or move to some other
language, as long as you are doing web development you'll be able to apply the
concepts learned. So I say go for it!

~~~
Bombthecat
In germany there are like ten rails jobs.

~~~
merb
Germany is mostly Java or heavy embedded stuff. I mean one of the biggest shop
is probably Zalando which uses Java/Scala/Python. And as far as I know otto.de
is on the JVM, too.

~~~
dguaraglia
I find interesting how some countries (or rather, the industries in those
countries) seem to specialize in certain stacks. Back when I lived in Brazil,
Delphi used to be huge there, even though it had already kind of died
everywhere else. Argentina seemed to be doing mostly Java. I guess it has to
do with the kind of consulting companies that hire the bulk of the software
engineers in the country.

It'd be great to get something like the TIOBE index, but split by country,
although I guess I'd try to bias it a bit heavier towards commercially
developed LOCs.

------
e12e
Are there anyone that can chime in on the current long-time support story for
rails? How much commitment could one expect from the Rails community towards
long time software life-cycle? To clarify, if I want to implement a solution
(say a web/service portal) now, that I have a reasonable dev budget for, and a
commitment to maintain with security updates (and bug fixes) for, say the next
10 years -- is rails 5 likely to be a viable solution?

I always had the impression (possibly false) that the Rails community was very
focused on rapid development, but that it had a tendency to leave dead
projects on the road-side to fend for themselves -- and that maintaining a
project that was a few years old sort of implied massive forward-porting if
you wanted to have a semblance of security updates?

Is my impression way off? Is there a "safe path" if one sticks with the Rails
core?

~~~
brianwawok
Curious to this as well. Django had a pretty public and reasonable long term
support policy.

However 10 year is a bit much. What did anything look like 10 years ago? I
could see 3 or 4 year cycle though.

~~~
e12e
According to wikipedia, Hacker News Launched February 19, 2007; 9 years ago.

[ed: Other things off the top of my head, AFAIK both from the 90s:
slashdot.org, webhostingtalk.com, twitter is from 2006 (obviously twitter and
slashdot have been pretty much rewritten, not sure about wht.]

~~~
brianwawok
Rewritten is not the same thing as having to upgrade a library. Even most
enterprise apps upgrade the big libraries within 4 or 5 years due to the CVEs
that pile up (see struts 1)

------
schneidmaster
Super excited to see Rails 5 hitting stability. I've recently built a
production Rails API on 5 (the beta -- it's been shockingly stable) including
ActionCable, with a React + React-Router frontend, handling a pretty good-
sized production load on Heroku + Passenger. AMA if you want a
developer's/user's perspective on Rails 5 :)

~~~
ryanjodonnell
For reference when you say "pretty good-sized load" what are you referring to?

~~~
schneidmaster
Thus far, peak at about 3000 REST requests per minute and 400 simultaneous
ActionCable (websocket) connections. We're still scaling up the app, as we
just launched it about a week ago, but we haven't yet hit the limits of the
platform.

~~~
karmajunkie
How many dynos does it take to serve that up, just out of curiousity?

~~~
schneidmaster
Actually just 1 Performance-M dyno. With Sidekiq for external/resource-
intensive requests, and a pretty large pool configured in Passenger.

ETA: It doesn't get as much press, but ActiveJob is one of my favorite parts
of Rails 5. It's an agnostic implementation of background jobs -- ActiveRecord
: (Postgres, Mysql, etc) :: ActiveJob : (Sidekiq, Resque, etc). Very nice,
flexible syntax and it helps make your application platform-agnostic.

Second ETA: As rapind pointed out, ActiveJob has actually been available since
Rails 4.2.

~~~
rapind
I think ActiveJob has been in there since 4.1 or 4.2. Agree it's nice to have
a standard.

------
xutopia
For those on the fence about learning Rails it's one of the most in demand
frameworks out there. I don't just mean in terms of sheer numbers node but in
terms of awesome jobs associated with it.

~~~
cutler
I don't know about where you live but in the UK job market, as measured by
Indeed.co.uk, PHP:Rails is 13:1 with only 158 Rails jobs in total, 2/3 of
which are in London. That's hardly "one of the most in demand". I say this as
someone who dislikes PHP intensely. It's just so frustrating when you've
invested so much in learning Ruby & Rails to then find jobs are very thin on
the ground.

~~~
jon-wood
I don't think job sites are really the best metric for Rails jobs - in my
experience no one bothers posting them there because the people who know Rails
well aren't trawling job sites for work.

When I was looking for a new job recently I was mostly looking at places like
Stack Overflow jobs, along with the London Ruby User Group mailing list which
tends to get three or four job postings a week - I haven't looked at a
mainstream job site since about 2008.

If you want a better sense of how much work there is add a few years of Rails
experience to a Linked In profile and watch the recruiters start circling.

~~~
cutler
Three or four job postings a week? For London? That's encouraging.

~~~
jon-wood
There have been points in the last few years when the volume got to the point
of people asking to have a list specifically for job postings to prevent other
stuff being drowned out.

------
gnufied
I think a more useful link is -
[https://github.com/rails/rails/blob/fbdcf5221ad7ea3d40ad0965...](https://github.com/rails/rails/blob/fbdcf5221ad7ea3d40ad09651962fc85d101dd67/actioncable/CHANGELOG.md)

Overall I expect this release to be more lightweight memory wise. This also
should first release of Rails that includes ActionCable -
[https://github.com/rails/actioncable/tree/archive](https://github.com/rails/actioncable/tree/archive)

------
sotojuan
Aside from the latter having a smaller dev environment and community, what's
the status of Rails vs Phoenix (Elixir)? Not trying to start a war (I like
both)—just wondering if this release changes things.

~~~
spacesword
Phoenix and Elixir are trucking along nicely. Elixir 1.3 is on release
candidate, as is Ecto 2.0 and Phoenix 1.2.

The big feature of Phoenix 1.2 is channel presence:
[https://dockyard.com/blog/2016/03/25/what-makes-phoenix-
pres...](https://dockyard.com/blog/2016/03/25/what-makes-phoenix-presence-
special-sneak-peek)

Whats coming in elixir 1.3:
[http://tuvistavie.com/2016/elixir-1-3/](http://tuvistavie.com/2016/elixir-1-3/)

Ecto 2.0:
[http://blog.plataformatec.com.br/2016/02/ecto-2-0-0-beta-0-i...](http://blog.plataformatec.com.br/2016/02/ecto-2-0-0-beta-0-is-
out/)

Other than that the community is growing at a healthy pace. Hex packages have
gone from 1000 to over 2000 in the last 6 months.

~~~
cutler
The problem with hex.pm is that it doesn't distinguish Elixir and Erlang
packages so the total is a mixture of both which is not very useful.

~~~
quaunaut
Why is it not useful? You can drop erlang packages straight into Elixir
projects without any issue.

~~~
cutler
I meant not useful in terms of gauging the output of the Elixir community.

------
stigi
In case this is the first time you hear of Rails 5 and wonder what's new, this
post sums it up:
[http://weblog.rubyonrails.org/2015/12/18/Rails-5-0-beta1/](http://weblog.rubyonrails.org/2015/12/18/Rails-5-0-beta1/)

------
ksec
I am pleasantly surprised to see anything Rails or Ruby in the front page of
HN again. Most of the time people dont vote on it anymore.

Is Rails 5 any faster then previous version?

------
fareesh
Any insight on pros and cons of Rails + ActionCable vs. Rails + your own
socket.io based node server? I've been getting by with the latter whenever the
need arose.

~~~
danielrhodes
Fewer moving parts. ActionCable is stupidly simple to get up and running.

------
notsotrue
While I love Rails, I've stepped away from it over the past couple years in
favour of smaller frameworks. While it's nice to have a kitchen sink approach
when it applies, for SPA's, I found I was using very little of the sink, and
the sink often got in the way. Is Rails 5 doing a better job of letting you
pick what parts you want, or is it still predominantly focused on an all or
nothing approach?

------
jlhonora
Anyone around using it in production? Thoughts?

~~~
schneidmaster
I built a production app recently, Rails 5 (beta -- surprisingly stable) +
Heroku + Passenger, separate React + react-router frontend. It's been
fantastic so far -- has handled a decently sized production load, including
some pretty heavy ActionCable usage, with no problems. There's a few tricks to
getting it working on Heroku though; I've been meaning to write a blog post
about it but haven't found the time.

------
dynjo
We are already running [https://slimfaq.com](https://slimfaq.com) in
production on RC1 and other than Turbolinks pains it was quite
straightforward.

------
tarr11
Has there been any talk on whether Action Cable will be supported by Heroku?

~~~
danielrhodes
It's supposed to work, but I haven't gotten it to work yet. :-/

~~~
lyime
I have actioncable running on heroku. Let me know if you need help.

------
andrewfromx
is it true "rails new backend --api" will first prompt and ask "are you sure
you don't want to use golang?"

~~~
meow_mix
Another person with a totally pointless comment. Really tired of people
comparing Go and Ruby. You can "Go" away

~~~
andrewfromx
sorry. I wrote it too quickly like I was just chatting with a friend. I mean
no disrepect to rails. I just recently learned golang after working for years
in rails. The API thing made me go, wow, if didn't need to worry about erb
stuff and it was 100% json, I think I'd rather do it in go. But you are right.
My comment was just being silly. There's no place for that on hacker news.

~~~
jon-wood
For what it's worth I thought it was amusing, in a slightly trolly way ;)

Just to remain slightly on topic, you can't really compare an entire
application stack like Rails with a language like Go. Maybe you could do with
something lighter like Sinatra.

For me Rails big win isn't that it's high performance (although done right it
can handle a decent volume of traffic), but the fact it's configured out of
the box. You can be productive on day one, rather than wiring together low
level libraries for database access and the like.

Finally having said all that I'm having a really good time with Pliny,
Heroku's Ruby API stack, which feels like I imagine Rails might have done if
it were built specifically for REST APIs rather than full applications with a
UI.

~~~
vidarh
> You can be productive on day one, rather than wiring together low level
> libraries for database access and the like.

One of my big gripes with Rails is defaulting to ActiveRecord, compared to
pretty every alternative (my favourite is Sequel). This is the problem with
Rails: You can be productive if you can be productive with its default
choices.

But in every project where Rails has been involved that I've worked on, sooner
or later people start fighting one of the Rails default choices, and the
problem with that is that so many parts are expected to be there by other
components they bring in, so even things that are in theory replaceable are in
practice tightly coupled.

~~~
mercer
Does using Sequel instead of ActiveRecord cause problems? I understood it can
be used pretty much as a drop-in replacement, but I gather that's not quite
the case?

~~~
vidarh
I believe it has gotten easier. But the problem is not so much Rails itself -
Rails has gotten steadily better at reducing coupling. The problem is that
Rails on its own is not that interesting - what makes Rails is the ecosystem
around it. And a lot of the Rails philosophy (convention over configuration
etc.) contributes to an environment where people make a lot of assumptions.
Active Record is often one of them.

------
domparise
Fight project bloat and misguided architectural patterns! Use Meteor and save
yourself from all the headaches! Make webdev great again! #neverrails

~~~
rimantas
Yeah, going with Mongo was a choice that would really save everyone from
headaches.

