Closed GoogleCodeExporter closed 8 years ago
What the heck is Cal::GData? There is nothing in the gem named that.
Also what example code are you referencing?
Original comment by jfis...@youtube.com
on 14 Apr 2009 at 5:53
Cal is the name of my Controller class.
I used the "Example readonly request to YouTube" within Cal
def index
yt = GData::Client::YouTube.new
feed = yt.get('http://gdata.youtube.com/feeds/api/standardfeeds/top_rated')
end
Is there anything to require/include you haven't mentioned?
Original comment by fabri...@gmail.com
on 14 Apr 2009 at 6:21
I'm curious about this line of the trace:
/Users/fabrik42/Dev/Rails/testGdata/app/models/cal.rb:5:in `fetch_gdata'
How is a model being involved here? What's at line 5 of it? Where is the
cosntant
"Cal::GData" being referenced?
Original comment by jfis...@youtube.com
on 14 Apr 2009 at 6:31
oh sorry my fault. this was the first try, where I put the example in a method
of a
model (same method like above, but named fetch_gdata). Line 5 is:
yt = GData::Client::YouTube.new
I'm pretty new to Ruby on Rails, but it seems like Rails is thinking GData has
to be
a subclass of my Controller or Model?!
Original comment by fabri...@gmail.com
on 14 Apr 2009 at 6:36
Hmm are you requiring the gem somewhere? :)
Original comment by jfis...@youtube.com
on 14 Apr 2009 at 6:38
Hum... I got it! XD
I looked through the source code of your demo app and I forgot to add the line
config.gem 'gdata', :lib => 'gdata'
to my config/enviroment.rb file.
Maybe you want to mention this somewhere, for other rails newbies like me.
Sorry for wasting your time, but thanks a lot for your patience!
Original comment by fabri...@gmail.com
on 14 Apr 2009 at 6:46
No worries, glad you figured it out. I'm actually sort of a Rails n00b myself,
not
having designed the client for rails in particular but rather to be used in any
Ruby
environment. :)
Perhaps a future goal is to have a zipped up example Rails project that demos
the use
of the API with a README documenting the important bits.
Original comment by jfis...@youtube.com
on 14 Apr 2009 at 6:51
Well, I think the article at
http://code.google.com/intl/de-DE/apis/gdata/articles/gdata_on_rails.html is a
very
good explanation.
Maybe it's just to well written and I switched my brain off to early. ;)
Original comment by fabri...@gmail.com
on 14 Apr 2009 at 7:11
Original issue reported on code.google.com by
fabri...@gmail.com
on 14 Apr 2009 at 2:49