Forum: Ruby on Rails Login_Engine: trouble configuring

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
17d01ff4326c26911481c7a77283b343?d=identicon&s=25 Eric Sloane (Guest)
on 2006-02-09 02:03
(Received via mailing list)
Hi Guys,
I'm having some trouble getting login_engine to work. I've followed the
steps in the README file to the letter (I think) with the exception of
the Mailer stuff and cannot get my application to run. Heres what I
have;

module ApplicationHelper
   include login_engine
end
#####################################

require 'login_engine'

class ApplicationController < ActionController::Base
     include LoginEngine
     helper :user
     model :user

     before_filter :login_required

end
###################################

In environment.rb;

   module LoginEngine
     config :salt, "throcking-cottered"
     config :use_email_notification, false
   end

   Engines.start :login

########################################

In Vendor\plugins I have
engines
login_engine
In Vendor\plugins\login_engine I have
app
db
lib
public
tasks
test
init_engine.rb
README
#######################################

When I try to start WEBrick I get
D:\ruby\projects\tmp>ruby script/server
=> Booting WEBrick...
./script/../config/../app/helpers/application_helper.rb:3: undefined
local varia
ble or method `login_engine' for ApplicationHelper:Module (NameError)
         from
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `re
quire__'
         from
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `re
quire'
         from
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_suppo
rt/dependencies.rb:214:in `require'
         from
./script/../config/../vendor/plugins/bundled_resource-0.9/init.rb:1
8:in `load_plugin'
         from
d:/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:311:i
n `load_plugin'
         from
d:/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:311:i
n `silence_warnings'
         from
d:/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:311:i
n `load_plugin'
         from
d:/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:145:i
n `load_plugins'
          ... 14 levels...
         from
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `re
quire__'
         from
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `re
quire'
         from
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_suppo
rt/dependencies.rb:214:in `require'
         from script/server:5

##################################################################
and finally -> in the README there is this statement

Setup your Rails application

Edit your database.yml, most importantly!

Edit what?

TIA,
Eric.
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 James Adam (Guest)
on 2006-02-09 02:09
(Received via mailing list)
'database.yml' is the database configuration file in your /config
folder, but I don't think that's related to your error. Which version
of Rails are you using?

- james

On 2/9/06, Eric Sloane <esloane@exemail.com.au> wrote:
> require 'login_engine'
>
>
> init_engine.rb
> d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `re
>          from
> n `load_plugins'
>          from script/server:5
> TIA,
> Eric.
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
* J *
  ~
17d01ff4326c26911481c7a77283b343?d=identicon&s=25 Eric Sloane (Guest)
on 2006-02-09 04:36
(Received via mailing list)
Hi James
Rails version is 1.0.0
Eric.
17d01ff4326c26911481c7a77283b343?d=identicon&s=25 Eric Sloane (Guest)
on 2006-02-11 03:04
(Received via mailing list)
Sorry folks - I still cant figure out why this won't run
Eric
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 James Adam (Guest)
on 2006-02-11 03:44
(Received via mailing list)
Sorry - I should've picked up on this immediately:

On 2/10/06, Eric Sloane <esloane@exemail.com.au> wrote:
> >>> module ApplicationHelper
> >>>   include login_engine
> >>> end

module ApplicationHelper
  include LoginEngine # NOT 'login_engine', that's not a Module or a
Class...
end

--
* J *
  ~
This topic is locked and can not be replied to.