

Ruby 2.1.5 Released - reledi
https://www.ruby-lang.org/en/news/2014/11/13/ruby-2-1-5-is-released/

======
thinkbohemian
If you're still running a Ruby 2.1.0, 2.1.1, or 2.1.2 (i.e. less than 2.1.3)
you're missing out on some killer memory optimizations. I saw huge savings in
my production app when i bumped from 2.1.2 to 2.1.3.

Also 2.1.5 is available on Heroku:
[https://devcenter.heroku.com/changelog](https://devcenter.heroku.com/changelog)

Think HN is loosing its touch. It's been on Reddit for over 24 hours:
[http://www.reddit.com/r/ruby/comments/2m6p6n/ruby_215_is_rel...](http://www.reddit.com/r/ruby/comments/2m6p6n/ruby_215_is_released/).
Anywhoo, glad for the publicity, please upgrade your Rubies.

~~~
sergiotapia
From experience expect to see a lot of heroku memory errors if you're using
anything above 2.0.0.

Heroku supports these newer ruby versions but they trigger memory errors like
it's nobodies business.

2.0.0 means no memory errors.

~~~
thinkbohemian
> 2.0.0 means no memory errors

2.1 has a totally new GC setup (generational GC). It is guaranteed to use more
memory (expect 3~5%), but be MUCH MUCH MUCH faster. Typically you can trade
off running one less Puma worker to decrease memory usage, and the increase in
speed may make up for it. Alternatively you can bump up to 2x dynos, and cut
the number of dynos you have in half. If you haven't tried 2.1.3 or above do
yourself a favor and revisit. The 2.1.3 patch means memory grows much more
slowly.

Also if you didn't see my post on memory profiling:
[http://www.schneems.com/2014/11/07/i-ram-what-i-
ram.html](http://www.schneems.com/2014/11/07/i-ram-what-i-ram.html) (It got
over 40 upvotes on reddit, and like 3 on HN, again...HN what is going on? I've
had much less substantial posts make it front page). That post shows you how
to remove ~30% starting RAM (by bumping mail version to 2.6.3+) and shows you
can profile and remove libraries that are using a ton of memory in your app.

You can also use something like puma_worker_killer (or unicorn_worker_killer)
to tame your memory growth if it only balloons over 512mb after a while, but
ultimately those two solutions are bandaids.

Ruby 2.0 isn't going to be supported forever and the generational GC is
definitely here to stay. Maybe try the 2.2.0 preview (it's on Heroku), it has
3 generations (total) which means much less retained memory and you still get
speed performance improvements.

I see most of the bigger production apps using 2.1+ fwiw.

~~~
sergiotapia
I agree with everything you said, but until Heroku offers larger dynos by
default it's better to use 2.0.0 -if- you typically only use a dyno or two.

------
crohr
For anyone interested, DEB and RPM packages are available at
[https://packager.io/gh/pkgr/rubies](https://packager.io/gh/pkgr/rubies) for
various distributions. For instance for ubuntu 14.04:
[https://packager.io/gh/pkgr/rubies/install?bid=28#ubuntu-14-...](https://packager.io/gh/pkgr/rubies/install?bid=28#ubuntu-14-04-ruby-2-1)

~~~
stewbrew
Wouldn't one rather want to use rvm?

~~~
jerhinesmith
RVM/rbenv/chruby are generally discouraged on production servers.

~~~
andyl
Not for me! Being able to easily swap rubies in production gives a lot of
flexibility. I've found that Chruby in production has been very reliable and
easy to manage.

~~~
s0l1dsnak3123
Yep, there are also significant performance benefits in compiling ruby for
your machine if you're running on bare metal.

------
Tomte
My interest in Ruby wanes a bit every time there is a new Ruby release, but no
corresponding Windows installer on rubyinstaller.org

I really like the language and used to reach for it as a first instinct, but
nowadays it almost lost its mindshare with me.

I understand that there are open bugs that are tricky, but I get the very
serious impression that the core Ruby devs simply don't care about Windows at
all (a bit like it used to be with git). Bad move, I think.

~~~
vectorpush
You seem a little entitled. This may not be politically correct, but frankly,
Ruby is __nix style software, Windows support seems like its just a courtesy.

Perhaps I'm living in a linux-nerd bubble, but why would anyone even use ruby
when targeting the Windows platform? Seems like .NET would be a more
appropriate choice across the board (be it for web or Windows application
development).

I can't imagine the type of pain involved in deploying Ruby code into
production in a Windows environment, that just seems insane. This is all to
say, maybe Ruby _isn 't_ the best choice for a Windows developer. If one
simply enjoys the Windows experience in general, at the very least, if I were
developing Ruby in Windows, I'd expect to use a *nix VM via SSH thru cygwin or
something.

~~~
MrBra
> but why would anyone even use ruby when targeting the Windows platform?

Ruby presents itself as fun-to-code-in programming language.

And it is very much so. That's why a lot people like using it.

Having to setup a whole new environment just to have their fav code tool at
hand or having to boot a virtual machine each time just to use it it's much
more inpractical, introduces overhead (e.g. sending files on which to work on
with Ruby to the VM) and basically, for reasons I am sure you know, does not
feel the same than having it installed locally.

As you said the fact that you are advocating that people should not be able to
use Ruby on Windows just feels a bit of a *nix nerdy-bubble biased thought.

~~~
vectorpush
Use the right tool for the job. I adore Ruby, but I don't think its very
practical to shoehorn it into a role where it's a less optimal solution
compared to the other available options.

 _> Having to setup a whole new environment just to have their fav code tool
at hand or having to boot a virtual machine each time just to use it it's much
more inpractical_

VMs are part of the modern developer landscape and are actually quite trivial
to setup. Further, once your VM is built, it requires no further effort beyond
the couple clicks it takes to boot up the VM and shell (especially because
most developers avoid reboots).

 _> As you said the fact that you are advocating that people should not be
able to use Ruby on Windows just feels a bit of a _nix nerdy-bubble biased
thought.*

I think it's pretty obvious that I'm not advocating programmers shouldn't be
able to use Ruby on Windows, they should use whatever they want, but I think
they should also temper their expectations with the reality that Ruby on
Windows is a pretty small niche, _especially_ for web development (likely the
most common use-case for Ruby).

~~~
MrBra
Ruby is a general purpose programming language. The fact that Rails made it
popular for web dev is another thing. Also anyone who uses a language should
be not tied to what the majority of coders do with that language or to the
conception of what a "modern coder" is. A language is a tool, and I am happy
when it is easily available to anyone under any condition to make of it
whatever they want.

~~~
vectorpush
I'm not talking about what _should be_ , I'm talking about _what is_. The
reality is that Ruby on Windows is a relatively tiny fraction of the Ruby
community; that doesn't mean nobody should use Ruby on Windows, it just means
that you can't expect a first class experience compared to the environment
where most Ruby code is tested, lives and thrives. This is the same reason why
very few developers target .NET in the nix world, _yes_ .NET can work on
linux, but, despite the efforts of mono and Microsoft's upcoming OSS push,
getting .NET to work correctly in a non-Windows environment is fraught with
annoying problems and obscure compatibility edge-cases.

Except for educational purposes, if you're a _programmer_ , I just don't see a
reason to fight one's tools by deploying them in an environment they just
aren't optimized for _in practice_.

------
barbudorojo
not a big deal here, fixed a DoS vulnerability of REXML, and some small bug
fixes, textually: Sorry for the inconvenience of frequent releases.

