…FreeTDS, unixODBC, and RubyODBC right. If your like me and believe that MacPorts is the way to go and risking a Homebrew interleaved dependency with Apple's libraries is risky, this section is for you! So you have a MacPort base and you want to compile your RVM rubies in such a way that other dependencies such as Nokogiri and RubyODBC use your /opt/local installs. By default this does not happen because unless ruby was compiled the right way, it wont be able to allow built …
…those using the SQL Server adapter. The base package management system used there was MacPorts. In it I described how to edit the outdated Portfile for the rb-odbc package and exclaimed how important it was to use the +utf8 variant. I was totally wrong about that part.
This past week I started heavily exploring RVM at the advice of friend while we visited the Boston.rb user grooup. As an aside, I finally feel my unix-fu is strong enough to cover the edge cases needed …
…your Mac. A different version of Tk (that you might have installed with MacPorts or homebrew?) is probably what's making it look ugly.
Try this: $ /usr/bin/wish $(which gitk)
If it works, avoid re-typing that the next time you login by adding an alias to your ~/.bashrc file: alias gitk="/usr/bin/wish $(which gitk)"
From the next time you log in gitk won't look (quite so) crap when you start it from the command line.
Step 2: Changing the gitk font
If you've …
On OSX you may have to install libffi, you can install it via MacPorts with:
sudo port install libffi
Then go to your rails project and generate the cucumber files as followed:
script/generate cucumber --capybara
And you are ready to go to mix and match your acceptance with tags. For further informations like using capybara without cucumber, asynchronous JavaScript etc. checkout Capybara's README .
Capybara definitely eases maintaining acceptance test and …
This gets me everytime. You have installed libxml2 through MacPorts but Nokogiri won't compile, even with complex command line arguments. Solution:
sudo port upgrade --enforce-variants libxml2 +universal sudo port upgrade --enforce-variants libxslt +universal gem install nokogiri -- --with-xml2-include=/opt/local/include/libxml2 --with-xml2-lib=/opt/local/lib --with-xslt-dir=/opt/local
Now I can install capybara or webrat:
gem install capybara
…performance gizmo on whatever Rubies you have installed.
RVM makes it easy to tinker with esoteric patchlevels and implementations. For instance, feel free to tinker with MagLev or the mput branch of MRI .
A couple other things RVM tastes great with:
Using homebrew to manage packages instead of MacPorts
Not using sudo to install your gems
Managing your dotfiles on GitHub
I'm running on OSX, and using MacPorts for all my un-Apple needs. So, no, getting Ruby 1.9 installed was not complex at all, the suffix is the default in MacPorts, so I just ended up with a ruby1.9 executable.
The kicker comes because Rails, and all its little generator friends, do one of two things. Either they are just hardcoded to use #!/ usr/bin/env ruby or they set that line to whatever version of Ruby you happen to be using when you install/generate/make them the first …
MacPorts
Now we'll install MacPorts, which the web site describes itself as, "an open-source community initiative to design an easy-to-use system for compiling, installing, and upgrading either command-line, X11 or Aqua based open-source software on the Mac OS X operating system."
As I've said in past versions of this guide, this tool is about to become one of the most important tools on your operating system. It'll be used time and time again to maintain …
DBSlayer is a tool that will wrap your MySQL database with an HTTP REST/JSON API. Here's how to get it installed on Snow Leopard using Macports. First, make sure you have all the dependencies install via Macports : $ sudo port install db46 $ sudo port install apr $ sudo port install apr-util $ sudo port install mysql5-server
Then, if you try to download the source and install it: $ cd ~/src $ wget http://code.nytimes.com/downloads/dbslayer-beta-12.tgz $ tar xzf $ cd dbslayer $ ./configure $ make $ make install
…everyone else to use.
Wrapping Up
Homebrew is a compelling alternative to MacPorts and Fink. The Homebrew core and all the formulae are written in Ruby, so it's easy to add new packages or even new features. If you're looking for more control over the Unix software you have installed on your Mac, or you've been frustrated by other package managers in the past, check it out. I think you'll be happily surprised.