Ruby and Ruby on Rails
There's enough on the web about these. I'm almost embarrassed by how much I love them.
http://www.ruby-lang.org/en/downloads/
http://www.rubyonrails.org/down
I have ruby installed into C:\ruby, and rails installed as a gem there.
Cygwin
Using cygwin is a blessing and a curse. I love the unix command line tools, but the way that cygwin munges paths makes it sometimes painful to use tools which are expecting DOS paths. Pretty much everything installed in cygwin into /usr/bin works great, but as soon as you attempt to use something outside of the cygwin bubble, things start to break down a bit. For me this has mostly affected ruby-specific tools (e.g. autotest, capistrano, etc) which are installed as gems in the non-cygwin ruby, and fail to run when executed directly from cygwin because the ruby interpreter receives the cygwin path to the script when the script is run from the cygwin command line.
I suppose that I could have made my life a bit easier and done all my work using the cygwin installation of ruby, but I had ruby installed before I decided to do more work inside of cygwin, so as a result when I'm working in cygwin I've had to specifically defeat cygwin's attempts to use its own version of ruby. As a result my .bashrc contains a set of aliases which feel like hacks, but have worked just fine.
In the interests of cleanliness I'm sure that I will end up doing something about these, but having set them up, I haven't had to revisit them in a long time.# Force the c:/ruby version to be found first
PATH=/cygdrive/c/ruby/bin:$PATH
alias autotest='ruby /ruby/bin/autotest'
alias cap='ruby /ruby/bin/cap'
alias gem='ruby /ruby/bin/gem'
alias rake='ruby /ruby/bin/rake'
alias rcov='ruby /ruby/bin/rcov'
alias ruby='/cygdrive/c/ruby/bin/ruby'
alias specrb='ruby /ruby/bin/specrb'
Gems
Other than the site specific gems, there are a few gems that I have installed which I think are terrific. They are:
-
Capistrano (site deployment)
http://wiki.rubyonrails.org/rails/pages/Capistrano
Capistrano rocks. Deploying a new build is almost too easy and seems to take about 30 seconds. It really has completely removed all the misery and guesswork from deploying an update to the site.
-
TestSpec (readable tests, integrated well with the existing rails testing structure)
http://chneukirchen.org/blog/category/ruby.html#x-20070124-121211
This fits nicely with the auto-generated rails tests, and allows for some really readable test code:
context "A stream owner" do
...
specify "should be able to create a picture stream" do
...
It's been great. I initially valued the fact that I could add test-spec tests to existing tests and have it all sort of work together, but after a little bit I just went in and replaced all of my old tests with these because I liked the format.
-
Autotest + Snarl + RedGreen (continuously running tests + notification of problems)
http://nubyonrails.com/articles/2006/04/19/autotest-rails
http://www.fullphat.net/
http://on-ruby.blogspot.com/2006/05/red-and-green-for-ruby.html
Autotest provides continuous testing of your code. It notices which files have changed, and runs the appropriate tests. If you have snarl configured, when a problem is encountered you get a brief and unobtrusive notification dialog that tells you that some tests have failed, which is a nice clue that you need to go fix something.
Another fantastic tool. I run my tests using rcov, and it tells me how well the tests cover the code. It also produces some phenomenally cool looking output (viewable in your browser) that tells you specifically which lines were covered and weren't, allowing you to browse the code in your browser, spot the areas that were not tested, and write tests for those areas. You really have to see it to believe it. Check the screenshots in the summary section on the eigenclass.org link.
Editors, Source Control, etc...
-
Komodo Editor
http://www.activestate.com/Products/komodo_edit/
It's free, and it is really good. There are the cool things I had expected (syntax highlighting, auto completion, etc) and then the occasional nice touch I had not expected, like typing Dir::entries and getting tooltip help for the method.
-
SVN and TortoiseSVN
http://tortoisesvn.tigris.org/
I am ambivalent about Tortoise. I spent about 2 hours getting it to work nicely with ssh-agent so that I didn't have to type my password over and over again when accessing an svn depot via svn+ssh (that deserves a separate writeup) but other than that little bit of misery, it's been working nicely. I like the fact that it integrates itself as a Windows Explorer extension, allowing me to use the right-click menu in the explorer to do SVN operations. It makes SVN feel well integrated, which is a nice touch.
0 comments:
Post a Comment