Not too difficult. Actually, once you crumble it, firm tofu is pretty much a one-for-one replacement for ground beef. (And, I should point out, 1 block of tofu pretty much doubles its volume during crumbling.) The taste lacks a certain body brought to it by the beef, but I’m sure a little experimentation will help that.
The only real problem I have with the tofu is it’s colour. Tofu is white and stays fairly pale when cooked. Beef, on the other hand is red and cooks to a nice brown. The first solution that occurs to me is to just marinate the tofu in beef broth overnight, which should darken the colour and may even add the ‘meaty’ body. However, this stands a good chance of adding a fair amount of salt to the tofu which could be a problem.
The colour can be camouflaged by simply sprinkling parmesan cheese on top of the sauce. The parmesan is pretty much the same shade as the tofu, so the tofu sort of blends in with the cheese, and parmesan is something my mind expects to be present on the spaghetti. This doesn’t help the fact it looks wrong while cooking, though.
As for methodology, it was pretty straight forward: I sautéed about 1 tsp of minced garlic and 1/2 cup of minced onion in about 2 tbsp of olive oil. Once that was softened, I added 1 block of crumbled firm tofu (the tofu had seasonings already in it, so this step smelled really, really good) and cooked for about 5 minutes over medium heat. Then I added 2 jars of off-the-shelf pasta sauce (Healthy Choice Chunky Lovers Italian Vegetable and Traditional, to be exact), brought it to a simmer and let that go for about 20 minutes. I added about 1 cup of water while it was simmering since it looked a bit dry. The pleasant surprise was that when I added the tofu it absorbed most of olive oil in the pan, and carried it right through to the plate, which was neat.
Posted on 13 May 2005 in Uncategorized
8 Comments »
28 Feb 2006: I wrote this article seven months ago and, at the time, it was current and wonderful and I was a happy Rails tinkerer. In the intervening months, outside forces have moved me into the world of professional CakePHP programming (don’t worry about me though, Cake is basically PHP on Rails). Thus, this page has become outdated and crufty. However, it still gets a decent amount of Google- and deli.cio.us-directed traffic. So, I’m adding this short note to point you weary travelers to Dan Benjamin’s article on getting RoR up and running on OS X with all the bells and whistles.
In short: Don’t bother with this page, go read Dan’s HiveLogic article or the Apple Developer Connection article. You’ll be glad you did.
Since I wrote up the somewhat convoluted process of getting Rails set up on Panther, it seems only fair that I document the process of getting it running on Tiger. Turns out, it’s a lot simpler.
Firstly, the big changes: Ruby 1.8.2 and a DBMS are already on your system. With Tiger, Apple has upgraded the pre-installed Ruby to 1.8.2 so we don’t have to do anything there. Likewise, Apple includes SQLite in every Tiger install, so I’ll base this around using that as a back-end rather than MySQL or PostgreSQL. (The command line client for SQLite is sqlite3, by the way.)
And now, the install process:
- Install the Developer Tools. You’ve probably already done this, if not, the installer is on your Tiger DVD.
- Tweak Ruby. The pre-installed version of Ruby is almost perfect. But it needs a couple little fixes. If you want to know what’s up, the details are here. We also add a symbolic link so that ruby can be accessed via
/usr/local/bin/ruby, which is where Rails expects it.
- Slip into Terminal.
curl -O http://users.tpg.com.au/aarnold/rbconfig.rb
less ./rbconfig.rb, this will display the file in the terminal. It should contain lots of stuff like ‘RUBY’ and ‘CONFIG’ and absolutely nothing like ‘<html>’ or ‘404 Error’. Type a q to exit less.
sudo cp ./rbconfig.rb /usr/lib/ruby/1.8/powerpc-darwin8.0/rbconfig.rb and enter your login password when prompted.
sudo ln -s `which ruby` /usr/local/bin/ruby
- Install RubyGems. RubyGems is by far the easiest way to install Rails.
curl -O http://rubyforge.org/frs/download.php/3700/rubygems-0.8.10.tgz
tar -xzf rubygems-0.8.10.tgz
cd rubygems-0.8.10
sudo ruby setup.rb
- Install the SQLite3 Adapter for Ruby. This will allow Ruby to access SQLite databases.
sudo gem install sqlite3-ruby
- Select option 1:
sqlite3-ruby 1.1.0 (ruby).
- Install Rails. Yes, it really is a lot simpler on Tiger.
sudo gem install rails and answer Yes to install all the dependencies.
That’s it, Rails is installed. Now, to make sure everything is working, let’s get the To-Do List tutorial setup. We’ll use the WEBrick server included as part of the Rails project.
- Create the Project. This is where the To-Do list application lives.
- Slip into Terminal.
mkdir todo
cd todo
rails .
- Create the Database.
- Again, in Terminal, in the
todo directory.
sqlite3 db/dev.db
- You should now be at an
sqlite> prompt.
CREATE TABLE todos ( id INTEGER PRIMARY KEY, description VARCHAR(100) NOT NULL, done TINYINT DEFAULT 0 NOT NULL );
.quit
- Point Rails at the Database.
- Edit the file
todo/config/database.yml
- Change the ‘development’ entry so it looks like this (note that
development: is not indented and the second and third lines are indented two spaces. Yes, it matters.):
development:
adapter: sqlite3
dbfile: db/dev.db
That should put you at about Part 4 of the Tutorial. Just remember that all the SQL modifications need to be done with the sqlite3 tool (sqlite3 db/dev.db), so you’ll actually have to manipulate the database by hand. Personally, I don’t mind that. In fact, I prefer it for simple stuff like this since it keeps my SQL skills from getting too rusty. It’s useful to be able to jump into a console on a PostgreSQL or MySQL database and poke around by hand sometimes.
Posted on 5 May 2005 in Uncategorized
5 Comments »