Monthly Archive for February, 2008

rails script/generate scaffold_resource not working

I’m trying to follow the tutorial HowTo: track the effects of your email campaign but am getting stuck with the following error:

Tab:campaign pixelcort$ script/generate scaffold_resource user \
name:string email:string verification_hash:string
Couldn't find 'scaffold_resource' generator
Tab:campaign pixelcort$ rails -v
Rails 2.0.2

Any thoughts?

Problems with MacPorts Ruby

Update: There seems to be some ambiguity on my part. I’ll update this article as soon as I get a better understanding of what’s breaking.

Hi. I’m having some problems in Leopard with my MacPorts’ built version of ruby. Here’s what I’m seeing: $ echo $PATH /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin: /sbin:/Users/pixelcort:/usr/local/bin:/usr/X11/bin $ file /opt/local/bin/ruby /opt/local/bin/ruby: Mach-O executable i386 $ whereis ruby /usr/bin/ruby Tab:~ pixelcort$ whereis rails /usr/bin/rails Tab:~ pixelcort$ file /opt/local/bin/rails /opt/local/bin/rails: a /opt/local/bin/ruby script text executable Basically from my understanding RubyGems in Leopard is broken, so I’m trying to use the RubyGems from MacPorts. However, for the life of me I can’t seem to figure out why whereis is pointing to the Leopard copy of ruby when I clearly want the MacPorts one as specified in my $PATH variable. Any thoughts?