nil.[] on line #1 no matter what

2 views
Skip to first unread message

Kunal Shah

unread,
Aug 24, 2011, 7:36:34 PM8/24/11
to restfulie
I *badly* want to use tokamak and restfulie, but I've had no success
today.

Just to see if it was my tokamak code or something else, I threw the
example code into my index, and renamed my instance var to match.


ActionView::TemplateError (You have a nil object when you didn't
expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]) on line #1 of app/views/
api/posts/index.tokamak:
1: debugger
2: collection(@some_articles) do |collection|
3: collection.values do |values|
4: values.id "http://example.com/json"

tokamak (1.2.1) lib/tokamak.rb:10:in `builder_lookup'
app/views/api/posts/index.tokamak:1:in
`_run_tokamak_app47views47api47posts47index46tokamak'

It *doesn't* matter what line 1 is.. it always gives this error back.

Adriano Henrique de Almeida

unread,
Aug 26, 2011, 9:37:54 AM8/26/11
to rest...@googlegroups.com
Hi Kunal,

could you please provide us what gems at which version you are using? Your Gemfile.lock would be nice, if possible. So we can try to replicate your issue.

Regards

2011/8/24 Kunal Shah <ku...@urtak.com>



--
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br

Reply all
Reply to author
Forward
0 new messages