Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Open link/DL file

Reply
Thread Tools

Open link/DL file

 
 
Erik Boling
Guest
Posts: n/a
 
      08-09-2007
I was wondering what the command is for Ruby to DL files, and or open
links on the internet?My favorite radio station has this link that feeds
you the live radio via- real player or windows media player. My goal is
to be able to write a program that downloads a live feed from a radio
station that i like to listen to,
then i could put the program on schedule tasks and you that as my alarm
clock. *If your wondering, no i cant just go get a radio, i dont get
that station where i am at*
Much thanks for any help!
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Roger Pack
Guest
Posts: n/a
 
      08-09-2007
look up open-uri
Erik Boling wrote:
> I was wondering what the command is for Ruby to DL files, and or open
> links on the internet?My favorite radio station has this link that feeds
> you the live radio via- real player or windows media player. My goal is
> to be able to write a program that downloads a live feed from a radio
> station that i like to listen to,
> then i could put the program on schedule tasks and you that as my alarm
> clock. *If your wondering, no i cant just go get a radio, i dont get
> that station where i am at*
> Much thanks for any help!


--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Erik Boling
Guest
Posts: n/a
 
      08-09-2007
Roger Pack wrote:
> look up open-uri

Well i have tried looking that up on google, and other different key
words, but still i cant get what i'm looking for. It's all talking about
reading from the web page and putting into to hashes and what not. I
just want to open the web page.
I tried doing,
require 'open-uri'
open('http://kexp.org/audio/kexp.wmx')
this is what i thought you should do, but all the sites have all
this other fancy code in there so i'm not sure?
if you type this in on address bar it works
but nothing happens when i try and write it like that?
Any more suggestions?
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Erik Boling
Guest
Posts: n/a
 
      08-10-2007
Prime wrote:
> I think if I understand you correctly you just want to open the link in
> a browser instance?
> if you are on windows you might want to check this out:



I'm not sure if I'm totally lost on how to install the gem watir? I
download the gem, but then to you have to install it i guess in cmd from
what I'm reading online. so i save the watir.gem in "c" drive and type
in on cmd
C:\>gem install watir
but i get this message saying that gem is not a recognizable command?
what am i doing wrong?
On a side note, i don't have a very clear idea of what ruby gems is
*exactly* does any one know of any good sites to explain what it all is?
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Erik Boling
Guest
Posts: n/a
 
      08-10-2007
Prime wrote:
> A gem is...
> http://rubygems.org/read/chapter/1#page22

Ah, thanks, thats funny i just found that site before i read you post
.

now does anyone know what i'm doing wrong when i'm installing this gem?

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Program to open a file in binary, skip X bytes and write the rest ofthe file to a new file scad C++ 4 05-28-2009 08:47 AM
Re: how to open a file in some application using Tkinter i am usingTKINTER to create GUI application i want to know how to open a worddocument in open office or any other applicatio Fredrik Lundh Python 1 01-09-2008 10:40 AM
File::open and File.open Schüle Daniel Ruby 4 10-24-2006 09:34 PM
Why cannot open .txt file with Encoding = UNICODE using javascript window.open()? ml Java 0 11-30-2004 07:43 AM
How do I open a database connection on an access file that currently open ? THY ASP .Net 4 08-22-2003 03:50 PM



Advertisments