another problem with the book

24 views
Skip to first unread message

Roelof Wobben

unread,
Feb 11, 2015, 12:03:07 PM2/11/15
to nitro...@googlegroups.com
Hello,

After doing make I had to reboot my box.

After that I tried to add a visitors entry like the book said but I see this error message :

(n...@127.0.0.1)1> V1 = #visitor{date=Date, time=Time, name="Jesse James", company="Erlingo!"} .                                                                                         
* 2: record visitor undefined  

Roelof

Jesse Gumm

unread,
Feb 11, 2015, 12:06:36 PM2/11/15
to nitrogenweb
Records are not normally available in the erlang console, they have to
be imported into the console in order to be used.

So, that's why the previous instruction is to call rr(visitors_db).

That call imports any record definitions from that module into the
Erlang Shell so they can be used. Then the #visitors{} syntax will
work as expected.

But if you kill the VM and start it again, you'll have to re-import
the record definitions.

-Jesse
> --
> You received this message because you are subscribed to the Google Groups
> "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nitrogenweb...@googlegroups.com.
> To post to this group, send email to nitro...@googlegroups.com.
> Visit this group at http://groups.google.com/group/nitrogenweb.
> For more options, visit https://groups.google.com/d/optout.



--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm

Roelof Wobben

unread,
Feb 11, 2015, 12:50:20 PM2/11/15
to nitro...@googlegroups.com
Thanks,

Now I can work on the part of save things to the disk.

Roelof


Op woensdag 11 februari 2015 18:06:36 UTC+1 schreef Jesse Gumm:

ll...@writersglen.com

unread,
Feb 11, 2015, 1:04:05 PM2/11/15
to nitro...@googlegroups.com, nitro...@googlegroups.com
Hi Roelof,

I'm pleased to hear that you moved past your sticking point.

It would be helpful to us if you could point out the exact passages in the book that confused you.

All the best,

Lloyd

Thanks,

Roelof

> > (n...@127.0.0.1 <javascript:>)1> V1 = #visitor{date=Date, time=Time,

> name="Jesse James",
> > company="Erlingo!"} .
> > * 2: record visitor undefined
> >
> > Roelof
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups
> > "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an

> > email to nitrogenweb...@googlegroups.com <javascript:>.

> > To post to this group, send email to nitro...@googlegroups.com

> <javascript:>.

Roelof Wobben

unread,
Feb 12, 2015, 2:50:30 AM2/12/15
to nitro...@googlegroups.com
Hoi Lloyd,

I think if you read this question and the former one that I is clear what was confusing me.

Or do you want me to copy the exact text in the book.

Roelof


Op woensdag 11 februari 2015 19:04:05 UTC+1 schreef LRP:
Reply all
Reply to author
Forward
0 new messages