I admit it. I am bad. I run raw SQL in my migrations. The dataset I am working with requires it of me. It must be punished. To aid in its punishment, I found a post explaining how to get at PostgreSQL’s COPY from within the Postgres Ruby driver.
For a [...]
Have you been experiencing the hurt of Capistrano failing?
* executing task deploy
* executing task update
** transaction: start
* executing task update_code
* querying latest revision…
svn: invalid option: –limit
Type ’svn help’ for usage.
*** [update_code] transaction: rollback
* [update_code] rolling back
Never fear. You actually need a more recent [...]
Programming with Ruby and developing Web apps with Rails is fun; Obviously so, or you wouldn’t be reading about deployment issues. Deployment can be challenging and especially so if you come from more of a development background than a systems administration background. Fortunately, I’m tacking this from the latter camp, so I am [...]
Tonight I have been finishing up a plugin heavily based upon Scott Becker’s AssetPackager based upon my own interpretations of Serving JavaScript Fast. Mostly, I changed the way packages were handled, inserting each revision into a versioned directory instead of altering the filename. Further, jsPacker.pl is now preferred over jsmin if it is [...]
Finally, I found some time to install Ajax Scaffold plugin tonight. I did have to wait an hour while asking the perpetual question, Is rubyforge ever up? Eventually, it was, and installed the plugin I did.
After configuration, Ajax Scaffold immediately copied some files into my project directories, including public/javascript, public/images, and apps/views. [...]
Before I could start using acts_as_wizard a few things had to be changed. First, core_extensions.rb defined,
class Symbol
def to_str
id2name
end
end
But its presence broke filtered_access plugin. The purpose of the above seemed identical to the existing Symbol#to_s, so I don’t know why it’s there. I commented it [...]
After quickly scaffolding, you may find you want to actually use portions of the generated form _form.rhtml. If you’re using technoweenie’s labeled_form_helper plugin, the following Perl will quickly convert each label element into something more suitable.
$ perl -i -pe “s#([^#g" \
app/views/test/_test_form.rhtml
Before and after.
Email
'Email') %>
And, if you don’t care about adding your [...]
Rails’ ActiveRecord provides several methods to map relationships between database tables. If you need a simple lookup table, such as the following, you’re actually looking for :has_one.
# \d person
[...]