ubuntu 11.10 user here. Great script. Had to change the path of the script to "#!/usr/bin/ruby -Ku" and with the fix needed to change the single quotes manually as discussed above. Works well though. I came here because I couldn't get the more functional googlevoice.pl made by "http://www.0xdecafbad.com/2..." to work.
I get the same undefined method 'error!' as eric does, however it doesn't send, it works just fine on my Mac OSX 10.6, however, when run on xubuntu 11.04, it gives that error: I am running ruby 1.8.7 on my mac, and 1.9.3p0 on the xubuntu. What does it parse, I would prefer to run this with php, but the php on the original post's site is down. What does this look for on the page?
With some experience programming myself, I figured out that the authentication process was causing this error, and I realized I put my password in wrong. Commenting out the res.error does nothing because the program still jumps there; it just has nothing to do once it gets there so it continues with the program. In essence, all commenting it out does is remove the error message from the output, but it's still basically there.
Urgh.. sorry about double-posting. After getting through that, I got a 403 Forbidden, so I'm running under the assumption that Google is just being hard to work with. Any ideas?
First, thank you for such an elegant solution....I am attempting to run this on a windows box, using the Ruby193 install. It "appears" to work, if I # out this section :
else
# res.error! end
If I do not # those two lines, I get this error:
sms.rb:102:in '': undefined method 'error!' for nil:NilClass (NoMethodError)
When I do comment out the two lines noted above, the script runs, and returns to the command prompt returning nothing regarding success or failure. I am not a programmer per se, so I am a little lost in the code and hoping someone can help shed some light on this for me.
Has anyone come across this, or been able to get this to work properly with Windows?
Hey there, I'm on OS X 10.7.1 at the moment. I had to install ruby myself, so it's 1.9.2p290. I made the modification in this post, and I get this error: ░ me@computer [~] $ ./gvtext.rb -n +12345678901 -m "test" -u username:password ./gvtext.rb:88:in <main>': undefined method[]' for nil:NilClass (NoMethodError)
That means it's not finding _rnr_se in the returned text, which probably means that the authentication process is failing at some point. That would take more debugging than I can offer on this one, but you might start by dissecting the various calls and spitting the results out to console to see if you're getting expected responses.
Hehehe. I copied the fixed line from here. Didn't work, as shown. I ran rdebug with it. Says something about invalid multibyte character. Turns out, the single quotes weren't regular old single quotes, they were smart quotes. "‘" instead of "'". Works now! Thanks.
Comments
ubuntu 11.10 user here. Great script. Had to change the path of the script to "#!/usr/bin/ruby -Ku" and with the fix needed to change the single quotes manually as discussed above. Works well though. I came here because I couldn't get the more functional googlevoice.pl made by "http://www.0xdecafbad.com/2..." to work.
export
I get the same undefined method 'error!' as eric does, however it doesn't send, it works just fine on my Mac OSX 10.6, however, when run on xubuntu 11.04, it gives that error: I am running ruby 1.8.7 on my mac, and 1.9.3p0 on the xubuntu. What does it parse, I would prefer to run this with php, but the php on the original post's site is down. What does this look for on the page?
export
With some experience programming myself, I figured out that the authentication process was causing this error, and I realized I put my password in wrong. Commenting out the res.error does nothing because the program still jumps there; it just has nothing to do once it gets there so it continues with the program. In essence, all commenting it out does is remove the error message from the output, but it's still basically there.
export
Urgh.. sorry about double-posting. After getting through that, I got a 403 Forbidden, so I'm running under the assumption that Google is just being hard to work with. Any ideas?
export
First, thank you for such an elegant solution....I am attempting to run this on a windows box, using the Ruby193 install. It "appears" to work, if I # out this section :
else
# res.error!
end
If I do not # those two lines, I get this error:
sms.rb:102:in '': undefined method 'error!' for nil:NilClass (NoMethodError)
When I do comment out the two lines noted above, the script runs, and returns to the command prompt returning nothing regarding success or failure. I am not a programmer per se, so I am a little lost in the code and hoping someone can help shed some light on this for me.
Has anyone come across this, or been able to get this to work properly with Windows?
Much appreciated, and happy holidays!
Eric
export
Hey there, I'm on OS X 10.7.1 at the moment. I had to install ruby myself, so it's 1.9.2p290. I made the modification in this post, and I get this error:
░ me@computer [~] $ ./gvtext.rb -n +12345678901 -m "test" -u username:password
./gvtext.rb:88:in
<main>': undefined method[]' for nil:NilClass (NoMethodError)export
After you made your modifications, what is on line 88?
export
I also had added require 'jcode' if RUBY_VERSION < '1.9' for the other fix.
export
That means it's not finding
_rnr_sein the returned text, which probably means that the authentication process is failing at some point. That would take more debugging than I can offer on this one, but you might start by dissecting the various calls and spitting the results out to console to see if you're getting expected responses.export
Hehehe. I copied the fixed line from here. Didn't work, as shown. I ran rdebug with it. Says something about invalid multibyte character. Turns out, the single quotes weren't regular old single quotes, they were smart quotes. "‘" instead of "'". Works now! Thanks.
export
rnrse = CGI.escape(newres.match(/‘_rnr_se’: ‘([^’]+)’/)[1])
export
This is a great. I was using a gem but it stopped working when this changed happened. Thanks for the post saved me a lot of time.
Is there any way to grab all text messages in my inbox? I would like to be able to send and receive text messages in terminal.
export
Happy to help. The gist is awesome. Thanks for doing the work to get it 99% there!
Just need to initiate calls via the command line, and we'd be golden.
export
Here is gist of the script with both fixes applied: https://gist.github.com/1204446
export
It was line 88 for me, not line 90. Specifically, the line to be replaced was this one:
Also, to get the script working in ruby 1.9, remove
-rjcodefrom the first line and addon, say, line 8. (For an explanation, see this.]
export
Thanks for the clarification, added the details to the main post!
export