Ruby on Rails Thursday, April 29, 2010

Hi,

I am following the instructions on
http://github.com/binarylogic/authlogic_example#readme,
specifically, the Tutorial "How to create this app ..."
section:
Step 1 of the tutorial contained three sub-step which I identify here
Step 1/a,b and c.
The details of these steps and their consequences are shown below in
detail.
Following execution of Steps 1a and 1b of the Tutorial, I followed the
advice at the top of Step 1bm i.e.
I restarted my web-server. That led to an error notification regarding
the instruction
config/environment.rb, line 10, which is: config.gem "authlogic"

An I ideas about how I can deal with this problem? Details followL

Thanks in Advance,
Richard

My environment includes:
WinXP-Pro/SP3, Ruby 1.8.2-15, Rails 1.1.6, Gem 0.9, MySQL 5.0.27-nt,
SciTE 1.72, AuthLogic gem, FireFox 2.0.0.4

Step 1a: Install the gem / plugin -- I got:
gem install authlogic
Successfully installed authlogic-2.1.3
1 gem installed
Installing ri documentation for authlogic-2.1.3...
Installing RDoc documentation for authlogic-2.1.3...
---
I checked whether the gem was installed by executing:
dir K:\_Utilities\ruby186-26_rc2\ruby\lib\ruby\gems\1.8\gems
and got:
K:\>dir K:\_Utilities\ruby186-26_rc2\ruby\lib\ruby\gems\1.8\gems
\authlogic*.*
Volume in drive K is K02-100G_NT
Volume Serial Number is B00C-F65F

Directory of K:\_Utilities\ruby186-26_rc2\ruby\lib\ruby\gems\1.8\gems

04/28/2010 10:36 AM <DIR> authlogic-2.1.3
0 File(s) 0 bytes
1 Dir(s) 56,204,374,016 bytes free

K:\>

Step 1b: Add the gem dependency in your config, so now lines 1-10 in
config\environment.rb are:
# Be sure to restart your server when you modify this file

# Specifies gem version of Rails to use when vendor/rails is not
present
RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION

# Bootstrap the Rails environment, frameworks, and default
configuration
require File.join(File.dirname(__FILE__), 'boot')

# Hook-up AuthLogic
config.gem "authlogic"

Step 1c: Following the caution in Setp1b, I ran "ruby script/server"
and got:
=> Booting Mongrel
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
K:/_Projects/Ruby/_Rails_Apps/_EIMS/RTS/config/environment.rb:10:
undefined local variable or method `config' for main:Object
(NameError)

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment