Can't find user ID

I redid my code, before I tried using the friendship-plugin
"has_many_friends" but it got messy and wrong, so I borrowed "PRACTICAL
RAILS FOR SOCIAL NETWORKING" from the library. I'm trying to use the
book's example "ADDING FRIENDS WITH XFN_DETAILS" together with the
"RESTful authentication"-plugin (which otherwise workes great), but I
can't seem to get it to work right when implementing friendships.

The book refers to "logged_in_user" to get the USER which is logged in,
while I refer to "current_user" (from RESTful authentication). I
thought, in this case I only have to change the "logged_in_user" to
"current_user" and that would somewhat be the only change needed from
the books example. This didn't work. So I tried to implement,
"logged_in_user" (in the lib/ authenticated_system.rb) alongside the
"current_user" but I recieved the same error, which lead me to believe
there is something else which is wrong. It renders an error:

"ActiveRecord::RecordNotFound in FriendsController#new
Couldn't find User without an ID"

as I try to access
"http://localhost:3000/users/1/friends/new?friend_id=2" to create a
friend

It should (in my humble opinion) find a user - and yes, I've got 2 users
in my users table.
I've been trying for like two weeks total to understand and implement
different friendship solutions, and I'm beginning to understand (and I
thought I understood today) but I'm sort-of running out of patience....

I'd be so appriciative to anyone who could help me with this.

There's a typo here. You'll save a lot of time if you're able to work round this sort of problem yourself. Step through your code line by line or with the debugger and just work things out.

Fred

(PS: although posting a message with no details is unlikely to elicit a helpful answer, there's a happy medium between than and nearly 500 lines of code)

Fred