zanoni
November 8, 2006, 1:40pm
1
Anyone use this pdf ?
Already ran into an error and checked O’Reilly site and there is no
errata
submitted to date.
I’m getting an error in the first example (Yahoo search using REST)
NoMethodError in Code#yahootest
Showing app/views/code/yahootest.rhtml where line #2 raised:
undefined method `text’ for #REXML::Text:0x388fb50
Controller -
class CodeController < ApplicationController
def yahootest
query = CGI.escape(“SEARCH TEXT”) #URL encoded search value
yahookey = “19571957”
url = “http://api.search.yahoo.com/ ” +
“WebSearchService/VI/webSearch?” +
“appid=#{yahookey}&query=#{query}” +
“&results=3&start=1”
result = Net::HTTP.get(URI(url))
@doc = REXML::Document.new result
end
end
View-
<% @doc.root.each_element do |res| %>
Title: <%= res[0].text.to_s %>
Summary: <%= res[1].text.to_s %>
Link: <%= res[2].text.to_s
%>
<% end %>
??? Anyone know what’s wrong
Stuart
–
Dark ambient (referred to as ambient industrial especially in the 1980s) is a genre of post-industrial music that features an ominous, dark droning and often gloomy, monumental or catacombal atmosphere, partially with discordant overtones. It shows similarities with ambient music, a genre that has been cited as a main influence by many dark ambient artists, both conceptually and compositionally. Although mostly electronically generated, dark ambient also includes the sampling of hand-pla
The te...
zanoni
November 8, 2006, 2:35pm
2
After changing some of the code for the Yahoo test and then trying the
Google test, I’m getting 404 errors:
Not Found `/code/googletest’ not found.
WEBrick/1.3.1 (Ruby/1.8.4/2005-12-24) at localhost:3000
On 11/8/06, Dark A. [email protected] wrote:
result = Net::HTTP.get(URI(url))
%>
<% end %>
??? Anyone know what’s wrong
Stuart
–
Dark ambient - Wikipedia
–
Dark ambient (referred to as ambient industrial especially in the 1980s) is a genre of post-industrial music that features an ominous, dark droning and often gloomy, monumental or catacombal atmosphere, partially with discordant overtones. It shows similarities with ambient music, a genre that has been cited as a main influence by many dark ambient artists, both conceptually and compositionally. Although mostly electronically generated, dark ambient also includes the sampling of hand-pla
The te...
zanoni
November 8, 2006, 2:57pm
3
Pretty weird after all was getting uninitialized constant in Application
Controller bug .
This is in 1.1.6
Updated to edge to finish off these two “quick” examples.
Stuart
On 11/8/06, Dark A. [email protected] wrote:
Anyone use this pdf ?
class CodeController < ApplicationController
end
<% end %>
–
Dark ambient - Wikipedia
–
Dark ambient (referred to as ambient industrial especially in the 1980s) is a genre of post-industrial music that features an ominous, dark droning and often gloomy, monumental or catacombal atmosphere, partially with discordant overtones. It shows similarities with ambient music, a genre that has been cited as a main influence by many dark ambient artists, both conceptually and compositionally. Although mostly electronically generated, dark ambient also includes the sampling of hand-pla
The te...