|
Jam2 posted:I need to create a key for the first_letter. It doesn't exist when I do Unfortunately there can be a problem using a default object: code:
code:
Soup in a Bag fucked around with this message at 05:08 on Jun 17, 2011 |
# ¿ Jun 17, 2011 05:03 |
|
|
# ¿ Apr 27, 2024 08:53 |
|
Defghanistan posted:Well I actually am choking on a ruby error, since chef is checking the .rb file against ruby syntax- so the powershell part of it is moot right now aside from the fact that it has to pass ruby syntax muster. I'll look into that, thanks. You're still getting the same error? I'm guessing that this: "invalid multibyte char (US-ASCII)" is the important clue. Just looking at line 104 in your first paste (line 10 in your latest paste), it seems like the '-' in "-Type Directory" is bigger than your other '-'s. Maybe that's what it's complaining about?
|
# ¿ Jun 17, 2011 20:49 |
|
There's String#empty?, but no NilClass#empty? method. If r.email is nil rather than an empty String you'll get that error.
|
# ¿ Jun 29, 2011 00:34 |
|
Juz posted:I'm trying to use that function to return the contents of a file from the FTP server into a variable rather than write it to a file. The comment for the function says "If localfile is nil, returns retrieved data" and it looks from the source like the intention is there to be able to do this, but I can't see how you can do this given that it sets localFile = File.basename(remotefile) in the argument list. Which version of Ruby are you using? That documentation link from your earlier post is for 1.9. In 1.8, #gettextfile doesn't have the option of not writing to a file and passing nil would result in the error you're getting. e: But in 1.9 what you're attempting would work. Soup in a Bag fucked around with this message at 17:25 on Sep 7, 2011 |
# ¿ Sep 7, 2011 17:08 |
|
Are you calling include inside a method definition? I don't think you can do that. It should work at the top level or as part of a Module/Class definition though. But you don't have to use include. For example, if your TestModule contains a class called TestClass, you could use either: code:
code:
|
# ¿ Dec 22, 2011 17:31 |
|
It's been a while since I've played with Shoes, but everything has show/hide/toggle methods for visibility and a remove method. Slots also have a clear method to remove their contents. The manual covers all that and more.
|
# ¿ Feb 4, 2012 11:12 |
|
SquadronROE posted:I'm learning Ruby right now, going through the Koans and I'm trying to create a method for one of the exercises. Right now, though, I'm stuck on trying to match up a set of numbers to an array. Nope. It will look for the object it's passed (in this case the entire array) and that's it. Ruby code:
|
# ¿ Mar 15, 2013 22:58 |
|
If you want to read the entire stream in and then use it as if it were a file, check out StringIO. It responds to #rewind and all the other File/IO-ish methods.
|
# ¿ Nov 9, 2013 01:44 |
|
|
# ¿ Apr 27, 2024 08:53 |
|
Peristalsis, ssh has NumberOfPasswordPrompts as a config option (see man ssh_config). I don't know if Net::SSH gives access to those. On the command line it'd be code:
|
# ¿ May 29, 2015 23:05 |