Hi All,
I am a newbie and playing around with restful_authentication in my
sample
app. The associated code for user.rb is pasted below. When I try to run
the
server, i get the following error. I am using Rails 2.0.2. Could anyone
point me as to what am i missing?
Line no 66: # Encrypts some data with the salt.
Line no 67: def self.encrypt(password, salt)
Line no 68: Digest::SHA1.hexdigest(“–#{salt}–#{password}–”)
Line no 69: end
################################################
user@sandbox:~/rails/sample$ script/server
=> Booting WEBrick…
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:203:in
load_without_new_constant_marking': /home/user/rails/sample/app/models/user.rb:69: syntax error, unexpected kEND, expecting ')' (SyntaxError) /home/user/rails/sample/app/models/user.rb:96: syntax error, unexpected tIDENTIFIER, expecting ')' save(false) ^ /home/user/rails/sample/app/models/user.rb:160: syntax error, unexpected $end, expecting kEND from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:203:in
load_file’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in
new_constants_in' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:202:in
load_file’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:94:in
require_or_load' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:248:in
load_missing_constant’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:453:in
const_missing' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:465:in
const_missing’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/inflector.rb:257:in
constantize' ... 25 levels... from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require’
from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require’
from script/server:3