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.
''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:> 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. > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- * J * ~
Hi James Rails version is 1.0.0 Eric. James Adam wrote:> ''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: > >>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. >> >>_______________________________________________ >>Rails mailing list >>Rails@lists.rubyonrails.org >>http://lists.rubyonrails.org/mailman/listinfo/rails >> > > > > -- > * J * > ~
Sorry folks - I still cant figure out why this won''t run Eric Eric Sloane wrote:> Hi James > Rails version is 1.0.0 > Eric. > > > James Adam wrote: > >> ''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: >> >>> 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. >>> >>> _______________________________________________ >>> Rails mailing list >>> Rails@lists.rubyonrails.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails >>> >> >> >> >> -- >> * J * >> ~
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 > >>> endmodule ApplicationHelper include LoginEngine # NOT ''login_engine'', that''s not a Module or a Class... end -- * J * ~