90% of documentation outdated?

I have been trying for a few days to set up a basic user registration/
login system with rails 3 and nearly every single piece of
documentation is outdated. Restful_authentication has several git
branches, none of which appear to result in a working installation.
All of them leave me with “could not find generator authenticated”.

With Devise: “could not find generator devise” Which I only got
slightly installed after finding some guy’s blog entry on the subject.

authlogic finally got installed and I could generate some models but
the documentation broke down when the singular guide I could find for
rails 3 was unable to account for an uninitialized constant
userSessionController. I could not find much of any documentation on
the general “uninitialized constant” error anywhere.

I still see most references saying to use “script/*” method.

Am I better off downgrading to some old version of rails? Or have I
just been horribly wrong in everything?

I would really like to use rails for my projects, but it seems as
though there is no unification in the project. Nothing works together
from moment to moment, and updates seem to break every thing. If
rails 3 is too new, what is the recommended rails version with
compatibility with plugins in mind? Or can anyone suggest a
registration/authentication framework/plugin for rails 3 that has
concise clear and functional documentation that isn’t fragmented and
pieced together from semi-working examples taken from blog sites?

aperture science wrote:

I have been trying for a few days to set up a basic user registration/
login system with rails 3 and nearly every single piece of
documentation is outdated.

Probably because Rails 3 just came out and not everything’s been updated
yet.

Restful_authentication has several git
branches, none of which appear to result in a working installation.
All of them leave me with “could not find generator authenticated”.

Glad to hear it. restful_authentication is bad. Avoid.

[…]

authlogic finally got installed and I could generate some models but
the documentation broke down when the singular guide I could find for
rails 3 was unable to account for an uninitialized constant
userSessionController. I could not find much of any documentation on
the general “uninitialized constant” error anywhere.

It just means that you have a constant (usually a class name, but could
be any constant) that the interpreter has never heard of. In this case,
that means that it wasn’t seeing the UserSessionController definition.

There are people using Authlogic with Rails 3, I think. A quick Google
search on “authlogic rails 3” yields lots of hits.

I still see most references saying to use “script/*” method.

Am I better off downgrading to some old version of rails?

Probably not.

Or have I
just been horribly wrong in everything?

I don’t know.

I would really like to use rails for my projects, but it seems as
though there is no unification in the project.

There’s lots of unification in the Rails project. Third-party gems are
another story, of course.

Nothing works together
from moment to moment, and updates seem to break every thing.

That’s not really true in general. You’re coming in as version 3 – a
complete rewrite – gains traction. Of course things will break.

If
rails 3 is too new, what is the recommended rails version with
compatibility with plugins in mind? Or can anyone suggest a
registration/authentication framework/plugin for rails 3 that has
concise clear and functional documentation that isn’t fragmented and
pieced together from semi-working examples taken from blog sites?

Authlogic should work, from what I understand. Have you taken the time
to understand the Rails framework and the Ruby language before getting
plugins working?

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

aperture science wrote:

I have been trying for a few days to set up a basic user registration/
login system with rails 3 and nearly every single piece of
documentation is outdated.

This is not uncommon on the open source. With the vast number of changes
from Rails 2.x to Rails 3.0 It’s my feeling the community has done an
outstanding job of updating the critical documentation. Of course the
conversion isn’t complete, but I think your 90% figure is far to high.

Restful_authentication has several git
branches, none of which appear to result in a working installation.
All of them leave me with “could not find generator authenticated”.

I would highly recommend against restful_authentication. Most Rails
developers have moved to the better solutions like Devise and Authlogic.

With Devise: “could not find generator devise” Which I only got
slightly installed after finding some guy’s blog entry on the subject.

I’m not sure about Devise, I’ve started implementing in Rails 3 and had
no problem running the generator with the documented Rails 3 command:

rails generate devise:install

Are you sure that your Rails 3 environment, and Ruby, is installed and
configured properly?
What platform are you using? (Operating system, Ruby version, RVM, etc)

authlogic finally got installed and I could generate some models but
the documentation broke down when the singular guide I could find for
rails 3 was unable to account for an uninitialized constant
userSessionController. I could not find much of any documentation on
the general “uninitialized constant” error anywhere.

I’ve not tried Authlogic. However unless “userSessionController” is just
a typo in this forum post I can certainly see why you would get an
“uninitialized constant” error since class names should be upper camel
case (e.g. UserSessionController). That’s basic Ruby and has nothing to
do with poor documentation on the part of Rails or Authlogic.

I still see most references saying to use “script/*” method.

Why is that a big deal? Rails 3 documentation
(The Rails Command Line — Ruby on Rails Guides) clearly states the
usage of the new commands (e.g. rails generate (g), rails server (s),
etc.).

Am I better off downgrading to some old version of rails? Or have I
just been horribly wrong in everything?

I’d say no. For anyone starting out with Rails I’d recommend learning
Rails 3.

Given this stuff is all open source I’d say to start getting used to
figuring things out for yourself. This is a community effort. Most
people working on Rails have other jobs as well. Documentation is
“owned” by the community. Rather than complain about the documentation
start contributing to fix it. If you find something wrong fix it and
submit it. I’m sure the Rails team would appreciate such contributions.

I would really like to use rails for my projects, but it seems as
though there is no unification in the project. Nothing works together
from moment to moment, and updates seem to break every thing. If
rails 3 is too new, what is the recommended rails version with
compatibility with plugins in mind? Or can anyone suggest a
registration/authentication framework/plugin for rails 3 that has
concise clear and functional documentation that isn’t fragmented and
pieced together from semi-working examples taken from blog sites?

I have, so far, not run into any of the issues you’ve mentioned with my
experimentation with Devise. I found their documentation to be clear,
concise and accurate. I think you have some other problems with your
setup.

On Fri, Oct 8, 2010 at 4:49 AM, aperture science [email protected]
wrote:

I have been trying for a few days to set up a basic user registration/
login system with rails 3 and nearly every single piece of
documentation is outdated.

http://www.railsapi.com/doc/rails-v3.0.0_ruby-v1.9.2/

There’s a very nice authentication system described in the Rails book:

http://pragprog.com/titles/rails4/agile-web-development-with-rails


Greg D.
destiney.com | gregdonald.com

I am on Rails 3 and using authlogic, I followed Ryan B. RailsCast
#160 on
the matter and things worked (although the cast was using an older
version).
I relate to your pain though. I know there is light at the end of the
tunnel
but I have been cursing a lot and having flashbacks to my C#.net days.

Good thing is the Rails community overall is pretty helpful. If you can
give
me some more specifics I could compare with my code. Also, may or may
not
make a difference but I am using Ruby 1.9.2.

David

I just set up authlogic with rails 3 last week, this forum was super
helpful
http://www.ruby-forum.com/topic/204464

I followed this post Authlogic Rails 3 - Rails - Ruby-Forum and
it
Just Worked

Thanks for all the replies. I took advice and ditched trying to get
restful-authentication to work, and re-focused on authlogic.

I have been able to piece together a semi-working system now. More or
less… I can log in and view a page only accessible to registered
members now. I am trying to devise a manner to display only certain
content on my main index to authenticated visitors, I don’t know if i
can put something like an “if(authenticated) #hidden” line into my
main index.haml, but that is probably beyond the scope of this thread.

I did not realize just quite how new and different rails 3 is compared
to previous versions. But I look forward to developing further with
the framework as I really like how it all works (when I am able to get
it to work, at least).

Part of my initial frustrations I believe were a result of not
understanding some of the basic concepts, plus I’ve been trying to
develop on Windows, which has it’s own heap of frustrating ‘features’,
but I am starting to get the hang of it.

Thanks again.

aperture science wrote:

Thanks for all the replies. I took advice and ditched trying to get
restful-authentication to work, and re-focused on authlogic.

Good move. :slight_smile:

I have been able to piece together a semi-working system now. More or
less… I can log in and view a page only accessible to registered
members now. I am trying to devise a manner to display only certain
content on my main index to authenticated visitors, I don’t know if i
can put something like an “if(authenticated) #hidden” line into my
main index.haml, but that is probably beyond the scope of this thread.

Sounds like you’re missing a key difference between authentication and
authorization. Authlogic is designed to provide authentication (is this
user’s identity valid). Authorization asks, “Can this authenticated
user, or group of authenticated users, allowed to read/write/delete this
data?”

For authorization I’d recommend looking into something like CanCan:

I did not realize just quite how new and different rails 3 is compared
to previous versions. But I look forward to developing further with
the framework as I really like how it all works (when I am able to get
it to work, at least).

A lot of really great work has gone into Rails 3. I’m really liking what
I’ve seen so far.

Part of my initial frustrations I believe were a result of not
understanding some of the basic concepts, plus I’ve been trying to
develop on Windows, which has it’s own heap of frustrating ‘features’,
but I am starting to get the hang of it.

Exactly why I gave up on Windows a long time ago. As my personal choice
I develop on a Mac and deploy to Ubuntu. That’s not intended to be
“troll food” to start a platform war, but I have heard a lot frustration
from people trying to develop Rails on Windows. I know it can be done,
and hopefully things are getting better. However, it is true that a lot
of Rails revolves around traditionally UNIX based tools (Git, SQLite,
MySQL, PosgreSQL, etc.). Having a UNIX based system just seems to make
all that work seamlessly.