Politics, Programming and Possibilities
27 Feb
I meant to include Sami Samhuri’s Snippets and Macros in the last release—and, unfortunately, did so in a half-baked manner. In this release, the snippets and macros are all there, and they sure are cool! Thanks, Sami.
Some people asked about the enter key that was bound to the Intelligent Go To File command. Please note that the enter key will no longer be bound to this command by default. See my earlier post for more information on why this key was split in to two commands. Use ⌘⌥↓, bound to the “Go To File” command and ⌘⌥↑, bound to the “Go To File on Current Line” command instead. I’ve included the older (combined) Intelligent Go To File command in the library, but this time I’ve not bound it to any keys.
As usual, please let me know if you find anything amiss.
12 Responses for "Rails Bundle RC4 — Sami’s Snippets & My Fixes"
Yeah - this seems to nail it! And finally the confusion about the intelligent goto file has subsisded for me. Thanks for a great plugin
jc
Ahh - there’s still a problem with the partials stuff:
/Users/jcf/Library/Application Support/TextMate/Bundles/Rails.tmbundle/Support/bin/create_partial_from_selection.rb:79:in `read’: No such file or directory - /Users/jcf/dev/projects/rails-seminar/samples/partner/app/views/_form.rhtml (Errno::ENOENT)
from /Users/jcf/Library/Application Support/TextMate/Bundles/Rails.tmbundle/Support/bin/create_partial_from_selection.rb:79
from /Users/jcf/Library/Application Support/TextMate/Bundles/Rails.tmbundle/Support/bin/create_partial_from_selection.rb:63:in `each_with_index’
from /Users/jcf/Library/Application Support/TextMate/Bundles/Rails.tmbundle/Support/bin/create_partial_from_selection.rb:63:in `each’
from /Users/jcf/Library/Application Support/TextMate/Bundles/Rails.tmbundle/Support/bin/create_partial_from_selection.rb:63:in `each_with_index’
from /Users/jcf/Library/Application Support/TextMate/Bundles/Rails.tmbundle/Support/bin/create_partial_from_selection.rb:63
Yup, definitely a bug.
I won’t be releasing a new RC for this just yet, but for those who’d like an early patch, replace line 67 of create_partial_from_selection.rb with:
modules = current_file.modules + [current_file.controller_name]
Thanks again, Jens-Christian.
Works like a charm - thanks!
I get an exception every time I use render :text => ‘blah’. I often render text instead of a template in very simple ajax actions. Removing the plugin gets rid of the exception. Here’s the full exception:
TypeError (can’t convert nil into String):
/vendor/plugins/textmate_footnotes/lib/textmate_footnotes.rb:33:in `expand_path’
/vendor/plugins/textmate_footnotes/lib/textmate_footnotes.rb:33:in `filter’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/filters.rb:358:in `call_filters’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/filters.rb:350:in `call_filters’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/filters.rb:345:in `after_action’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/filters.rb:333:in `perform_action_without_benchmark’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue’
/usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/rescue.rb:82:in `perform_action’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:369:in `process_without_session_management_support’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/session_management.rb:116:in `process’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:38:in `dispatch’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:141:in `process_request’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:53:in `process!’
/usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:600:in `each_cgi’
/usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each_cgi’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in `process!’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:22:in `process!’
/Users/pergesu/work/gjdining/public/dispatch.fcgi:24
Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error)
Hi, did you read my mail concerning the bug with different routes? I thing it is still inside in RC4
Errno::ENOENT in Admin/general#index
No such file or directory - /Users/beate/rails/myapp/app/controllers/controllers/admin/general_controller.rb
Pat: Are you sure you re-installed the footnotes plugin after upgrading? I no longer get that error when rendering :text in my controller’s actions.
Even if you’ve installed the TextMate bundle, you would still need to upgrade your textmate_footnotes plugin from the bundle using ctrl-shift-\.
Beate: This seems to be working for me also–perhaps the same issue as Pat? Email me if you’re still having trouble and we can try to work this out together.
Followup: It turns out Beate had two or more versions of the Rails bundle installed in TextMate. Once the latest textmate_footnotes was installed, his problem went away.
Duane,
You were right on, I just didn’t update the plugin. Didn’t even think to do that *duh*
[...] Just a little note to say the syncPEOPLE on Rails Bundle for TextMate has reached 1.0 and is ready for download. Visit the syncpeople.com downloads page for links. [...]
Hi Duane,
Thanks for the excellent bundle. I’m trying to use the jump to file stuff but it seems to be getting the path wrong. It looks something like:
/Users/me/rails/test/app/controllers/txmt:/open?url=/Users/…..
Is this a bug or am have got something set up wrong?
Thanks,
Dan