Well, gettext works great if I run it without the login engine. And the login engine works great if I run it without the gettext-plugin... That's really bad. I crawled the internet for the message, but it seems that I'm the only one who ever got this weird
message...

But thanks for your answer.

Kind regards,

Manuel

----- Nachricht von [EMAIL PROTECTED] ---------
     Datum: Mon, 23 Jan 2006 16:54:48 +0000
       Von: James Adam <[EMAIL PROTECTED]>
Antwort an: Discussion of the use of existing Engines
<[email protected]>
   Betreff: Re: [Engine-users] Problems using Login Engine - Rails not bound
        An: Discussion of the use of existing Engines
<[email protected]>


This problem looks like it originates in the Gettext stuff, not the
login engine... You can test if there's an undesirable interaction
here by trying your gettext plugin/extension in a project *without*
the login engine. However, I've never heard of the 'rails unbound'
message you're getting...

- james

On 1/23/06, Manuel <[EMAIL PROTECTED]> wrote:
Hi,

I figured out the problem.... But I still can't resolve it.

This is in my application-controller:

 require 'gettext/rails'
 require 'login_engine'
 GetText.output_charset = "UTF-8"
 class ApplicationController < ActionController::Base
   include LoginEngine
   helper :model
   model :user
   before_filter :login_required
   before_filter :init_gettext
   def init_gettext
     bindtextdomain("application", request.cgi)
   end
 ....

When I remove the line "bindtextdomain..." it works like a charme...
But then I don't have gettext-support any more.

Is there a way I could arrange both modules to work together?

The login works anyway when the bindtextdomain is present, but "forgot
my password" and "register a new account" doesn't work.

Kind regards,

Manuel



----- Nachricht von [EMAIL PROTECTED] ---------
    Datum: Mon, 23 Jan 2006 10:55:25 +0100
      Von: Manuel <[EMAIL PROTECTED]>
Antwort an: Discussion of the use of existing Engines
<[email protected]>
  Betreff: [Engine-users] Problems using Login Engine - Rails not bound
       An: [email protected]


Hi list- and engineusers.

My name is Manuel and I'd like to protect my rails-application with
the Login-engine.

I am using Debian 3.1 Sarge with the debian packages of libruby,
libruby1.8, rake, ruby, ruby1.8, ruby1.8-dev and the gettext- and
iconv-bindings.

I have the following gem's installed:
 actionmailer 1.1.5
 actionpack 1.11.2
 actionwebservice 1.0.0
 activerecord 1.13.2
 activesupport 1.2.5
 login_generator 1.1.0
 rails 1.0.0
 rake 0.7.0
 sources 0.0.1

I followed the instructions on engines-readme and login-engine-readme
but there the first problem appeared:

I did "rake engine_migrate ENGINE=login" and get the following error:
"(in /home/manu/asterisk)
The db/migrate directory for engine 'login_engine' appears to be missing.
Should be:

/home/manu/asterisk/config/..//home/manu/asterisk/config/../vendor/plugins/login_engine/db/migrate
"

I checked "vendor/plugins/engines/tasks/engines.rake" and changed the
following line:
"migration_directory = File.join(RAILS_ROOT, engine.root, 'db',
'migrate')" into
"migration_directory = File.join(engine.root, 'db', 'migrate')" which
worked for me.

After that I protected my whole site by adding the before_filter into
the application-controller and visited my site. I was forwarded to the
login-form, but there I tried to "Register a new account" which failed
with the following error:

" GetText::NoboundTextDomainError in User#signup

Showing vendor/plugins/login_engine/app/views/user/signup.rhtml where
line #4 raised:

rails is not bound.

Extracted source (around line #4):

1: <div title="<%= title_helper %>" class="form">
2:   <h3>Signup</h3>
3:
4:   <%= error_messages_for 'user' %>
5:
6:   <div class="form-padding">
7:     <%= start_form_tag :action => 'signup' %>

RAILS_ROOT: /home/manu/asterisk/script/../config/.."

This is the trace:
"/usr/local/lib/site_ruby/1.8/gettext.rb:65:in `textdomain'
/usr/local/lib/site_ruby/1.8/gettext/rails.rb:176:in `error_messages_for'
/usr/local/lib/site_ruby/1.8/gettext/rails.rb:199:in `error_messages_for'
#{RAILS_ROOT}/vendor/plugins/login_engine/app/views/user/signup.rhtml:4:in
`_run_rhtml__home_manu_asterisk_vendor_plugins_login_engine_app_views_user_signup' #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:292:in `send'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:292:in
`compile_and_render_template'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:268:in
`render_template'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:229:in
`render_file'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:675:in
`render_file'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:609:in
`render_with_no_layout'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/layout.rb:225:in
`render_without_benchmark'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:53:in
`render'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:53:in
`measure'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:53:in
`render'
#{RAILS_ROOT}/vendor/plugins/login_engine/app/controllers/user_controller.rb:236:in
`generate_blank'
#{RAILS_ROOT}/vendor/plugins/login_engine/app/controllers/user_controller.rb:35:in
`signup'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:879:in
`send'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:879:in
`perform_action_without_filters'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:332:in
`perform_action_without_benchmark'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in
`measure'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/rescue.rb:82:in
`perform_action'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:370:in
`send'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:370:in
`process_without_session_management_support'

#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/session_management.rb:116:in
`process'
#{RAILS_ROOT}/vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch'
#{RAILS_ROOT}/vendor/rails/railties/lib/webrick_server.rb:117:in
`handle_dispatch'
#{RAILS_ROOT}/vendor/rails/railties/lib/webrick_server.rb:83:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/1.8/webrick/server.rb:172:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:161:in `start'
/usr/lib/ruby/1.8/webrick/server..rb:161:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
#{RAILS_ROOT}/vendor/rails/railties/lib/webrick_server.rb:69:in `dispatch'
#{RAILS_ROOT}/vendor/rails/railties/lib/commands/servers/webrick.rb:59
#{RAILS_ROOT}/vendor/rails/activesupport/lib/active_support/dependencies.rb:244:in
`require'
#{RAILS_ROOT}/vendor/rails/activesupport/lib/active_support/dependencies.rb:244:in
`require'
#{RAILS_ROOT}/vendor/rails/railties/lib/commands/server.rb:28
/home/manu/asterisk/script/server:3:in `require'
/home/manu/asterisk/script/server:3"


I hope you can help me...

My configuration is pretty much like the on in the documentation.

Kind regards,

Manuel


----- Ende der Nachricht von [EMAIL PROTECTED] -----




_______________________________________________
engine-users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org




_______________________________________________
engine-users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org





----- Ende der Nachricht von [EMAIL PROTECTED] -----

Attachment: binu6kcHgOisS.bin
Description: Öffentlicher PGP-Schlüssel

_______________________________________________
engine-users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

Reply via email to