Publishing My Rails Plugins
Listen to this article
I've created a page where I've started to publish my rails plugins. I don't yet have a publicly accessible SVN server but I'm in the process of setting one up so, until I get that completed, I've packaged the plugins as downloadable .tar.gz files that you can extract into your vendor/plugins directory. So far I've published the foreign-key migrations and cascading stylesheets plugins with more to come. But as today is Norway's national day (apparently celebrating the signing of the constitution on the 17th May, 1814) and I'm in Olso, I'm off to do some drinking..ahem I mean..celebrating.
Comments
FYI, your link to http://www.redhillconsulting.com.au/rails_plugins/foreign_key_migrations.tar.gz seems to reference a corrupt file.
Also, as I commented to your last post, it doesn't appear that plug-ins required from the environment.rb file are loaded for migrations. Am I mistaken? Thanks.
Posted by: Ted | May 18, 2006 01:21 AM
That link seems to work fine for me. I downloaded the file and decompressed it just fine. What command are you using?
As for plugins, there is no need to require a plugin in environment.rb as all plugins are loaded by rails--assuming they're configured correctly.
Posted by: Simon Harris
|
May 18, 2006 01:27 AM
> What command are you using?
WinZip 9, which usually handles gzip'd files just fine. I'll try another tool tomorrow morning.
> assuming they're configured correctly.
Ah, right you are. I'd forgotten to set up init.rb.
Posted by: Ted | May 18, 2006 11:43 AM
OK, I finally got it downloaded and installed, but it's not working with "edge" Rails. I peppered your code with a bunch of debugging statement to ensure that it was loading and executing (it is) but the block that adds the foreign keys never runs :-(
Posted by: Ted | May 18, 2006 11:58 PM
I've not tried it with edge. I'll download it and have a look see what's up.
Posted by: Simon Harris
|
May 19, 2006 03:03 AM
Ok I've tried it with edge rails and it should now work. Have another go :)
Posted by: Simon Harris
|
May 19, 2006 03:37 AM
Perhaps the example is wrong on your page for foreign_key_migrations, but it fails when using the table name "countries" because proper_pluralized_table_name() will call "countries".pluralize, which returns "country" and therefore does not find the table.
Posted by: Aaron
|
June 14, 2006 01:19 AM
Hmmm...I assume you're using the :references option? Ie you've said something like :references => :countries which is being turned into :references => :country? Perhaps you can send me the script you're using and I'll make a fix for it ASAP.
Simon
Posted by: Simon Harris
|
June 14, 2006 09:22 AM