News for hackers. Stuff that matters.
Re:The most important tool for Ruby/Rails on *nix by wasd on Sunday April 29, 2012 @02:30AM (#3905305)
Dhaivat, not to nitpick but perhaps you should add a disclaimer to the bottom linking to the official installation page so no one bookmarks your page and tries to use your instructions later if they are out dated.

See

"External tutorials

Note that that any outside tutorials are NOT supported whether they work or not. Tutorials are great, however we have spent massive amounts of man hours debugging the installation process. Please use the install process(es) from this site only, as this is the only supported installation types and methods. "

on https://rvm.io/rvm/install/

Re:The most important tool for Ruby/Rails on *nix by dhaivatpandya on Sunday April 29, 2012 @03:03PM (#3906688)
True. Thanks a lot. Will fix it.
Re:The most important tool for Ruby/Rails on *nix by mtrn on Sunday April 29, 2012 @02:47AM (#3905330)
While RVM is great, I use https://github.com/sstephenson/rbenv (but I don't write that much ruby lately. Maybe I haven't reached the edge of rbenv).
Re:The most important tool for Ruby/Rails on *nix by rctay89 on Sunday April 29, 2012 @03:14AM (#3905377)
+1 for rbenv + bundler.
Re:The most important tool for Ruby/Rails on *nix by skyfive on Sunday April 29, 2012 @06:26AM (#3905642)
+1
Re:The most important tool for Ruby/Rails on *nix by bensummers on Sunday April 29, 2012 @05:37AM (#3905593)
Pipe to shell is not "awesome". Pipe to shell is dangerous and it's irresponsible to encourage it.

It's been discussed to death here before. For example, http://news.ycombinator.com/item?id=2430380

Re:The most important tool for Ruby/Rails on *nix by charliesome on Sunday April 29, 2012 @06:46AM (#3905672)
So it's irresponsible to pipe some script off the internet into your shell, but it's completely fine to download some random gem and just require it straight away?
Re:The most important tool for Ruby/Rails on *nix by lubutu on Sunday April 29, 2012 @07:03AM (#3905688)
I'm pretty certain that's not what the parent was implying.
Re:The most important tool for Ruby/Rails on *nix by charliesome on Sunday April 29, 2012 @08:15AM (#3905807)
Both lead to potentially running nasty code, yet people treat them differently.
Re:The most important tool for Ruby/Rails on *nix by bensummers on Sunday April 29, 2012 @12:20PM (#3906300)
Did you read all of the comment I linked to?
Re:The most important tool for Ruby/Rails on *nix by nwmcsween on Sunday April 29, 2012 @03:15AM (#3905378)
Or perhaps gem developers can not use hard dependencies i.e add_dependency('foobar' '1.2.3') and program based on the exposed interface. Maybe then versioning can become irrelevant and API breakage can be inferred (as can be done with c minus dl*, system and such).
Re:The most important tool for Ruby/Rails on *nix by regularfry on Sunday April 29, 2012 @03:26AM (#3905397)
How would you suggest getting them to do that, though? We've already got semver and the '~>' operator for rough version matching which should enable what you're saying. How do we get the people who aren't using semver to switch to it, or something equivalent?
Re:The most important tool for Ruby/Rails on *nix by nwmcsween on Sunday April 29, 2012 @03:37AM (#3905408)
Follow 'semantic versioning' or even better build a table of what is used and limit to a non api missmatch thus no version.
Re:The most important tool for Ruby/Rails on *nix by regularfry on Sunday April 29, 2012 @04:14AM (#3905482)
Right, but again, how do we convince people to do this? The tools are there, but people aren't using them. I don't disagree that it would be better if they did, but I don't see a plan for increasing uptake.
Re:The most important tool for Ruby/Rails on *nix by anuaitt on Sunday April 29, 2012 @05:13AM (#3905569)
Great Article. out of frustration i specified for Rails 3 how do u install from scratch

http://anurag-maher.blogspot.in/2012/04/install-ruby-on-rail...

Re:The most important tool for Ruby/Rails on *nix by SingAlong on Sunday April 29, 2012 @05:15AM (#3905572)
Actually there's a shorter way of installing Rails with RVM.

    curl -L get.rvm.io | bash -s stable --ruby --rails
From the RVM readme https://github.com/wayneeseguin/rvm
Re:The most important tool for Ruby/Rails on *nix by olalonde on Sunday April 29, 2012 @03:42AM (#3905418)
I'm curious to know why this is on HN's frontpage given that rvm is already quite widespread within the RoR community.
Re:The most important tool for Ruby/Rails on *nix by riffraff on Sunday April 29, 2012 @03:51AM (#3905441)
it has a low score, but it's a moment of very low traffic and there aren't more upvoted news.
Re:The most important tool for Ruby/Rails on *nix by dwyer on Sunday April 29, 2012 @02:25AM (#3905294)
If apt-get is the wrong way to install Rails, it sounds like a problem with Rails. Just whose responsibility is it to keep the version in the repos up-to-date anyway?
Re:The most important tool for Ruby/Rails on *nix by pilif on Sunday April 29, 2012 @02:41AM (#3905320)
if you are willing to live with the gems at the versions they were released as whenever your distro was released and when you are willing to live with the subset of all gems that is part of your distributions repository, then apt-get is the perfect tool.

But the moment any of your apps introduce dependencies that cannot be met with your distribution, you are in trouble: maybe the gem needs a newer version of ruby?

Maybe the gem depends on a newer version of a gem that came with the system? Do you manually update that system gem? In that case, you might have just broken a distribution application depending on that older version (and not listing the version it needs, so the latest will be used.

As more and more time passes, the old, safe gem set becomes more and more restricting, increasing the temptation to use gem install instead of apt-get, but once you went down that path, you will open a whole shipping container of worms.

Remember, server distros update rarely. Up until last week, the latest Ubuntu LTS version you could get was from 2010. So much has happened in the ruby world sinc then that sticking to gems of that time could've really hard.

By using rvm, you decouple the gems and ruby your applications need from what the system needs, ensuring that te system remains stable, while you still can use the latest versions of the gems.

Re:The most important tool for Ruby/Rails on *nix by regularfry on Sunday April 29, 2012 @03:07AM (#3905367)
Apt-get install rails works fine, as long as you're doing it to apt-get install a distro-packaged rails app like redmine. It doesn't, and shouldn't, work for development. The distro's job is to supply end-user applications, not up-to-the-minute development tools.
Re:The most important tool for Ruby/Rails on *nix by DHowett on Sunday April 29, 2012 @02:32AM (#3905311)
Usually, a maintainer will step up and build packages for a given project. Be it one developer or a small team thereof, it's definitely not the entire community (and in fact can be unrelated to the community.) However, as distribution versions are end-of-lifed, packages stop receiving non-vital (AKA: security-only) updates, and that's not the fault of the Rails team or even of that maintainer.
Re:The most important tool for Ruby/Rails on *nix by glassx on Sunday April 29, 2012 @02:43AM (#3905322)
I believe in the case of apt-get it's the responsibility of the Debian project. It's the same with other tools (yum, brew, macports).

Rails itself is normally installed via Rubygems (where it's updated directly by the Rails team), but the problem in this case lies with Ruby: for an up-to-date development/production environment you have to compile it by yourself or use something like RVM.

Re:The most important tool for Ruby/Rails on *nix by dhaivatpandya on Sunday April 29, 2012 @03:03PM (#3906690)
"lolwut" is all I have to say.