Modern Ruby Development
ascarter.net
ascarter.net
Interesting that he roots for homebrew over macports and rbenv over rvm while at the same time voting for capistrano. Of those 3 projects I find macports and rvm to do what I need from them perfectly and capistrano to be really lacking in both performance and complexity.
This may not be a popular opinion, but I have a suspicion that the high degree of wheel reinvention in the world of Ruby and Rails libraries is due to two things: NIH Syndrome & the professed preference by employers for people with active GitHub projects. This causes all kinds of people to make their own gems and such where existing implementations could be improved without such a division (diffusion?) of labor.
To make it worse, GitHub only occasionally shows commit activity on repos belonging to other people. I have plenty of side-projects going over on a communal account at http://github.com/smashcon. If I work on some of those repos for a couple of weeks, however, to the casual observer it appears as if I haven't been doing anything at all.
(The canonical answer appears to be "fork and use pull requests", but at this point in the project they're just too clumsy for little benefit, particularly each only has a single committer.)
https://github.com/pengwynn/faraday_middleware
The vast majority of commits are by https://github.com/sferik though.
I don't think pengwynn is gaming the system, but if someone wanted to, this is how they could do it.
If you're a consultant hopping from one client gig to the next each few months, it's great. If you maintain your own things, it gets frustrating when things you relied on are no longer maintained because the developer got tired of putting up with putdowns about how his project "sucks" and [x] is the new hot way to log people in. :)
It assumes you're using git, supports multiple stages out of the box, uses a reset strategy by default instead of having to hack it in etc.
I'm planning on playing with it today.
we have custom vlad plugins for usual rails related stuff, so our config/deploy.rb scripts are usually about 5-10 lines long. see https://github.com/astrails/vladify
As today generation programmers, we often prefer to work on new features, new things as opposed to keeping things stable and fixing all the kinks.
Back in the old days, people were so happy if they could submit a patch.
but again, if you don't like this part of rvm, just switch it off
Also, you glossed over the fact that he's not installing Xcode so that he can use its IDE; rather, he's installing to get LLVM/GCC easily. He makes it clear that ZSH is his preference and that he recommends it.
The vast majority of developers looking for a guide to set up their machine for Ruby development will be Rails developers. Denying that is silly.
Calling that "modern ruby development" is silly.
In true HN tradition, I must urge you to try Vim. I found this very helpful when I first start: http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressiv...
I used Vim casually so I'm not an expert. I understand that it'll take a while to master it. But compare to netbeans where you can navigate Ruby code quite fast (shortcut to method implementation, class implementation, project browse, auto-suggest, etc), why would I want to use Vim when I have to find the proper plugins (not just one, but a few) before I can be productive (assuming they can do what I mentioned above).
It's nice to have an editor you know how to be productive in when you start using a new tech.
In an average workday I'll touch ASP, JavaScript, Sass, CoffeeScript, PHP, and Ruby code. When I use VIm, I can use all of the shortcuts and things I've learned over the years to manipulate text. I know how to manage projects, find files, etc.
That's a huge advantage. Having to learn Eclipse to do Java or Visual Studio to do C# adds complexity cos you have to learn the tool and the language.
So yea, I totally get it. This goes for TextMate or Emacs too.
The portability of Vim-the-application and thus the portability of the skills to use it are a big reason why I put in the time to learn it (same applies for Emacs). I can just as comfortably program locally, on a remote server or on a friend's machine.
Even when we were building version 1.0 of the software, there aren't too many text editing as opposed to navigating the code tree.
Isn't dynamic/scripting languages like Ruby and Python produced way less code than Java? (Hence, less typing again).
So this is why I don't quite get the group of people that swear by vim.
If you want to set your login shell to zsh, go to System
Preferences -> Users and Groups. Right-click on your user
account and select Advanced Options. Change the login shell
dropdown to /bin/zsh.
You're better off using `chsh -s /bin/zsh` (or, better yet, `brew install zsh`, append `/usr/local/bin/zsh` to `/etc/shells`, and use that, instead). > rvm implode
How's rbenv for uninstallation? I'm familiar-enough with rvm that I know I can restore absolutely everything from scratch with a couple config options and a while for compilation - I'm more than happy to spend that to experiment as long as rbenv has a similar panic-button.Why isn't it titled "My brand new Rails development stack on Mac"?
For the record, I do straight ruby; I don't even know how to deploy rails.
However, /usr/bin/ri (ri v1.0.1 - 20041108) does give completion but different from your list. ri K<tab> gives Classes and methods (e.g. Kconv\#guess) and not just classes. So it's a huge list. Thx.
I think it is natural and understandable because there are many Ruby freelancers around who desire to build a brand around their name. But the "competition" between rbenv and rvm was not constructive at all so far. It would be much more helpful if there was one .rubyversion file that both would respect, for starters.
A great second book (maybe even first if you're comfortable enough learning basic syntax on your own) is Eloquent Ruby by Russ Olsen.
Mac OS X does provide a package manager - the App Store.
Everything I've needed has been available in homebrew, and more up-to-date and better isolated and hasn't collided with anything yet. I haven't used it as long as I've used macports, but so far it has been a far more pleasant experience. And incomparably faster - I swear, macports has a sleep() call in every operation. Very much recommended if you haven't tried it, and it cleans up nicely too - you just delete its single folder.
source "http://rubygems.org"
should be gem source "http://rubygems.org"