Rails Is A Tease
So it’s been ages since I’ve posted here, partly because of lack of time, partly due to apathy, and partly because I’ve just been too lazy to get off my ass and get stuff done.
So last night at the FV.rb meeting, after hearing @milesforrest talked a bit about a project idea, I said something to the affect of, “lets just start going, code that puppy!”
The idea was simple, first step was to set up simple user registration system. Devise Warden was the choice at the moment to use, so we created the base rails app, and ran through the readme and….
Failed.
Complete and utter failure. The simple step 2 of 3 was “add this line into your config/application.rb” and we ended up working for maybe another 30 minutes to get it working before we were going to be kicked out and had to head home.
And that brings me (slowly) back around to the title. Rails purports itself to be quick and easy and “hey look, just create a scaffold and all this stuff just works and it all is just built for you”, but the real reality is, or seems to be, that first of all, no one uses scaffolding for anything other than demos, and secondly, the ease of use that Rails presents itself with seems to be not that available to the newbies (such as myself) in the form of bad documentation (no slight on the Devise guys, it’s more than likely that they were writing towards people who actually had a iota of clue as to what they were doing), not knowing enough about Rails itself, or the components sucked in by the gem (in this case, ActionMailer), or a host of other things.
For the newbies though it’s a rude awakening when to jump into a (very) small project “to learn” and get stopped basically at step one.
Still, it is a learning experience, and given the time I’m sure we would have figured it out, or tried any of the myriad of other web authentication gems and gotten one of them working. I’m glad it happened in fact, if only to see that it’s not only me that has these things happen!
No related posts.
November 5th, 2009 at 3:17 pm
Hey, I’m José Valim, from Plataforma which released devise.
I’m sorry you could not having it working through the README steps, maybe we forgot about something while writing it.
However, I cannot understand in which step you failed, which Rails version you were using and so on. So could you please provide more information, so other people don’t get stuck like you unfortunately did?
Thanks!
November 5th, 2009 at 3:38 pm
Holy crap, talk about fast response!
Basically this was on a macbook using the latest stable rails 2.3.4 with the latest stable ruby (1.8.7). We did:
– Created the app with rails myapp
– Installed the gem and completed the other instructions in the ‘installation’ section of the readme.rdoc (http://github.com/plataformatec/devise/blob/master/README.rdoc)
– The instructions basically said to use the generators to make it all easy, so we ran “ruby script/generate devise_install”
– In the output instructions there it had 3 next steps to do. The second, adding a Nofity.x.x (setting the sending email address for the mailing system I believe) to the config/application.rb was where things broke, and adding that line at the start, middle or end of the file would cause us to not be able to start the script/server and it would break with an error relating to an undefined something something (most likely to do with not pulling the ActionMailer into the proejct)
Unfortunately I don’t have access to the same system right now and my attempt to duplicate the problem on my linux box is failing for other reasons (undefined method middleware). *sigh*
November 5th, 2009 at 3:52 pm
Ok, so it can maybe be related with Devise version (we had Notifier, but it was renamed to DeviseMailer). If you have a chance to try it again, please count on me to have it running!
Regards!
November 5th, 2009 at 3:54 pm
I’m working on a clean install of ruby and rails via RVM on my linux box now, and if I can duplicate the issue I had I’ll email you directly with all versions and precise errors.
November 6th, 2009 at 3:57 am
I found where you got stucked. It’s our fault, you have to configure DeviseMailer.sender and Notifier.sender. I forgot to fix generator output when I renamed the model.
March 7th, 2010 at 11:07 pm
[...] of rails. Hell, this is a new and hardly read or written blog and I’ve written about it two [...]