Installing custom gems

software development


I need to install the ‘login-generator’ rails gem package. I can install this package to my rails applications ‘lib’ folder, but how do I configure rails to look in that folder for the ‘login-generator’ package?




First, the login-generator (and salted-login-generator) are already availble. Use ‘gem list’ to see what gems are installed.

However, unless you’re using your DreamHost account as your development machine, you shouldn’t need it. The login-generator is similar to the various other generators in rails. It creates some files that you then deploy with your application. You don’t need the actual generator to be with your deployed application.

It generates (if I recall)

  • login_system.rb (in your lib folder)
  • a user class with login methods (can change to use other than ‘user’ as class name)
  • a readme file with instructions on how to complete your login system.

You’ll need to add login_system.rb to your environment.rb:

require "login_system"and to your application.rb something like:

include LoginSystem before_filter :login_required -Tom Wilcoxen
convergent arts
Signup with DreamHost Now Save $50! Promo code: CADHDISC