Politics, Programming and Possibilities
21 Feb
Kudos to Allan Odgaard the creator of TextMate for building such a powerful and flexible editor for the Mac. Without his brilliant work, making these 4 releases in 3 days would certainly not have been possible.
I’d also like to thank the several contributors who have worked with me to improve this Rails bundle in so short a time: Sami Samhuri for his Snippets contributions, Cliff Matthews for his patches for the Intelligent Go To File command, Kent Siblev for fixing a CocoaDialog issue and Pete Lasko (my coworker and partner) for many of his bright ideas.
Tim Lucas proposed an interesting challenge in his comments following the 0.7 Release:
…and now for the ultimate challenge: recognise a URL through an app’s route configuration and take you to the relevant action. Combine this with a bookmarklet and you could go from any web page straight to the relevant controller action.
My initial reaction to his idea was, “That’d be cool, but forget it right now. Maybe in the 2.0 release .” Way too much work for a bundle, it seemed. But then another approach bubbled up from a conversation between me and Pete Lasko. Why not add footnootes to each page that link you to the appropriate action or view? Why not indeed. This is very similar to the calling and purpose of the textmate_backtracer plugin—but instead of showing links to just error pages, show links to each and every page while in development mode on the Mac. From thence was born the textmate_footnotes plugin, now included in syncPEOPLE on Rails 0.9.
Oh yeah, and as a bonus, textmate_footnotes includes all of the functionality of the textmate_backtracer, thus deprecating the backtracer.
Well, yes, actually. As part of this release, we’ve included a novel “plugin installer” from within TextMate. Hit ctrl-command-option-\ and you will be given a choice of plugins to install from the syncPEOPLE on Rails Bundle to your active Rails application. Currently the Rails Engines and the textmate_footnotes plugins are available as options.
For the adventuresome among you (yes, that’s just about all of you) you can add any plugins you’d like to the tmbundle/Support/plugins directory and they will be automatically included in the drop-down select box when you invoke the plugin installer. In future releases, we may have a way for you to “tag” external plugins or repositories to automatically download and install them as options.
Also included in this release are a number of snippets that make migration files a little easier to build. Documentation is included in the Disk Image download.
Without a doubt, this bundle is becoming the essential resource for Rails developers on TextMate. Jamis Buck and Tobias Luetke on the Rails core team have downloaded and installed it—perhaps we’ll soon hear some reviews from them and others.
16 Responses for "syncPEOPLE on Rails 0.9.1 - Wow, what a weekend"
I seem to be missing something. Neither the generator nor plugin-install features are working for me. The generator pretends to work - I can select something to generate (say, a model) and give it a name, but no files are generated. Installing a bundled plugin fails more obviously - after selecting a plugin I get an error “Can’t find the Rails application structure.” I’m doing this having run “mate $RAILS_ROOT” so the application structure is all right there in my project… What’s going on?
Great tools - but I’m having an issue with .9. I have controllers in modules, so my tree looks like app/controllers/citizen/search_portal_controller. After installing the plugin, webrick fails with “No such file…” and and the path “app/controllers/controllers/citizen/search_portal_controller.rb”
The following are the only mods to the routes.rb
map.connect ”, :controller => “citizen/search_portal”, :action => ‘index’
and
map.citizen_home “home/”,:controller => “citizen/search_portal”, :action => “index”
If I comment these out, things work as advertised.
Thoughts?
Keith
Oops - additional problem - the Views link on the front page tries to find index.rhtml.rhml.
Mark:
Ahh. I suspect that you haven’t selected a file from your project before running these commands. Currently, the “RAILS_ROOT” is determined from the TM_FILEPATH constant. I should make it so it falls back on the TM_PROJECT_DIRECTORY if it fails the first test.
Duane,
You’re right about this bundle being essential. You’ve done an excellent job making TextMate more valuable to us all. Great work!
Thanks, this is great! I Love the footnotes. Why not make textmate_backtracer to a plugin?
The textmate_backtracer plugin is now built in to textmate_footnotes. I didn’t see a reason why anyone would want one without the other (since it only works in development mode for macs, there’s less chance it will disrupt other things).
I think I’ll need to add some kind of ability to turn the footnotes on and off, however. Possibly on a per-action basis, as someone else suggested. We’ll see what’s needed as we move along.
Duane,
We can insert lines into self.down now for those migration snippets.
It’s still rough around the edges, but by tomorrow I’ll have everything polished and the old migrations updated.
See this post for details: http://sami.samhuri.net/articles/2006/02/21/textmate-insert-text-into-self-down
[...] It started out last weekend with a couple of features and now the syncPEOPLE on Rails bundle has really become a must have for Textmate if you do any programming in Rails. [...]
Love what you’re doing. In this version, nothing works and attempting to create a partial returns:
/bin/bash: line 3: create_partial_from_selection.rb: command not found
Standard install location of TextMate.
I had a problem with the view footnotes, when I called a function that rendered stuff inline: Here’s the fix:
controller.response.body += “TextMate Footnotes: Controller”
if controller.instance_variable_get(”@performed_render”)
template_root = controller.instance_variable_get(”@template”).instance_variable_get(”@template_root”)
first_render = controller.instance_variable_get(”@template”).first_render
if template_root
abs_template_root = File.expand_path(template_root)
view_filename = “#{abs_template_root}/#{first_render}.rhtml”
controller.response.body += ” | View”
end
end
controller.response.body += “”
(basically checking to see if template_root is non-nil.
Also, I moved the final addtion to add the closing center tag out of the if/then - otherwise, it might happen, that the center-tag isn’t closed.
bla - sorry for the non-format
(oops… just moved this comment from the 0.8 release blog entry where I had posted it by mistake)
I installed the bundle, but the intelligent Go To File isn’t working. I can see the bundle in the show bundles list. To enhanced ToDo list works correctly, but when I hit keypad enter on my mac, it just inserts a blank line.
The only thing I think is different on my mac is that my TextMate application is in a folder within /Applications/TextMate/TextMate. I stuck the app inside a folder so I could put manual with it also. When I did the install, I opened up that folder and dragged the bundle onto the actual TextMate application.
Any ideas? I really like the idea of intelligent go to file and would love to get it working.
Steve: You need to be Ruby on Rails mode, not just Ruby mode.
Unfortunately, I’m with Jason Perkins, above.
None of the commands work. “create partial”, “generate”, intelligent goto file” all do nothing, or give the above mentioned “file not found” error.
i love this.
just one question - is there a way to keep the enhanced TODO from searching the log directory?
Leave a reply