After a year and half of development and testing and some hints to the world at large now and then, I've finally decided to release RubyFrontier into the wild.
RubyFrontier is a TextMate bundle. It implements a Web site framework basically modelled after the UserLand Frontier Web site framework, written in Ruby. In other words, it's a tool for writing and maintaining Web sites.
Documentation and description here:
http://www.apeth.com/RubyFrontierDocs/default.html
Incredibly great new screencast here (rather long, take it in stages or at least have a coffee machine sitting next to you the whole time):
http://www.apeth.com/rubyFrontier.mov
The download:
http://sourceforge.net/projects/rubyfrontier/
Share and enjoy. Tell a friend (if you have one). m.
PS I don't want to make a big sentimental thing of this, but just for the record, this would have been *totally* impossible without TextMate. I was completely up a creek about how to migrate out of Frontier until I realized that TextMate would handle the whole interface for me.
Ahem... when I try 'New Site' I get this error:
2009-07-24 19:43:33.673 defaults[26853:10b] The domain/default pair of (com.neuburg.matt.rubyFrontier, userrb) does not exist sh: /Library/Application: No such file or directory Warning: Require failed This could cause trouble later... or not. Here's the error message we got: no such file to load -- exifr No $userrb specified, did not load a user file.
The sh line is puzzling, something should have been escaped and was not?
Thanks, Piero
On 7/24/09 10:45 AM, in article loom.20090724T174344-82@post.gmane.org, "Piero D'Ancona" pierodancona@gmail.com wrote:
Ahem... when I try 'New Site' I get this error:
2009-07-24 19:43:33.673 defaults[26853:10b] The domain/default pair of (com.neuburg.matt.rubyFrontier, userrb) does not exist sh: /Library/Application: No such file or directory Warning: Require failed This could cause trouble later... or not. Here's the error message we got: no such file to load -- exifr No $userrb specified, did not load a user file.
Could you email me separately about this?
When you do, I'm going to want to know - It's not actually an error, really, is it? It's just a series of warnings - informational messages - so you can ignore it. Isn't that so? What I mean is, New Site still works - yes?
RubyFrontier is full of informational messages.
If New Site doesn't *work*, that's a different matter. I already have a theory... :)
m.
On 7/24/09 10:45 AM, in article loom.20090724T174344-82@post.gmane.org, "Piero D'Ancona" pierodancona@gmail.com wrote:
when I try 'New Site' I get this error:
Another problem I'm having with this report is that 'New Site' does not produce any output, so I don't understand where you'd even *see" an error message or any other kind of message... m.
Matt Neuburg <matt@...> writes:
On 7/24/09 10:45 AM, in article loom.20090724T174344-82@..., "Piero D'Ancona" <pierodancona@...> wrote:
when I try 'New Site' I get this error:
Another problem I'm having with this report is that 'New Site' does not produce any output, so I don't understand where you'd even *see" an error message or any other kind of message... m.
I did the following: opened a new window, changed to Plain Text, saved as untitled.txt, issued the command 'New Site' and nothing happened, repeatedly.
So I changed the output to 'Create New Document' in the vain attempt to understand what was happening. The text I pasted in my letter was the output of the command.
If you need more details I'll write to your private address, don't hesitate to ask
Piero
On 7/24/09 10:45 AM, in article loom.20090724T174344-82@post.gmane.org, "Piero D'Ancona" pierodancona@gmail.com wrote:
Ahem... when I try 'New Site' I get this error:
OK, found and fixed. As you rightly say, it's just escaping; wrap double quotes around the path-to-CocoaDialog expression in userland_class_methods.rb and you're all set. And I'll do a release incorporating this as well.
Just one of those little things I didn't catch because my path-to-TextMate happens to have no spaces. Sorry about that. All the other shell paths are properly quoted; this was the only one I missed.
The other stuff you reported really is just warnings you can ignore. You can set the output back to Discard now... :) m.
On 7/24/09 10:45 AM, in article loom.20090724T174344-82@post.gmane.org, "Piero D'Ancona" pierodancona@gmail.com wrote:
Ahem... when I try 'New Site' I get this error
This error, and many others that Piero is getting when he tries to use my bundle, is due to the fact that there's a space somewhere along the path to wherever he has installed TextMate.app.
My question is - is it reasonable to me to request that he just Not Do That? It seems to me that the hoops I would have to jump through in order to accommodate this situation would be prohibitive. What are other bundle authors doing about this? Thx - m.
hmm. I'm guessing many people will have a space in the path. is it not feasible to just pass the path once through escapeshellarg() or escapeshellcmd() (or whatever they are in Ruby) at the top of the script?
i.e.,
$rawPath = "s pa ce"; $Path = escapeshellcmd($rawPath);
On 24 Jul 2009, at 23:55, Matt Neuburg wrote:
On 7/24/09 10:45 AM, in article loom.20090724T174344-82@post.gmane.org, "Piero D'Ancona" pierodancona@gmail.com wrote:
Ahem... when I try 'New Site' I get this error
This error, and many others that Piero is getting when he tries to use my bundle, is due to the fact that there's a space somewhere along the path to wherever he has installed TextMate.app.
My question is - is it reasonable to me to request that he just Not Do That? It seems to me that the hoops I would have to jump through in order to accommodate this situation would be prohibitive. What are other bundle authors doing about this? Thx - m.
-- matt neuburg, phd = matt@tidbits.com, http://www.tidbits.com/matt/ A fool + a tool + an autorelease pool = cool! AppleScript: the Definitive Guide - Second Edition! http://www.tidbits.com/matt/default.html#applescriptthings
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On 7/24/09 4:13 PM, in article 8C7F4FD1-DB7A-4B8B-9D4C-52F66E12C257@gmail.com, "Timothy Bates" timothy.c.bates@gmail.com wrote:
hmm. I'm guessing many people will have a space in the path. is it not feasible to just pass the path once through escapeshellarg() or escapeshellcmd() (or whatever they are in Ruby) at the top of the script?
i.e.,
$rawPath = "s pa ce"; $Path = escapeshellcmd($rawPath);
Yeah, in other words you're telling me that I just have to suck it up. Well, that's what I'm trying to do...! :)
What really caught me with my pants down is that in Ruby, a path used in IO.popen has to receive explicit escaping, although a path used in (say) "require" does not. However, I believe my pants are now back up again.
I did notice, though, doing a Google search on stuff like "TextMate space pathname", that I'm not the only person ever to encounter this issue.
m.
On 25 Jul 2009, at 01:53, Matt Neuburg wrote:
What really caught me with my pants down is that in Ruby, a path used in IO.popen has to receive explicit escaping, although a path used in (say) "require" does not. However, I believe my pants are now back up again.
IO.popen effectively hands over your string to the shell, so it goes through normal shell parsing.
I did notice, though, doing a Google search on stuff like "TextMate space pathname", that I'm not the only person ever to encounter this issue.
Yeah, it is a very common problem. What you need to do is add this line:
require ENV['TM_SUPPORT_PATH'] + '/lib/escape'
Then whenever you send a string to the shell, use the e_sh function to properly escape it. E.g.:
path = "some path with spaces" dst = ENV['TMPDIR'] || "/tmp"
IO.popen("cp #{e_sh path} #{e_sh dst}", …)
Though since we are sending the string to the shell we can also use shell variables and quote those to account for potential spaces, e.g.:
IO.popen("cp #{e_sh path} "$TMPDIR"", …)
Or more true to the org. code:
IO.popen("cp #{e_sh path} "${TMPDIR:-/tmp}"", …)
On 7/26/09 3:03 AM, in article A2161761-80B3-4D46-8D67-D3968371A7FB@textmate.org, "Allan Odgaard" mailinglist@textmate.org wrote:
Yeah, it is a very common problem. What you need to do is add this line:
require ENV['TM_SUPPORT_PATH'] + '/lib/escape'
Then whenever you send a string to the shell, use the e_sh function to properly escape it. E.g.:
path = "some path with spaces" dst = ENV['TMPDIR'] || "/tmp" IO.popen("cp #{e_sh path} #{e_sh dst}", )
Thanks - I did that as my first solution, but then I realized that since the whole thing was going to the shell I could escape it by quoting it, just as I would do in the shell:
IO.popen(%{"#{ENV['TM_SUPPORT_PATH']}/bin/Markdown.pl"}, ...)
or whatever. That seems to be working... m.