From kou at cozmixng.org Sat Sep 1 00:40:33 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Sat, 01 Sep 2007 13:40:33 +0900 (JST) Subject: [Ruby-activeldap-discuss] model_activeldap generator In-Reply-To: <200708312324.54138.lists@suares.an> References: <200708312324.54138.lists@suares.an> Message-ID: <20070901.134033.196652361.kou@cozmixng.org> Hi, > There is a generator for activeldap models now, called model_activeldap > > To generate a 'user' model, you can invoke it as > > ./script/generate model_activeldap user I changed this name to model_active_ldap too. Thanks, -- kou From kou at cozmixng.org Sat Sep 1 01:50:48 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Sat, 01 Sep 2007 14:50:48 +0900 (JST) Subject: [Ruby-activeldap-discuss] API CHANGE: establish_connection doesn't connect LDAP server Message-ID: <20070901.145048.56297849.kou@cozmixng.org> Hi, I'm sorry but I've changed API of establish_connection in trunk. Before this changes, establish_connection connects to LDAP server right now. But now, establish_connection doesn't connect to LDAP server, just store specified connection configuration. If your codes depends on the old feature, please rewrite your codes like the followings: before: begin ActiveLdap::Base.establish_connection(...) rescue ActiveLdap::AutenticationError ... end after: begin ActiveLdap::Base.establish_connection(...) unless ActiveLdap::Base.connected? ActiveLdap::Base.connection.connect end rescue ActiveLdap::AuthenticationError ... end The above changes will work both of 0.8.3.1 and trunk. And I've changed API for connection per DN too. establish_connection for instance doesn't connect to LDAP server too. But I've added a convenience method #bind. before: begin ldap_entry.establish_connection(:password => password) rescue ActiveLdap::AuthenticationError ... end after: begin ldap_entry.bind(password) rescue ActiveLdap::AuthenticationError ... end Thanks, -- kou From pedz at easesoftware.com Sat Sep 1 08:47:16 2007 From: pedz at easesoftware.com (Perry Smith) Date: Sat, 1 Sep 2007 07:47:16 -0500 Subject: [Ruby-activeldap-discuss] 'User.find' or just 'find' ? In-Reply-To: <200708312332.08820.lists@suares.an> References: <200708312332.08820.lists@suares.an> Message-ID: Nothing. You just did not understand. What would find(:all) find? Which model? On Aug 31, 2007, at 10:32 PM, Ace Suares wrote: > Hi, > > Please take a look at http://www.activeldap.com/sample-application > > Near the end, you'll find a method called index. > > I thought, that it was possible to say: > > @users = find(:all) > > But that doesn't work for me. I have to use > > @users = User.find(:all) > > What did I do wrong ?? > > _ace > _______________________________________________ > Ruby-activeldap-discuss mailing list > Ruby-activeldap-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/ruby-activeldap-discuss > From lists at suares.an Sat Sep 1 12:26:44 2007 From: lists at suares.an (Ace Suares) Date: Sat, 1 Sep 2007 12:26:44 -0400 Subject: [Ruby-activeldap-discuss] 'User.find' or just 'find' ? In-Reply-To: References: <200708312332.08820.lists@suares.an> Message-ID: <200709011226.44850.lists@suares.an> On Saturday 01 September 2007, Perry Smith wrote: > Nothing. You just did not understand. > > What would find(:all) find? Which model? > In the userscontroller in Kou's example: def index @users = find(:all) end in file: examples/al-admin/app/controllers/users_controller.rb So, I just copied that (no understanding) but it didn't work. Can you explain ? Ace > On Aug 31, 2007, at 10:32 PM, Ace Suares wrote: > > Hi, > > > > Please take a look at http://www.activeldap.com/sample-application > > > > Near the end, you'll find a method called index. > > > > I thought, that it was possible to say: > > > > @users = find(:all) > > > > But that doesn't work for me. I have to use > > > > @users = User.find(:all) > > > > What did I do wrong ?? > > > > _ace > > _______________________________________________ > > Ruby-activeldap-discuss mailing list > > Ruby-activeldap-discuss at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ruby-activeldap-discuss From pedz at easesoftware.com Sat Sep 1 14:44:32 2007 From: pedz at easesoftware.com (Perry Smith) Date: Sat, 1 Sep 2007 13:44:32 -0500 Subject: [Ruby-activeldap-discuss] 'User.find' or just 'find' ? In-Reply-To: <200709011226.44850.lists@suares.an> References: <200708312332.08820.lists@suares.an> <200709011226.44850.lists@suares.an> Message-ID: <4F317BA6-5F2E-4528-9C5C-E1F5DF844DB9@easesoftware.com> I don't have a copy of the code so I probably can not be much help. I looked at my rails controllers produced by ./script/generate. They are usually called UserController and are a subclass of ApplicationController. The find's and other database calls are all prefixed with the model name. e.g. User.find(:all). Two guesses: 1) Somehow, the find goes to the User model due to some weird inheritance. 2) The code, as shipped, does not work On Sep 1, 2007, at 11:26 AM, Ace Suares wrote: > On Saturday 01 September 2007, Perry Smith wrote: >> Nothing. You just did not understand. >> >> What would find(:all) find? Which model? >> > > > In the userscontroller in Kou's example: > > def index > @users = find(:all) > end > > in file: examples/al-admin/app/controllers/users_controller.rb > > So, I just copied that (no understanding) but it didn't work. > > Can you explain ? > > Ace > > >> On Aug 31, 2007, at 10:32 PM, Ace Suares wrote: >>> Hi, >>> >>> Please take a look at http://www.activeldap.com/sample-application >>> >>> Near the end, you'll find a method called index. >>> >>> I thought, that it was possible to say: >>> >>> @users = find(:all) >>> >>> But that doesn't work for me. I have to use >>> >>> @users = User.find(:all) >>> >>> What did I do wrong ?? >>> >>> _ace >>> _______________________________________________ >>> Ruby-activeldap-discuss mailing list >>> Ruby-activeldap-discuss at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/ruby-activeldap-discuss > > > _______________________________________________ > Ruby-activeldap-discuss mailing list > Ruby-activeldap-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/ruby-activeldap-discuss > From kou at cozmixng.org Sat Sep 1 20:37:44 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Sun, 02 Sep 2007 09:37:44 +0900 (JST) Subject: [Ruby-activeldap-discuss] 'User.find' or just 'find' ? In-Reply-To: <200709011226.44850.lists@suares.an> References: <200708312332.08820.lists@suares.an> <200709011226.44850.lists@suares.an> Message-ID: <20070902.093744.237640463.kou@cozmixng.org> Hi, In <200709011226.44850.lists at suares.an> "Re: [Ruby-activeldap-discuss] 'User.find' or just 'find' ?" on Sat, 1 Sep 2007 12:26:44 -0400, Ace Suares wrote: > In the userscontroller in Kou's example: > > def index > @users = find(:all) > end > > in file: examples/al-admin/app/controllers/users_controller.rb > > So, I just copied that (no understanding) but it didn't work. > > Can you explain ? In the controller, I defined find method: class UsersController < ApplicationController ... private def find(*args) current_user.ldap_user.find(*args) end end http://ruby-activeldap.googlecode.com/svn/trunk/examples/al-admin/app/controllers/users_controller.rb The method is a convenience method. Thanks, -- kou From m.zecko at gmail.com Sun Sep 2 07:20:26 2007 From: m.zecko at gmail.com (m.zeckinger) Date: Sun, 2 Sep 2007 13:20:26 +0200 Subject: [Ruby-activeldap-discuss] gettext error with current 0.8.3.1 release: Anonymous modules have no name to be referenced by Message-ID: <8be6656c0709020420w1a2047a9j6be5e697953c22f8@mail.gmail.com> hello list, i just updated activeldap on a current project and experience some strange behaviour. is gettext now a must or optional? see my error below: ArgumentError (Anonymous modules have no name to be referenced by): .//vendor/rails/activesupport/lib/active_support/dependencies.rb:404:in `to_constant_name' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:214:in `qualified_name_for' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:476:in `const_missing' .//lib/active_ldap/get_text_support.rb:6:in `included' .//lib/active_ldap/get_text_support.rb:5:in `class_eval' .//lib/active_ldap/get_text_support.rb:5:in `included' .//lib/active_ldap/base.rb:47:in `include' .//lib/active_ldap/base.rb:47 .//vendor/rails/activesupport/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:203:in `load_file' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:202:in `load_file' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:94:in `require_or_load' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:248:in `load_missing_constant' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:452:in `const_missing' .//lib/active_ldap.rb:961 .//vendor/rails/activesupport/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:203:in `load_file' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:202:in `load_file' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:94:in `require_or_load' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:248:in `load_missing_constant' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:452:in `const_missing' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:464:in `const_missing' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:260:in `load_missing_constant' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:468:in `const_missing' .//app/controllers/login_controller.rb:27:in `login' .//vendor/rails/actionpack/lib/action_controller/base.rb:1095:in `send' .//vendor/rails/actionpack/lib/action_controller/base.rb:1095:in `perform_action_without_filters' .//vendor/rails/actionpack/lib/action_controller/filters.rb:632:in `call_filter' .//vendor/rails/actionpack/lib/action_controller/filters.rb:638:in `call_filter' .//vendor/rails/actionpack/lib/action_controller/filters.rb:438:in `call' .//vendor/rails/actionpack/lib/action_controller/filters.rb:637:in `call_filter' .//vendor/rails/actionpack/lib/action_controller/filters.rb:638:in `call_filter' .//vendor/rails/actionpack/lib/action_controller/filters.rb:449:in `call' .//vendor/rails/actionpack/lib/action_controller/filters.rb:637:in `call_filter' .//vendor/rails/actionpack/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' .//vendor/rails/actionpack/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' .//vendor/rails/actionpack/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' .//vendor/rails/actionpack/lib/action_controller/rescue.rb:83:in `perform_action' .//vendor/rails/actionpack/lib/action_controller/base.rb:430:in `send' .//vendor/rails/actionpack/lib/action_controller/base.rb:430:in `process_without_filters' .//vendor/rails/actionpack/lib/action_controller/filters.rb:624:in `process_without_session_management_support' .//vendor/rails/actionpack/lib/action_controller/session_management.rb:114:in `process' .//vendor/rails/actionpack/lib/action_controller/base.rb:330:in `process' .//vendor/rails/railties/lib/dispatcher.rb:41:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 .//vendor/rails/activesupport/lib/active_support/dependencies.rb:488:in `load' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:488:in `load' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:488:in `load' .//vendor/rails/railties/lib/commands/servers/mongrel.rb:60 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:495:in `require' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in' .//vendor/rails/activesupport/lib/active_support/dependencies.rb:495:in `require' .//vendor/rails/railties/lib/commands/server.rb:39 script/server:3:in `require' script/server:3 Rendering ./script/../config/../vendor/rails/actionpack/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) From kou at cozmixng.org Sun Sep 2 07:29:28 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Sun, 02 Sep 2007 20:29:28 +0900 (JST) Subject: [Ruby-activeldap-discuss] gettext error with current 0.8.3.1 release: Anonymous modules have no name to be referenced by In-Reply-To: <8be6656c0709020420w1a2047a9j6be5e697953c22f8@mail.gmail.com> References: <8be6656c0709020420w1a2047a9j6be5e697953c22f8@mail.gmail.com> Message-ID: <20070902.202928.55308283.kou@cozmixng.org> Hi, In <8be6656c0709020420w1a2047a9j6be5e697953c22f8 at mail.gmail.com> "[Ruby-activeldap-discuss] gettext error with current 0.8.3.1 release: Anonymous modules have no name to be referenced by" on Sun, 2 Sep 2007 13:20:26 +0200, m.zeckinger wrote: > i just updated activeldap on a current project and experience some > strange behaviour. is gettext now a must or optional? Optional. > see my error below: > > ArgumentError (Anonymous modules have no name to be referenced by): > .//vendor/rails/activesupport/lib/active_support/dependencies.rb:404:in > `to_constant_name' > .//vendor/rails/activesupport/lib/active_support/dependencies.rb:214:in > `qualified_name_for' > .//vendor/rails/activesupport/lib/active_support/dependencies.rb:476:in > `const_missing' > .//lib/active_ldap/get_text_support.rb:6:in `included' > .//lib/active_ldap/get_text_support.rb:5:in `class_eval' > .//lib/active_ldap/get_text_support.rb:5:in `included' > .//lib/active_ldap/base.rb:47:in `include' > .//lib/active_ldap/base.rb:47 Rails marks files under lib/ as reloadable. And fallbacked ActiveLdap::GetText is defined in active_ldap/get_text_fallback.rb not lib/active_ldap/get_text.rb. So your Rails application is broken. The problem will be solved if you move ActiveLdap to another directory (e.g. ../activeldap/lib/) and add the directory to config.load_paths in your config/environment.rb. Thanks, -- kou From m.zecko at gmail.com Sun Sep 2 07:49:48 2007 From: m.zecko at gmail.com (m.zeckinger) Date: Sun, 2 Sep 2007 13:49:48 +0200 Subject: [Ruby-activeldap-discuss] gettext error with current 0.8.3.1 release: Anonymous modules have no name to be referenced by In-Reply-To: <20070902.202928.55308283.kou@cozmixng.org> References: <8be6656c0709020420w1a2047a9j6be5e697953c22f8@mail.gmail.com> <20070902.202928.55308283.kou@cozmixng.org> Message-ID: <8be6656c0709020449s348c99d9t7e27fe13832c953f@mail.gmail.com> thanks for your fast reply, kou. the fastest fix for this problem was the following for me (in case someone else has this problem) 1. delete your activeldap files from /lib and put the full directory in /vendor/plugins 2. in environment.rb, place a require 'active_ldap' 3. voila, everything works again as expected. regards, mz On 9/2/07, Kouhei Sutou wrote: > Hi, > > In <8be6656c0709020420w1a2047a9j6be5e697953c22f8 at mail.gmail.com> > "[Ruby-activeldap-discuss] gettext error with current 0.8.3.1 release: Anonymous modules have no name to be referenced by" on Sun, 2 Sep 2007 13:20:26 +0200, > m.zeckinger wrote: > > > i just updated activeldap on a current project and experience some > > strange behaviour. is gettext now a must or optional? > > Optional. > > > see my error below: > > > > ArgumentError (Anonymous modules have no name to be referenced by): > > .//vendor/rails/activesupport/lib/active_support/dependencies.rb:404:in > > `to_constant_name' > > .//vendor/rails/activesupport/lib/active_support/dependencies.rb:214:in > > `qualified_name_for' > > .//vendor/rails/activesupport/lib/active_support/dependencies.rb:476:in > > `const_missing' > > .//lib/active_ldap/get_text_support.rb:6:in `included' > > .//lib/active_ldap/get_text_support.rb:5:in `class_eval' > > .//lib/active_ldap/get_text_support.rb:5:in `included' > > .//lib/active_ldap/base.rb:47:in `include' > > .//lib/active_ldap/base.rb:47 > > Rails marks files under lib/ as reloadable. And fallbacked > ActiveLdap::GetText is defined in > active_ldap/get_text_fallback.rb not > lib/active_ldap/get_text.rb. So your Rails application is > broken. > > The problem will be solved if you move ActiveLdap to another > directory (e.g. ../activeldap/lib/) and add the directory to > config.load_paths in your config/environment.rb. > > > > Thanks, > -- > kou > _______________________________________________ > Ruby-activeldap-discuss mailing list > Ruby-activeldap-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/ruby-activeldap-discuss > From m.zecko at gmail.com Sun Sep 2 07:54:15 2007 From: m.zecko at gmail.com (m.zeckinger) Date: Sun, 2 Sep 2007 13:54:15 +0200 Subject: [Ruby-activeldap-discuss] creating entries via LDIF Message-ID: <8be6656c0709020454v675fee2by49a84165ef5d1d07@mail.gmail.com> hello list, i have 2 kinds of users, which are both created from within a web-based rails application. now by creating that users, what would be the better way to go, creating models for both users? or is there a way to directly accept user-generation by LDIF-Files from within ruby-activeldap? i dindn't find much information about LDIF support on this list - can anyone help out with this? thanks, mz. From kou at cozmixng.org Sun Sep 2 08:10:32 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Sun, 02 Sep 2007 21:10:32 +0900 (JST) Subject: [Ruby-activeldap-discuss] creating entries via LDIF In-Reply-To: <8be6656c0709020454v675fee2by49a84165ef5d1d07@mail.gmail.com> References: <8be6656c0709020454v675fee2by49a84165ef5d1d07@mail.gmail.com> Message-ID: <20070902.211032.33284142.kou@cozmixng.org> Hi, > i have 2 kinds of users, which are both created from within a > web-based rails application. > now by creating that users, what would be the better way to go, > creating models for both users? or is there a way to directly accept > user-generation by LDIF-Files from within ruby-activeldap? > i dindn't find much information about LDIF support on this list - can > anyone help out with this? Uhmm... I think you can make users from a model: user1 = User.new("user1") # or User.new(params["user"]) user1.XXX = yyy ... user1.save user2 = User.new("user2") user2.XXX = yyy ... user2.save ... You can load LDIF by ActiveLdap::Base.load. And you can also dump entries in LDAP server by ActiveLdap::Base.dump. Test cases of ActiveLdap (test/*.rb) use them to keep test environment. Thanks, -- kou From m.zecko at gmail.com Sun Sep 2 08:50:25 2007 From: m.zecko at gmail.com (m.zeckinger) Date: Sun, 2 Sep 2007 14:50:25 +0200 Subject: [Ruby-activeldap-discuss] problems with posixAccount schema: NameError: undefined local variable or method `msg' Message-ID: <8be6656c0709020550u64d02a52k8299d6dfca8b40a6@mail.gmail.com> using the current 0.8.3.1 activeldap i get strange errors when trying to add a user-object that belongs to the class 'posixAccount'. my ldap_user model looks like the following: class LdapUser < ActiveLdap::Base ldap_mapping :dn_attribute => "uid", :prefix => "ou=users", :classes => ['top','inetOrgPerson','shadowAccount','apple-user'] belongs_to :groups, :class => 'LdapGroup', :many => "member", :foreign_key => "dn" end the error i am seeing: "undefined local variable or method `msg' for LdapUser:Class" is my 'posixAccount' schema broken? or is there a problem with this schema and activeldap? here is a way to reproduce it on the script/console ldap_configuration_file = File.join(RAILS_ROOT, 'config', 'ldap.yml') configurations = YAML::load(ERB.new(IO.read(ldap_configuration_file)).result) ActiveLdap::Base.configurations = configurations ActiveLdap::Base.establish_connection u=LdapUser.new() u.uid="test_user" u.cn="test" u.sn="test" u.save NameError: undefined local variable or method `msg' for LdapUser:Class from ./script/../config/../config/../vendor/plugins/ruby-activeldap-0.8.3.1/lib/active_ldap/get_text_fallback.rb:39:in `s_' from ./script/../config/../config/../vendor/plugins/ruby-activeldap-0.8.3.1/lib/active_ldap/base.rb:376:in `human_object_class_name' from ./script/../config/../config/../vendor/plugins/ruby-activeldap-0.8.3.1/lib/active_ldap/validations.rb:78:in `validate_required_values' from ./script/../config/../config/../vendor/plugins/ruby-activeldap-0.8.3.1/lib/active_ldap/validations.rb:64:in `each' from ./script/../config/../config/../vendor/plugins/ruby-activeldap-0.8.3.1/lib/active_ldap/validations.rb:64:in `validate_required_values' from ./script/../config/../config/../vendor/plugins/ruby-activeldap-0.8.3.1/lib/active_ldap/validations.rb:63:in `each' from ./script/../config/../config/../vendor/plugins/ruby-activeldap-0.8.3.1/lib/active_ldap/validations.rb:63:in `validate_required_values' from ./script/../config/../config/../vendor/rails/activerecord/lib/active_record/validations.rb:818:in `send' from ./script/../config/../config/../vendor/rails/activerecord/lib/active_record/validations.rb:818:in `run_validations_without_active_ldap_support' from ./script/../config/../config/../vendor/rails/activerecord/lib/active_record/validations.rb:816:in `each' from ./script/../config/../config/../vendor/rails/activerecord/lib/active_record/validations.rb:816:in `run_validations_without_active_ldap_support' from ./script/../config/../config/../vendor/plugins/ruby-activeldap-0.8.3.1/lib/active_ldap/validations.rb:104:in `run_validations' from ./script/../config/../config/../vendor/rails/activerecord/lib/active_record/validations.rb:780:in `valid?' from ./script/../config/../config/../vendor/plugins/ruby-activeldap-0.8.3.1/lib/active_ldap/validations.rb:54:in `valid_without_callbacks?' from ./script/../config/../config/../vendor/rails/activerecord/lib/active_record/callbacks.rb:299:in `valid?' from ./script/../config/../config/../vendor/rails/activerecord/lib/active_record/validations.rb:751:in `save' from (irb):18>> From m.zecko at gmail.com Sun Sep 2 09:16:13 2007 From: m.zecko at gmail.com (m.zeckinger) Date: Sun, 2 Sep 2007 15:16:13 +0200 Subject: [Ruby-activeldap-discuss] problems with posixAccount schema: NameError: undefined local variable or method `msg' In-Reply-To: <8be6656c0709020550u64d02a52k8299d6dfca8b40a6@mail.gmail.com> References: <8be6656c0709020550u64d02a52k8299d6dfca8b40a6@mail.gmail.com> Message-ID: <8be6656c0709020616s987b249l44e592ce3176ec32@mail.gmail.com> in addition to my last mail: this works: class LdapUser < ActiveLdap::Base ldap_mapping :dn_attribute => "uid", :prefix => "ou=users", :classes => ['top','inetOrgPerson','shadowAccount','apple-user'] belongs_to :groups, :class => 'LdapGroup', :many => "member", :foreign_key => "dn" end this doesn't. class LdapUser < ActiveLdap::Base ldap_mapping :dn_attribute => "uid", :prefix => "ou=users", :classes => ['top','inetOrgPerson','shadowAccount','posixAccount','apple-user'] belongs_to :groups, :class => 'LdapGroup', :many => "member", :foreign_key => "dn" end so the problem seems to be in the schema? From m.zecko at gmail.com Mon Sep 3 01:59:48 2007 From: m.zecko at gmail.com (m.zeckinger) Date: Mon, 3 Sep 2007 07:59:48 +0200 Subject: [Ruby-activeldap-discuss] problems with posixAccount schema: NameError: undefined local variable or method `msg' In-Reply-To: <8be6656c0709020616s987b249l44e592ce3176ec32@mail.gmail.com> References: <8be6656c0709020550u64d02a52k8299d6dfca8b40a6@mail.gmail.com> <8be6656c0709020616s987b249l44e592ce3176ec32@mail.gmail.com> Message-ID: <8be6656c0709022259t7f825443p2dfa7440d5c6ff95@mail.gmail.com> after installing gettext this error is gone. seems to be gettext-related... On 9/2/07, m. zeckinger wrote: > in addition to my last mail: > > this works: > > class LdapUser < ActiveLdap::Base > ldap_mapping :dn_attribute => "uid", > :prefix => "ou=users", > :classes => ['top','inetOrgPerson','shadowAccount','apple-user'] > belongs_to :groups, :class => 'LdapGroup', :many => "member", > :foreign_key => "dn" > end > > this doesn't. > > class LdapUser < ActiveLdap::Base > ldap_mapping :dn_attribute => "uid", > :prefix => "ou=users", > :classes => ['top','inetOrgPerson','shadowAccount','posixAccount','apple-user'] > belongs_to :groups, :class => 'LdapGroup', :many => "member", > :foreign_key => "dn" > end > > so the problem seems to be in the schema? > From kou at cozmixng.org Mon Sep 3 07:20:20 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Mon, 03 Sep 2007 20:20:20 +0900 (JST) Subject: [Ruby-activeldap-discuss] problems with posixAccount schema: NameError: undefined local variable or method `msg' In-Reply-To: <8be6656c0709020550u64d02a52k8299d6dfca8b40a6@mail.gmail.com> References: <8be6656c0709020550u64d02a52k8299d6dfca8b40a6@mail.gmail.com> Message-ID: <20070903.202020.169030939.kou@cozmixng.org> Hi, In <8be6656c0709020550u64d02a52k8299d6dfca8b40a6 at mail.gmail.com> "[Ruby-activeldap-discuss] problems with posixAccount schema: NameError: undefined local variable or method `msg'" on Sun, 2 Sep 2007 14:50:25 +0200, m.zeckinger wrote: > the error i am seeing: "undefined local variable or method `msg' for > LdapUser:Class" > is my 'posixAccount' schema broken? or is there a problem with this > schema and activeldap? Ah, sorry. I had noticed and been fixed this problem in trunk. You can fix this problem by substituting 'msg' in #sgettext in lib/active_ldap/get_text_fallback.rb by 'msg_id'. I'm sorry, -- kou From pierre.gambarotto at enseeiht.fr Mon Sep 3 08:02:51 2007 From: pierre.gambarotto at enseeiht.fr (Pierre Gambarotto) Date: Mon, 03 Sep 2007 14:02:51 +0200 Subject: [Ruby-activeldap-discuss] automatic reconnection Message-ID: <46DBF7EB.9060105@enseeiht.fr> Hello My LDAP server has a timeout on idle connection. How to handle automatic reconnection with activeldap ? Is there something to detect broken connection ? thanks in advance pierre From kou at cozmixng.org Mon Sep 3 08:25:07 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Mon, 03 Sep 2007 21:25:07 +0900 (JST) Subject: [Ruby-activeldap-discuss] automatic reconnection In-Reply-To: <46DBF7EB.9060105@enseeiht.fr> References: <46DBF7EB.9060105@enseeiht.fr> Message-ID: <20070903.212507.72828994.kou@cozmixng.org> Hi, > My LDAP server has a timeout on idle connection. > How to handle automatic reconnection with activeldap ? > Is there something to detect broken connection ? It seems that LDAP::Conn doesn't have a method for that. If you know that we can implement the feature. Anyway, you can reconnect explicitly by ActiveLdap::Base.connection.connect. Thanks, -- kou From m.zecko at gmail.com Mon Sep 3 12:08:45 2007 From: m.zecko at gmail.com (m.zeckinger) Date: Mon, 3 Sep 2007 18:08:45 +0200 Subject: [Ruby-activeldap-discuss] No mutiple attribute support with activeldap? Message-ID: <8be6656c0709030908n75e7079cgd6f6b17c3b82bdbf@mail.gmail.com> i am trying to add more attributes to one LDAP-entry. use case: having more email addresses for a user. the test that fails: ldap_configuration_file = File.join(RAILS_ROOT, 'config', 'ldap.yml') configurations = YAML::load(ERB.new(IO.read(ldap_configuration_file)).result) ActiveLdap::Base.configurations = configurations ActiveLdap::Base.establish_connection u=LdapUser.find('testuser') >> u.mail => "test at test.com" >> u.mail(true) => ["test at test.com"] >> u.mail << "test2 at mail2.com" => ["test at test.com", "test2 at mail2.com"] >> u.save => true >> u.mail => "test at test.com" what the ...? multiple attributes seem to get lost! this completely works when using lbe.jar (a java-based LDAP Editor), but not with activeLDAP! more strange behavior: >> u.mail.class => String >> u.mail(true).class => Array >> u.mail(true) << "test2 at mail2.com" => ["test at test.com", "test2 at mail2.com"] >> u.mail(true) << "test3 at mail3.com" => ["test at test.com", "test3 at mail3.com"] what is happening here? array push is not working as expected! can someone help me out here? are these serious activeldap flaws or am i missing something? -mz From kou at cozmixng.org Mon Sep 3 17:37:18 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Tue, 4 Sep 2007 06:37:18 +0900 Subject: [Ruby-activeldap-discuss] No mutiple attribute support with activeldap? In-Reply-To: <8be6656c0709030908n75e7079cgd6f6b17c3b82bdbf@mail.gmail.com> References: <8be6656c0709030908n75e7079cgd6f6b17c3b82bdbf@mail.gmail.com> Message-ID: Hi, 2007/9/4, m. zeckinger : > i am trying to add more attributes to one LDAP-entry. > use case: having more email addresses for a user. > >> u.mail > => "test at test.com" > >> u.mail(true) > => ["test at test.com"] > >> u.mail << "test2 at mail2.com" > => ["test at test.com", "test2 at mail2.com"] > >> u.save > => true > what is happening here? array push is not working as expected! Readers always return duplicated value. What about the following: u.mail = u.mail(true) + ["test2 at mail2.com"] Thanks, -- kou From m.zecko at gmail.com Tue Sep 4 05:41:45 2007 From: m.zecko at gmail.com (m.zeckinger) Date: Tue, 4 Sep 2007 11:41:45 +0200 Subject: [Ruby-activeldap-discuss] No mutiple attribute support with activeldap? In-Reply-To: References: <8be6656c0709030908n75e7079cgd6f6b17c3b82bdbf@mail.gmail.com> Message-ID: <8be6656c0709040241t169dc69du5b3a0ee70c63307a@mail.gmail.com> thanks for your answer, kou. but is this really expected behavior? shouldn't arrays be treated as such? and how would i remove attributes in this case? thanks, mz On 9/3/07, Kouhei Sutou wrote: > Hi, > > 2007/9/4, m. zeckinger : > > i am trying to add more attributes to one LDAP-entry. > > use case: having more email addresses for a user. > > > >> u.mail > > => "test at test.com" > > >> u.mail(true) > > => ["test at test.com"] > > >> u.mail << "test2 at mail2.com" > > => ["test at test.com", "test2 at mail2.com"] > > >> u.save > > => true > > > what is happening here? array push is not working as expected! > > Readers always return duplicated value. > What about the following: > > u.mail = u.mail(true) + ["test2 at mail2.com"] > > > Thanks, > -- > kou > _______________________________________________ > Ruby-activeldap-discuss mailing list > Ruby-activeldap-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/ruby-activeldap-discuss > From lists at suares.an Tue Sep 4 07:15:10 2007 From: lists at suares.an (Ace Suares) Date: Tue, 4 Sep 2007 07:15:10 -0400 Subject: [Ruby-activeldap-discuss] SOLVED ./script/generate in 0.8.3.1 still needs ldapserver In-Reply-To: <20070831.215632.64182688.kou@cozmixng.org> References: <200708301908.37684.lists@suares.an> <200708310748.34408.lists@suares.an> <20070831.215632.64182688.kou@cozmixng.org> Message-ID: <200709040715.10551.lists@suares.an> On Friday 31 August 2007, Kouhei Sutou wrote: > Hi, > > > Since I update the plugin from trunk with every app install, > > sometimes I get confused. Is it possible to build in something like > > warning in plugin, working with version.... > > OK. I added version check codes to the Rails plugin. In the plugin, I see code like this: required_version = ["0", "8", "4"] if (ActiveLdap::VERSION.split(".") <=> required_version) < 0 ActiveLdap::Base.class_eval do format = _("You need ActiveLdap %s or later") logger.error(format % required_version.join(".")) end end In the gem, I see this: module ActiveLdap VERSION = "0.8.3.1" end However, my testapp is working fine and not giving an error. In the logfiles I see: You need ActiveLdap 0.8.4 or later and later: Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) You need ActiveLdap 0.8.4 or later Bound by simple as cn=admin,dc=nodomain So... the version error is only logged ??? And forgive me for stupid question, but do I need to do something with /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml so the error will be displayed in the application ? Or is it your intention to *only* log the error ? Cheers ace > > > Thanks, > -- > kou > _______________________________________________ > Ruby-activeldap-discuss mailing list > Ruby-activeldap-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/ruby-activeldap-discuss From kou at cozmixng.org Tue Sep 4 07:21:05 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Tue, 04 Sep 2007 20:21:05 +0900 (JST) Subject: [Ruby-activeldap-discuss] No mutiple attribute support with activeldap? In-Reply-To: <8be6656c0709040241t169dc69du5b3a0ee70c63307a@mail.gmail.com> References: <8be6656c0709030908n75e7079cgd6f6b17c3b82bdbf@mail.gmail.com> <8be6656c0709040241t169dc69du5b3a0ee70c63307a@mail.gmail.com> Message-ID: <20070904.202105.37552855.kou@cozmixng.org> Hi, > but is this really expected behavior? shouldn't arrays be treated as such? Yes. I don't like needless destructive operation. It may cause a bug that is hard to find. If ActiveLdap provides plural form readers that return always an array, we can write like the following: u.mails += ["you at example.com"] What about this? > and how would i remove attributes in this case? u.mail = [] Thanks, -- kou From kou at cozmixng.org Tue Sep 4 07:32:37 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Tue, 04 Sep 2007 20:32:37 +0900 (JST) Subject: [Ruby-activeldap-discuss] SOLVED ./script/generate in 0.8.3.1 still needs ldapserver In-Reply-To: <200709040715.10551.lists@suares.an> References: <200708310748.34408.lists@suares.an> <20070831.215632.64182688.kou@cozmixng.org> <200709040715.10551.lists@suares.an> Message-ID: <20070904.203237.157497074.kou@cozmixng.org> Hi, In <200709040715.10551.lists at suares.an> "Re: [Ruby-activeldap-discuss] SOLVED ./script/generate in 0.8.3.1 still needs ldapserver" on Tue, 4 Sep 2007 07:15:10 -0400, Ace Suares wrote: > > > Since I update the plugin from trunk with every app install, > > > sometimes I get confused. Is it possible to build in something like > > > warning in plugin, working with version.... > > > > OK. I added version check codes to the Rails plugin. > > However, my testapp is working fine and not giving an error. > > In the logfiles I see: > > You need ActiveLdap 0.8.4 or later > > and later: > > Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml > (500 Internal Error) > You need ActiveLdap 0.8.4 or later > Bound by simple as cn=admin,dc=nodomain > > > So... the version error is only logged ??? Yes. Should we exit an application as fatal error? > And forgive me for stupid question, but do I need to do something > with /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml > so the error will be displayed in the application ? Or is it your > intention to *only* log the error ? No. The error is caused by the application. Backtrace in your log file says where is the problem. Thanks, -- kou From lists at suares.an Tue Sep 4 07:50:24 2007 From: lists at suares.an (Ace Suares) Date: Tue, 4 Sep 2007 07:50:24 -0400 Subject: [Ruby-activeldap-discuss] =?iso-8859-1?q?API_CHANGE=3A_establish?= =?iso-8859-1?q?=5Fconnection_doesn=27t_connect=09LDAP_server?= In-Reply-To: <20070901.145048.56297849.kou@cozmixng.org> References: <20070901.145048.56297849.kou@cozmixng.org> Message-ID: <200709040750.24434.lists@suares.an> On Saturday 01 September 2007, Kouhei Sutou wrote: > Hi, > > I'm sorry but I've changed API of establish_connection in > trunk. > > > Before this changes, establish_connection connects to LDAP > server right now. But now, establish_connection doesn't > connect to LDAP server, just store specified connection > configuration. > > If your codes depends on the old feature, please rewrite > your codes like the followings: > > before: > begin > ActiveLdap::Base.establish_connection(...) > rescue ActiveLdap::AutenticationError > ... > end > > after: > begin > ActiveLdap::Base.establish_connection(...) > unless ActiveLdap::Base.connected? > ActiveLdap::Base.connection.connect > end > rescue ActiveLdap::AuthenticationError > ... > end > > The above changes will work both of 0.8.3.1 and trunk. > Hi, I have 2 questions: 1. would it be easier to have some speical parameter to only NOT connect when using generate ? I only see problems when generate, not in app. 2. If I do gem update, I get not this changes in 0.8.3.1, what is my error ? How to download/install 0.8.3.1 with the new changes ? 3. I exported trunk, and put it in gems diretory. But it's not using it. I know this is a basic question, not specific to active_ldap, but how can I make my app uise 0.8.4 and not 0.8.3.1 ? Ace > > And I've changed API for connection per DN > too. establish_connection for instance doesn't connect to > LDAP server too. But I've added a convenience method #bind. > > before: > begin > ldap_entry.establish_connection(:password => password) > rescue ActiveLdap::AuthenticationError > ... > end > > after: > begin > ldap_entry.bind(password) > rescue ActiveLdap::AuthenticationError > ... > end > > > Thanks, > -- > kou > _______________________________________________ > Ruby-activeldap-discuss mailing list > Ruby-activeldap-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/ruby-activeldap-discuss From kou at cozmixng.org Tue Sep 4 07:59:00 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Tue, 04 Sep 2007 20:59:00 +0900 (JST) Subject: [Ruby-activeldap-discuss] API CHANGE: establish_connection doesn't connect LDAP server In-Reply-To: <200709040750.24434.lists@suares.an> References: <20070901.145048.56297849.kou@cozmixng.org> <200709040750.24434.lists@suares.an> Message-ID: <20070904.205900.259412326.kou@cozmixng.org> Hi, In <200709040750.24434.lists at suares.an> "Re: [Ruby-activeldap-discuss] API CHANGE: establish_connection doesn't connect LDAP server" on Tue, 4 Sep 2007 07:50:24 -0400, Ace Suares wrote: > On Saturday 01 September 2007, Kouhei Sutou wrote: > > I'm sorry but I've changed API of establish_connection in > > trunk. > 1. would it be easier to have some speical parameter to only NOT connect > when using generate ? I only see problems when generate, not in app. No. You don't pass parameters for that. > 2. If I do gem update, I get not this changes in 0.8.3.1, what is my > error ? How to download/install 0.8.3.1 with the new changes ? This changes are caused in trunk not 0.8.3.1. > 3. I exported trunk, and put it in gems diretory. But it's not using it. I > know this is a basic question, not specific to active_ldap, but how can I > make my app uise 0.8.4 and not 0.8.3.1 ? If your application is Rails application, mz's instructions will help you: http://rubyforge.org/pipermail/ruby-activeldap-discuss/2007-September/000328.html Thanks, -- kou From lists at suares.an Tue Sep 4 08:07:39 2007 From: lists at suares.an (Ace Suares) Date: Tue, 4 Sep 2007 08:07:39 -0400 Subject: [Ruby-activeldap-discuss] API CHANGE: establish_connection doesn't connect LDAP server In-Reply-To: <20070904.205900.259412326.kou@cozmixng.org> References: <20070901.145048.56297849.kou@cozmixng.org> <200709040750.24434.lists@suares.an> <20070904.205900.259412326.kou@cozmixng.org> Message-ID: <200709040807.39491.lists@suares.an> Hi, > > > 2. If I do gem update, I get not this changes in 0.8.3.1, what is my > > error ? How to download/install 0.8.3.1 with the new changes ? > > This changes are caused in trunk not 0.8.3.1. But you say in earlier message: The above changes will work both of 0.8.3.1 and trunk. Does this mean that 'even while 0.8.3.1 does not have the new code, the changes in your code as suggested, will work with trunk as well as 0.8.3.1 ? Ace From lists at suares.an Tue Sep 4 08:10:35 2007 From: lists at suares.an (Ace Suares) Date: Tue, 4 Sep 2007 08:10:35 -0400 Subject: [Ruby-activeldap-discuss] SOLVED ./script/generate in 0.8.3.1 still needs ldapserver In-Reply-To: <20070904.203237.157497074.kou@cozmixng.org> References: <200708310748.34408.lists@suares.an> <200709040715.10551.lists@suares.an> <20070904.203237.157497074.kou@cozmixng.org> Message-ID: <200709040810.36035.lists@suares.an> > > Yes. Should we exit an application as fatal error? Only if it's fatal... For instance, if you use plugin 0.8.4 and try generate, but gem is 0.8.3.1, then it's fatal, not because ldap server is down, but because 0.8.3.1 doesn't know how to handle. Just my toughts. Maybe not important now. Ace > > > And forgive me for stupid question, but do I need to do something > > with > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_contro > >ller/templates/rescues/layout.rhtml so the error will be displayed in > > the application ? Or is it your intention to *only* log the error ? > > No. The error is caused by the application. Backtrace in > your log file says where is the problem. > > > Thanks, > -- > kou > _______________________________________________ > Ruby-activeldap-discuss mailing list > Ruby-activeldap-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/ruby-activeldap-discuss From lists at suares.an Tue Sep 4 08:22:40 2007 From: lists at suares.an (Ace Suares) Date: Tue, 4 Sep 2007 08:22:40 -0400 Subject: [Ruby-activeldap-discuss] model_activeldap generator In-Reply-To: <20070901.134033.196652361.kou@cozmixng.org> References: <200708312324.54138.lists@suares.an> <20070901.134033.196652361.kou@cozmixng.org> Message-ID: <200709040822.40452.lists@suares.an> On Saturday 01 September 2007, Kouhei Sutou wrote: > Hi, > > > There is a generator for activeldap models now, called > > model_activeldap > > > > To generate a 'user' model, you can invoke it as > > > > ./script/generate model_activeldap user > > I changed this name to model_active_ldap too. > Hi Kou, You added some options: :prefix, :dn_attribute, :classes. But what about :scope and :recommended_classes ? Ace > > Thanks, > -- > kou > _______________________________________________ > Ruby-activeldap-discuss mailing list > Ruby-activeldap-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/ruby-activeldap-discuss From kou at cozmixng.org Tue Sep 4 08:25:46 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Tue, 04 Sep 2007 21:25:46 +0900 (JST) Subject: [Ruby-activeldap-discuss] API CHANGE: establish_connection doesn't connect LDAP server In-Reply-To: <200709040807.39491.lists@suares.an> References: <200709040750.24434.lists@suares.an> <20070904.205900.259412326.kou@cozmixng.org> <200709040807.39491.lists@suares.an> Message-ID: <20070904.212546.251534054.kou@cozmixng.org> Hi, > > > 2. If I do gem update, I get not this changes in 0.8.3.1, what is my > > > error ? How to download/install 0.8.3.1 with the new changes ? > > > > This changes are caused in trunk not 0.8.3.1. > > But you say in earlier message: > > The above changes will work both of 0.8.3.1 and trunk. > > Does this mean that 'even while 0.8.3.1 does not have the new code, the > changes in your code as suggested, will work with trunk as well as > 0.8.3.1 ? Ah, sorry. I have misunderstood your question. I thought the changes means API changes in trunk. OK. You're right. The changes in your codes for backward compatibility should work with trunk as well as 0.8.3.1. I'm sorry for my stupid English. Thanks, -- kou From kou at cozmixng.org Tue Sep 4 08:28:51 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Tue, 04 Sep 2007 21:28:51 +0900 (JST) Subject: [Ruby-activeldap-discuss] SOLVED ./script/generate in 0.8.3.1 still needs ldapserver In-Reply-To: <200709040810.36035.lists@suares.an> References: <200709040715.10551.lists@suares.an> <20070904.203237.157497074.kou@cozmixng.org> <200709040810.36035.lists@suares.an> Message-ID: <20070904.212851.250738169.kou@cozmixng.org> Hi, > > Yes. Should we exit an application as fatal error? > > Only if it's fatal... > > For instance, if you use plugin 0.8.4 and try generate, but gem is > 0.8.3.1, then it's fatal, not because ldap server is down, but because > 0.8.3.1 doesn't know how to handle. > > Just my toughts. Maybe not important now. OK. If someone doesn't have any idea, I'll keep this. Thanks, -- kou From kou at cozmixng.org Tue Sep 4 08:31:51 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Tue, 04 Sep 2007 21:31:51 +0900 (JST) Subject: [Ruby-activeldap-discuss] model_activeldap generator In-Reply-To: <200709040822.40452.lists@suares.an> References: <200708312324.54138.lists@suares.an> <20070901.134033.196652361.kou@cozmixng.org> <200709040822.40452.lists@suares.an> Message-ID: <20070904.213151.159479172.kou@cozmixng.org> Hi, > > > There is a generator for activeldap models now, called > > > model_activeldap > > > > > > To generate a 'user' model, you can invoke it as > > > > > > ./script/generate model_activeldap user > > > > I changed this name to model_active_ldap too. > > > Hi Kou, > > You added some options: :prefix, :dn_attribute, :classes. > But what about :scope and :recommended_classes ? My power was ran out at the time... If someone gives us a patch, I'll merge that. BTW, Ace, could you remove your 'Reply-To:' header? I hope subscribers mail to ML not only you. Thanks, -- kou From lists at suares.an Tue Sep 4 08:55:21 2007 From: lists at suares.an (Ace Suares) Date: Tue, 4 Sep 2007 08:55:21 -0400 Subject: [Ruby-activeldap-discuss] model_activeldap generator In-Reply-To: <20070904.213151.159479172.kou@cozmixng.org> References: <200708312324.54138.lists@suares.an> <200709040822.40452.lists@suares.an> <20070904.213151.159479172.kou@cozmixng.org> Message-ID: <200709040855.21176.lists@suares.an> Hi, > > > > You added some options: :prefix, :dn_attribute, :classes. > > But what about :scope and :recommended_classes ? > > My power was ran out at the time... > If someone gives us a patch, I'll merge that. I'll look. > > > BTW, Ace, could you remove your 'Reply-To:' header? I hope > subscribers mail to ML not only you. Done! Thx, I wasn't aware... Ace > > > Thanks, > -- > kou > _______________________________________________ > Ruby-activeldap-discuss mailing list > Ruby-activeldap-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/ruby-activeldap-discuss From lists at suares.an Tue Sep 4 09:09:05 2007 From: lists at suares.an (Ace Suares) Date: Tue, 4 Sep 2007 09:09:05 -0400 Subject: [Ruby-activeldap-discuss] API CHANGE: establish_connection doesn't connect LDAP server In-Reply-To: <20070904.205900.259412326.kou@cozmixng.org> References: <20070901.145048.56297849.kou@cozmixng.org> <200709040750.24434.lists@suares.an> <20070904.205900.259412326.kou@cozmixng.org> Message-ID: <200709040909.05153.lists@suares.an> On Tuesday 04 September 2007, Kouhei Sutou wrote: > > If your application is Rails application, mz's instructions > will help you: > > http://rubyforge.org/pipermail/ruby-activeldap-discuss/2007-September/0 >00328.html That worked! ace > > > Thanks, > -- > kou > _______________________________________________ > Ruby-activeldap-discuss mailing list > Ruby-activeldap-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/ruby-activeldap-discuss From lists at suares.an Tue Sep 4 09:26:27 2007 From: lists at suares.an (Ace Suares) Date: Tue, 4 Sep 2007 09:26:27 -0400 Subject: [Ruby-activeldap-discuss] =?iso-8859-1?q?API_CHANGE=3A_establish?= =?iso-8859-1?q?=5Fconnection_doesn=27t_connect=09LDAP_server?= In-Reply-To: <20070901.145048.56297849.kou@cozmixng.org> References: <20070901.145048.56297849.kou@cozmixng.org> Message-ID: <200709040926.27644.lists@suares.an> Hi, > > after: > begin > ActiveLdap::Base.establish_connection(...) > unless ActiveLdap::Base.connected? > ActiveLdap::Base.connection.connect > end > rescue ActiveLdap::AuthenticationError > ... > end Where does this code go ? I tried to put it in application controller but it didn't work. I moved ruby-activeldap according to http://rubyforge.org/pipermail/ruby-activeldap-discuss/2007-September/000328.html I tried 'generate model_active_ldap' and now it works even if the ldapserver is down. Note: the plugin was located at vendor/plugin/activeldap but is now located inside vendor/plugin/ruby-activeldap-0.8.4 but it still works. But my applicaiton doesn't work anymore (no connection). So, where do I put the above code to make this work? Cheers, ace > > The above changes will work both of 0.8.3.1 and trunk. > > > And I've changed API for connection per DN > too. establish_connection for instance doesn't connect to > LDAP server too. But I've added a convenience method #bind. > > before: > begin > ldap_entry.establish_connection(:password => password) > rescue ActiveLdap::AuthenticationError > ... > end > > after: > begin > ldap_entry.bind(password) > rescue ActiveLdap::AuthenticationError > ... > end > > > Thanks, > -- > kou > _______________________________________________ > Ruby-activeldap-discuss mailing list > Ruby-activeldap-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/ruby-activeldap-discuss From lists at suares.an Tue Sep 4 19:56:37 2007 From: lists at suares.an (Ace Suares) Date: Tue, 4 Sep 2007 19:56:37 -0400 Subject: [Ruby-activeldap-discuss] =?iso-8859-1?q?API_CHANGE=3A_establish?= =?iso-8859-1?q?=5Fconnection_doesn=27t_connect=09LDAP_server?= In-Reply-To: <200709040926.27644.lists@suares.an> References: <20070901.145048.56297849.kou@cozmixng.org> <200709040926.27644.lists@suares.an> Message-ID: <200709041956.37349.lists@suares.an> Hi, On Tuesday 04 September 2007, Ace Suares wrote: > Hi, > > > after: > > begin > > ActiveLdap::Base.establish_connection(...) > > unless ActiveLdap::Base.connected? > > ActiveLdap::Base.connection.connect > > end > > rescue ActiveLdap::AuthenticationError > > ... > > end > > Where does this code go ? > > I tried to put it in application controller but it didn't work. I also tried to put it in init.rb in the plugin. But I keep getting a connection not established error in connection.rb line 114. Ace > > I moved ruby-activeldap according to > http://rubyforge.org/pipermail/ruby-activeldap-discuss/2007-September/0 >00328.html > > I tried 'generate model_active_ldap' and now it works even if the > ldapserver is down. Note: the plugin was located at > vendor/plugin/activeldap but is now located inside > vendor/plugin/ruby-activeldap-0.8.4 but it still works. > > But my applicaiton doesn't work anymore (no connection). > > So, where do I put the above code to make this work? > > Cheers, > ace > > > The above changes will work both of 0.8.3.1 and trunk. > > > > > > And I've changed API for connection per DN > > too. establish_connection for instance doesn't connect to > > LDAP server too. But I've added a convenience method #bind. > > > > before: > > begin > > ldap_entry.establish_connection(:password => password) > > rescue ActiveLdap::AuthenticationError > > ... > > end > > > > after: > > begin > > ldap_entry.bind(password) > > rescue ActiveLdap::AuthenticationError > > ... > > end > > > > > > Thanks, > > -- > > kou > > _______________________________________________ > > Ruby-activeldap-discuss mailing list > > Ruby-activeldap-discuss at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ruby-activeldap-discuss > > _______________________________________________ > Ruby-activeldap-discuss mailing list > Ruby-activeldap-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/ruby-activeldap-discuss From kou at cozmixng.org Wed Sep 5 10:13:56 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Wed, 05 Sep 2007 23:13:56 +0900 (JST) Subject: [Ruby-activeldap-discuss] API CHANGE: establish_connection doesn't connect LDAP server In-Reply-To: <200709040926.27644.lists@suares.an> References: <20070901.145048.56297849.kou@cozmixng.org> <200709040926.27644.lists@suares.an> Message-ID: <20070905.231356.268022573.kou@cozmixng.org> Hi, In <200709040926.27644.lists at suares.an> "Re: [Ruby-activeldap-discuss] API CHANGE: establish_connection doesn't connect LDAP server" on Tue, 4 Sep 2007 09:26:27 -0400, Ace Suares wrote: > > after: > > begin > > ActiveLdap::Base.establish_connection(...) > > unless ActiveLdap::Base.connected? > > ActiveLdap::Base.connection.connect > > end > > rescue ActiveLdap::AuthenticationError > > ... > > end > > Where does this code go ? > > I tried to put it in application controller but it didn't work. If you don't have 'before' code in your application, you don't need anything. 'before' code was used for authentication. Thanks, -- kou From josh.m.sharpe at gmail.com Fri Sep 7 14:14:04 2007 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Fri, 7 Sep 2007 14:14:04 -0400 Subject: [Ruby-activeldap-discuss] undefined method close for activeldap Message-ID: <6a7129610709071114r2c5cfc7fla676dcb7165bbb7e@mail.gmail.com> I've been following the HowTo here: http://wiki.rubyonrails.org/rails/pages/HowtoAuthenticateViaLdap I'm down to trying to run the following in irb >> LdapUser.login("asdfad","asdfasdf") NoMethodError: undefined method `close' for ActiveLdap::Base:Class from ./script/../config/../config/../app/models/ldap_user.rb:16:in `login' from (irb):1 Then, if I comment that line out I get: LdapUser.login("asdfasd","asdfasd") NoMethodError: undefined method `connect' for ActiveLdap::Base:Class from ./script/../config/../config/../app/models/ldap_user.rb:4:in `login' from (irb):3 So I guess I'm missing something in the install. I've redone the install from the ground up twice now and don't think I missed anything. Maybe someone out there has an idea? Thanks, Josh -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ruby-activeldap-discuss/attachments/20070907/87e5b8d4/attachment.html From kou at cozmixng.org Fri Sep 7 22:13:07 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Sat, 08 Sep 2007 11:13:07 +0900 (JST) Subject: [Ruby-activeldap-discuss] undefined method close for activeldap In-Reply-To: <6a7129610709071114r2c5cfc7fla676dcb7165bbb7e@mail.gmail.com> References: <6a7129610709071114r2c5cfc7fla676dcb7165bbb7e@mail.gmail.com> Message-ID: <20070908.111307.506452632.kou@cozmixng.org> Hi, > I've been following the HowTo here: > http://wiki.rubyonrails.org/rails/pages/HowtoAuthenticateViaLdap The document is out of date. There is a sample Rails application: http://ruby-activeldap.googlecode.com/svn/tags/r0.8.3.1/examples/al-admin/ And you can try this: http://pub.cozmixng.org/al-admin/ The sample application has codes for authentication: http://ruby-activeldap.googlecode.com/svn/tags/r0.8.3.1/examples/al-admin/app/models/ldap_user.rb But connection related APIs has been changed in trunk. So the cods will be changed in the next release: http://ruby-activeldap.googlecode.com/svn/trunk/examples/al-admin/app/models/ldap_user.rb Thanks, -- kou From pierre.gambarotto at enseeiht.fr Mon Sep 10 02:04:17 2007 From: pierre.gambarotto at enseeiht.fr (Pierre Gambarotto) Date: Mon, 10 Sep 2007 08:04:17 +0200 Subject: [Ruby-activeldap-discuss] automatic reconnection In-Reply-To: References: <46DBF7EB.9060105@enseeiht.fr> <20070903.212507.72828994.kou@cozmixng.org> Message-ID: Le 9 sept. 07 ? 19:45, Will Drewry? a ?crit : > > > The base adapter supports retrying connections automatically. > Check out the > "operation" function in > http://ruby-activeldap.googlecode.com/svn/trunk/lib/active_ldap/ > adapter/base.rb > It will detect an error if an error is returned from the connection > adapter > or if a timeout is set. Often, you will need to use the > "retry_on_timeout" > and "timeout" connection options to get it working robustly. (If > you are > not using linux, you may have some trouble with Ruby/LDAP's > blocking I/O - > we have a forking timeout approach for linux which gets around that..) > > You can set the retry_limit to -1 to get unlimited reconnection > attempts and > set a delay between retries with the "retry_wait" option. I think > these > features are still functional. > > Hope this helps! > Perfect ! Thanks for the hint Pierre From davide.vaghetti at unipi.it Tue Sep 11 12:39:57 2007 From: davide.vaghetti at unipi.it (Davide Vaghetti) Date: Tue, 11 Sep 2007 18:39:57 +0200 Subject: [Ruby-activeldap-discuss] limit and offset Message-ID: <46E6C4DD.302@unipi.it> Hi everybody first of all, many thanks to Kou for the recent ActiveLdap development. Waiting for the "result pagination via LDAP::Controls" that is listed in the TODO, did anybody find out a work around to have similar functionality ? I'm not a good developer/programmer, but I still tried myself, unfortunately AFAIK without an "offset" function is impossible to do it, am I right Kou ? thanks in advance for any responses ciao -- Davide Vaghetti Area SerRA - University of Pisa NOC From lists at suares.an Wed Sep 12 10:13:12 2007 From: lists at suares.an (Ace Suares) Date: Wed, 12 Sep 2007 10:13:12 -0400 Subject: [Ruby-activeldap-discuss] Still problems with 0.8.4 and Establish Connection Message-ID: <200709121013.12936.lists@suares.an> Hi List, When I do the following: 1. svn export trunk 2. put this in my app vendor/plugin directory 3. delete all older gems of ruby-activeldap then I am sure I am using 0.8.4 (which is trunk now). In config/environment.rb I add require 'active_ldap? When I run make-testapp (see www.active-ldap.com/smaple-application ) then the models are created. When I use 0.8.3.1 of course, NOT, since there is the problem with the LDAP connection. So, then I generate a controller and a method def index @users=User.find(:all) end and an appropriate view. Start the server with ./script/server and then go to http://127.0.0.1:3000/user I wil get an ConnectionNotEstablished Error: ActiveLdap::ConnectionNotEstablished in UserController#index ActiveLdap::ConnectionNotEstablished RAILS_ROOT: script/../config/.. Application Trace | Framework Trace | Full Trace vendor/plugins/ruby-activeldap/lib/active_ldap/connection.rb:114:in `retrieve_connection' vendor/plugins/ruby-activeldap/lib/active_ldap/connection.rb:71:in `connection' vendor/plugins/ruby-activeldap/lib/active_ldap/operations.rb:63:in `search' vendor/plugins/ruby-activeldap/lib/active_ldap/operations.rb:206:in `find_every' vendor/plugins/ruby-activeldap/lib/active_ldap/operations.rb:178:in `find' app/controllers/user_controller.rb:3:in `index' vendor/plugins/ruby-activeldap/lib/active_ldap/connection.rb:114:in `retrieve_connection' vendor/plugins/ruby-activeldap/lib/active_ldap/connection.rb:71:in `connection' vendor/plugins/ruby-activeldap/lib/active_ldap/operations.rb:63:in `search' vendor/plugins/ruby-activeldap/lib/active_ldap/operations.rb:206:in `find_every' vendor/plugins/ruby-activeldap/lib/active_ldap/operations.rb:178:in `find' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:113:in `handle_dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:79:in `service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:63:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/webrick.rb:59 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' script/server:3 vendor/plugins/ruby-activeldap/lib/active_ldap/connection.rb:114:in `retrieve_connection' vendor/plugins/ruby-activeldap/lib/active_ldap/connection.rb:71:in `connection' vendor/plugins/ruby-activeldap/lib/active_ldap/operations.rb:63:in `search' vendor/plugins/ruby-activeldap/lib/active_ldap/operations.rb:206:in `find_every' vendor/plugins/ruby-activeldap/lib/active_ldap/operations.rb:178:in `find' app/controllers/user_controller.rb:3:in `index' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:113:in `handle_dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:79:in `service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:63:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/webrick.rb:59 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' script/server:3 Request Parameters: None Show session dump --- flash: !map:ActionController::Flash::FlashHash {} Response Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"} Ace From kou at cozmixng.org Thu Sep 13 08:58:47 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Thu, 13 Sep 2007 21:58:47 +0900 (JST) Subject: [Ruby-activeldap-discuss] limit and offset In-Reply-To: <46E6C4DD.302@unipi.it> References: <46E6C4DD.302@unipi.it> Message-ID: <20070913.215847.1494119178.kou@cozmixng.org> Hi, In <46E6C4DD.302 at unipi.it> "[Ruby-activeldap-discuss] limit and offset" on Tue, 11 Sep 2007 18:39:57 +0200, Davide Vaghetti wrote: > Waiting for the "result pagination via LDAP::Controls" that is listed in > the TODO, did anybody find out a work around to have similar > functionality ? > I'm not a good developer/programmer, but I still tried myself, > unfortunately AFAIK without an "offset" function is impossible to do it, > am I right Kou ? I think so too. But Francis, the author of Net::LDAP, may know about this. Could you ask him about this? Thanks, -- kou From kou at cozmixng.org Thu Sep 13 09:03:45 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Thu, 13 Sep 2007 22:03:45 +0900 (JST) Subject: [Ruby-activeldap-discuss] Still problems with 0.8.4 and Establish Connection In-Reply-To: <200709121013.12936.lists@suares.an> References: <200709121013.12936.lists@suares.an> Message-ID: <20070913.220345.1618390783.kou@cozmixng.org> Hi, In <200709121013.12936.lists at suares.an> "[Ruby-activeldap-discuss] Still problems with 0.8.4 and Establish Connection" on Wed, 12 Sep 2007 10:13:12 -0400, Ace Suares wrote: > When I do the following: > > 1. svn export trunk > 2. put this in my app vendor/plugin directory > 3. delete all older gems of ruby-activeldap > > then I am sure I am using 0.8.4 (which is trunk now). > > In config/environment.rb I add > require 'active_ldap? > > When I run make-testapp (see www.active-ldap.com/smaple-application ) > then the models are created. When I use 0.8.3.1 of course, NOT, since > there is the problem with the LDAP connection. I'm sorry but I can't understand what is the problem. We will never success > def index > @users=User.find(:all) > end until we have a correct LDAP server configuration and a working LDAP server. Because we can't retrieve LDAP entries from a LDAP server. I think this is also true for ActiveRecord. Thanks, -- kou From kou at cozmixng.org Thu Sep 13 09:09:25 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Thu, 13 Sep 2007 22:09:25 +0900 (JST) Subject: [Ruby-activeldap-discuss] Reply-To header Message-ID: <20070913.220925.1686933792.kou@cozmixng.org> Hi Will, Could you set Reply-To header of this ML to this ML? I want everyone to share ActiveLdap related information. But some people sometimes send a mail to just me not this ML. If Reply-To header is set, those mistakes will decrease. Thanks, -- kou From davide.vaghetti at unipi.it Thu Sep 13 11:09:45 2007 From: davide.vaghetti at unipi.it (Davide Vaghetti) Date: Thu, 13 Sep 2007 17:09:45 +0200 Subject: [Ruby-activeldap-discuss] limit and offset In-Reply-To: <20070913.215847.1494119178.kou@cozmixng.org> References: <46E6C4DD.302@unipi.it> <20070913.215847.1494119178.kou@cozmixng.org> Message-ID: <46E952B9.9000205@unipi.it> Kouhei Sutou ha scritto: > Hi, > > In <46E6C4DD.302 at unipi.it> > "[Ruby-activeldap-discuss] limit and offset" on Tue, 11 Sep 2007 18:39:57 +0200, > Davide Vaghetti wrote: > >> Waiting for the "result pagination via LDAP::Controls" that is listed in >> the TODO, did anybody find out a work around to have similar >> functionality ? >> I'm not a good developer/programmer, but I still tried myself, >> unfortunately AFAIK without an "offset" function is impossible to do it, >> am I right Kou ? > > I think so too. But Francis, the author of Net::LDAP, may > know about this. Could you ask him about this? > Thanks for your reply. I'll ask him and let the list know the reply if any. In the meantime if anybody find out a way to have a pagination/offset function with the current code, please post it to the list... having to deal with more than 60000 thousands entry in the same ldap leaf I really really need it :-( many thanks ciao -- Davide Vaghetti Centro SerRA - University of Pisa NOC From automatthew at gmail.com Thu Sep 13 14:37:14 2007 From: automatthew at gmail.com (Matthew King) Date: Thu, 13 Sep 2007 13:37:14 -0500 Subject: [Ruby-activeldap-discuss] limit and offset In-Reply-To: <46E952B9.9000205@unipi.it> References: <46E6C4DD.302@unipi.it> <20070913.215847.1494119178.kou@cozmixng.org> <46E952B9.9000205@unipi.it> Message-ID: <46287E10-A79A-4F6F-87F0-D4CF577B5E9A@gmail.com> On Sep 13, 2007, at 10:09 AM, Davide Vaghetti wrote: > Thanks for your reply. I'll ask him and let the list know the reply if > any. In the meantime if anybody find out a way to have a > pagination/offset function with the current code, please post it to > the > list... having to deal with more than 60000 thousands entry in the > same > ldap leaf I really really need it :-( Here's the link that started my digging on the topic: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/195249 Disclaimer: I'm not an LDAP expert, but I've done a whole mess of reading about OpenLDAP lately. Let the knowledgeable correct me where I err. As I understand it, paging in LDAP is somewhat of a pain. You have to use a "search extension" argument in the ldapsearch tool, as paging is not included in the search filter syntax. This is as opposed to SQL queries, where you can specify a LIMIT and OFFSET in the WHERE clause. Thus LDAP clients must implement the pagedResults search control (and the LDAP directory server must support it). What's worse is the way the paging is implemented when following RFC 2696 (http://www.faqs.org/rfcs/rfc2696.html). You can only specify the size of the result set, not the offset or a page number. The LDAP server returns a cookie with the search results. The client uses the cookie in the next pagedResults query, and the server uses the cookie to figure out where to start the next set of results. LDAP clients must treat the cookie as opaque, i.e. they shouldn't know how to do anything other than send the cookie back to the server. Thus the only way to paginate results on the server side appears to be by looping through all results. The client must retain a cookie from each query for use in the next. Yuck. Can you guess who wrote RFC 2696? To the extent that Net::LDAP supports the pagedResults control, it is only to prevent ActiveDirectory from choking when a query returns more than 1000 results. See ./lib/net/ldap.rb:1158 for the code that handles the pagedResult control. Ruby/LDAP does support pagedResults, which I should have figured out from the line in the TODO file that started this thread: "Add result pagination via LDAP::Controls". So I think adding support for the control to the Ruby/LDAP adapter for ActiveLdap should be practical. It might be possible to roll your own pagination, in a very ugly way, by calling the ActiveLdap::Base#search method with a block that throws away results before and after the desired page set. Net::LDAP yields each entry *after* adding it to the result_set array, so you would need to set the entry to nil and compact the result. Alternatively, perhaps you could override the Net::LDAP search method to yield the entry to the block first, then add it to the result_set only if not nil. It's ugly every way you look. From lists at suares.an Thu Sep 13 15:17:52 2007 From: lists at suares.an (Ace Suares) Date: Thu, 13 Sep 2007 15:17:52 -0400 Subject: [Ruby-activeldap-discuss] Still problems with 0.8.4 and Establish Connection In-Reply-To: <20070913.220345.1618390783.kou@cozmixng.org> References: <200709121013.12936.lists@suares.an> <20070913.220345.1618390783.kou@cozmixng.org> Message-ID: <200709131517.52813.lists@suares.an> Hi ! Thursday 13 September 2007, Kouhei Sutou wrote: > > I'm sorry but I can't understand what is the problem. > > We will never success > > > def index > > @users=User.find(:all) > > end > > until we have a correct LDAP server configuration and a > working LDAP server. Because we can't retrieve LDAP entries > from a LDAP server. I think this is also true for ActiveRecord. > The LDAP server is fine, the config too. If I remove 0.8.4, and reinstall 0.8.3.1, then a. using script/generate fails b. using script/server and then going to the site, works If I remove 0.8.3.1 and install 0.8.4 then a. using script/generate works b. using script/server and going to the site, fails Cheers, ace > > Thanks, > -- > kou > _______________________________________________ > Ruby-activeldap-discuss mailing list > Ruby-activeldap-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/ruby-activeldap-discuss From josh.m.sharpe at gmail.com Fri Sep 14 08:40:05 2007 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Fri, 14 Sep 2007 08:40:05 -0400 Subject: [Ruby-activeldap-discuss] establishing connection Message-ID: <6a7129610709140540g69211acfme734a57c072ab942@mail.gmail.com> I'm getting an ActiveLdap::ConnectionNotEstablished: ActiveLdap::ConnectionNotEstablished error. For what it's worth I know very little about working with LDAP.... I'm going to modify what we are currently using in our Apache Configuration(that works) and hopefully get the same settings working with ActiveLdap.... So here's our apache.conf: Of course I've changed words, etc, for sensitivity reasons.... AuthLDAPEnabled on AuthLDAPURL "ldaps://directory.mydomain.edu:636/dc=mydomain,dc=edu?uid" AuthLDAPBindDN "cn=user_name,ou=some_group,dc=mydomain,dc=edu" AuthLDAPBindPassword "this_looks_like_a_hashed_password" For testing purposes I've been doing the following: $ irb irb(main):001:0> require 'active_ldap' => true irb(main):006:0> ActiveLdap::Base.establish_connection(:host => ' directory.mydomain.edu', :port => 636, :base => 'dc=directory,dc=mydomain,dc=edu', :bind_dn => 'cn=user_name,ou=some_group,dc=mydomain,dc=edu', :password => 'this_looks_like_a_hashed_password') LDAP::ResultError: Can't contact LDAP server from /usr/local/lib/site_ruby/1.8/active_ldap/adapter/ldap.rb:20:in `initialize' from /usr/local/lib/site_ruby/1.8/active_ldap/adapter/ldap.rb:20:in `new' from /usr/local/lib/site_ruby/1.8/active_ldap/adapter/ldap.rb:20:in `connect' from /usr/local/lib/site_ruby/1.8/active_ldap/adapter/ldap.rb:39:in `connect' from /usr/local/lib/site_ruby/1.8/active_ldap/adapter/base.rb:30:in `connect' from /usr/local/lib/site_ruby/1.8/active_ldap/adapter/ldap.rb:38:in `connect' from /usr/local/lib/site_ruby/1.8/active_ldap/base.rb:255:in `establish_connection' from (irb):6 Thanks for lookin... Josh -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ruby-activeldap-discuss/attachments/20070914/375cb189/attachment.html From kou at cozmixng.org Fri Sep 14 08:02:48 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Fri, 14 Sep 2007 21:02:48 +0900 (JST) Subject: [Ruby-activeldap-discuss] Still problems with 0.8.4 and Establish Connection In-Reply-To: <200709131517.52813.lists@suares.an> References: <200709121013.12936.lists@suares.an> <20070913.220345.1618390783.kou@cozmixng.org> <200709131517.52813.lists@suares.an> Message-ID: <20070914.210248.1227433467.kou@cozmixng.org> Hi, > Thursday 13 September 2007, Kouhei Sutou wrote: > > > > I'm sorry but I can't understand what is the problem. > > > > We will never success > > > > > def index > > > @users=User.find(:all) > > > end > > > > until we have a correct LDAP server configuration and a > > working LDAP server. Because we can't retrieve LDAP entries > > from a LDAP server. I think this is also true for ActiveRecord. > > > > > The LDAP server is fine, the config too. > If I remove 0.8.4, and reinstall 0.8.3.1, then > a. using script/generate fails > b. using script/server and then going to the site, works > > If I remove 0.8.3.1 and install 0.8.4 then > a. using script/generate works > b. using script/server and going to the site, fails Thanks. I can understand now but I can't reproduce that. Could you add debug prints and show us the result? The result will be displayed in your terminal. vendor/plugins/ruby-activeldap/lib/active_ldap/connection.rb: def determine_active_connection_name key = active_connection_key p [key] # <- add if active_connections[key] or configuration(key) ... end vendor/plugins/ruby-activeldap/lib/active_ldap/configurations.rb: def configuration(key=nil) p @@defined_configurations.keys # <- add @@defined_configurations[key || active_connection_name] end Thanks, -- kou From kou at cozmixng.org Fri Sep 14 08:56:27 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Fri, 14 Sep 2007 21:56:27 +0900 (JST) Subject: [Ruby-activeldap-discuss] establishing connection In-Reply-To: <6a7129610709140540g69211acfme734a57c072ab942@mail.gmail.com> References: <6a7129610709140540g69211acfme734a57c072ab942@mail.gmail.com> Message-ID: <20070914.215627.-1958224047.kou@cozmixng.org> Hi, > I'm getting an ActiveLdap::ConnectionNotEstablished: > ActiveLdap::ConnectionNotEstablished error. > > For what it's worth I know very little about working with LDAP.... I'm going > to modify what we are currently using in our Apache Configuration(that works) > and hopefully get the same settings working with ActiveLdap.... So here's our > apache.conf: > > Of course I've changed words, etc, for sensitivity reasons.... > AuthLDAPURL "ldaps://directory.mydomain.edu:636/dc=mydomain,dc=edu?uid" > irb(main):006:0> ActiveLdap:: Base.establish_connection(:host => ' > directory.mydomain.edu', :port => 636, :base => 'dc=directory,dc=mydomain,dc= > edu', :bind_dn => 'cn=user_name,ou=some_group,dc=mydomain,dc=edu', :password => > 'this_looks_like_a_hashed_password') Please add ':method => :ssl' to access your LDAP server with ldaps. Thanks, -- kou From josh.m.sharpe at gmail.com Fri Sep 14 09:10:41 2007 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Fri, 14 Sep 2007 09:10:41 -0400 Subject: [Ruby-activeldap-discuss] establishing connection In-Reply-To: <20070914.215627.-1958224047.kou@cozmixng.org> References: <6a7129610709140540g69211acfme734a57c072ab942@mail.gmail.com> <20070914.215627.-1958224047.kou@cozmixng.org> Message-ID: <6a7129610709140610y2020529cob41b07ca7914a1fe@mail.gmail.com> I tried that. I've also tried several combinations of try_sasl => false and allow_anonymous => false Interestingly enough if I add method => plain it hangs all day long. Josh On 9/14/07, Kouhei Sutou wrote: > > Hi, > > > I'm getting an ActiveLdap::ConnectionNotEstablished: > > ActiveLdap::ConnectionNotEstablished error. > > > > For what it's worth I know very little about working with LDAP.... I'm > going > > to modify what we are currently using in our Apache Configuration(that > works) > > and hopefully get the same settings working with ActiveLdap.... So > here's our > > apache.conf: > > > > Of course I've changed words, etc, for sensitivity reasons.... > > > AuthLDAPURL "ldaps://directory.mydomain.edu:636/dc=mydomain,dc=edu?uid" > > > irb(main):006:0> ActiveLdap:: Base.establish_connection(:host => ' > > directory.mydomain.edu', :port => 636, :base => > 'dc=directory,dc=mydomain,dc= > > edu', :bind_dn => 'cn=user_name,ou=some_group,dc=mydomain,dc=edu', > :password => > > 'this_looks_like_a_hashed_password') > > Please add ':method => :ssl' to access your LDAP server with > ldaps. > > > Thanks, > -- > kou > _______________________________________________ > Ruby-activeldap-discuss mailing list > Ruby-activeldap-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/ruby-activeldap-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ruby-activeldap-discuss/attachments/20070914/b6b8026d/attachment.html From kou at cozmixng.org Fri Sep 14 09:28:05 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Fri, 14 Sep 2007 22:28:05 +0900 (JST) Subject: [Ruby-activeldap-discuss] establishing connection In-Reply-To: <6a7129610709140610y2020529cob41b07ca7914a1fe@mail.gmail.com> References: <6a7129610709140540g69211acfme734a57c072ab942@mail.gmail.com> <20070914.215627.-1958224047.kou@cozmixng.org> <6a7129610709140610y2020529cob41b07ca7914a1fe@mail.gmail.com> Message-ID: <20070914.222805.777577422.kou@cozmixng.org> Hi, In <6a7129610709140610y2020529cob41b07ca7914a1fe at mail.gmail.com> "Re: [Ruby-activeldap-discuss] establishing connection" on Fri, 14 Sep 2007 09:10:41 -0400, "Josh Sharpe" wrote: > I tried that. I've also tried several combinations of > try_sasl => false > and > allow_anonymous => false > > Interestingly enough if I add method => plain > > it hangs all day long. Uhmm. Are you running Apache and ActiveLdap on same host? Does ldapsearch work with same configuration? Thanks, -- kou From davide.vaghetti at unipi.it Fri Sep 14 09:39:44 2007 From: davide.vaghetti at unipi.it (Davide Vaghetti) Date: Fri, 14 Sep 2007 15:39:44 +0200 Subject: [Ruby-activeldap-discuss] limit and offset In-Reply-To: <46287E10-A79A-4F6F-87F0-D4CF577B5E9A@gmail.com> References: <46E6C4DD.302@unipi.it> <20070913.215847.1494119178.kou@cozmixng.org> <46E952B9.9000205@unipi.it> <46287E10-A79A-4F6F-87F0-D4CF577B5E9A@gmail.com> Message-ID: <46EA8F20.50609@unipi.it> Matthew King wrote: > On Sep 13, 2007, at 10:09 AM, Davide Vaghetti wrote: >> Thanks for your reply. I'll ask him and let the list know the reply if >> any. In the meantime if anybody find out a way to have a >> pagination/offset function with the current code, please post it to >> the >> list... having to deal with more than 60000 thousands entry in the >> same >> ldap leaf I really really need it :-( > > Here's the link that started my digging on the topic: > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/195249 > [...] > Ruby/LDAP does support pagedResults, which I should have figured out > from the line in the TODO file that started this thread: "Add result > pagination via LDAP::Controls". So I think adding support for the > control to the Ruby/LDAP adapter for ActiveLdap should be practical. > > It might be possible to roll your own pagination, in a very ugly way, > by calling the ActiveLdap::Base#search method with a block that > throws away results before and after the desired page set. Net::LDAP > yields each entry *after* adding it to the result_set array, so you > would need to set the entry to nil and compact the result. > > Alternatively, perhaps you could override the Net::LDAP search method > to yield the entry to the block first, then add it to the result_set > only if not nil. > > It's ugly every way you look. > Matthew thanks for the in-depth answer, it really helped me to look at the problem from the right angle. That said, you are right: every solutions apart from the "LDAP::Controls" way is ugly. What I'm trying to do is the following: whatever the search is, in first place I request only the DN, I store the DNs in an array, than I start getting the number of entry I wish requesting them one by one through the DN (you could put them in another array or whatever)... well, this too is ugly, but it's faster than actually ask for all the attributes for each entry. thanks again ciao -- -- Davide Vaghetti Area SerRA - University of Pisa NOC From josh.m.sharpe at gmail.com Fri Sep 14 10:04:52 2007 From: josh.m.sharpe at gmail.com (Josh Sharpe) Date: Fri, 14 Sep 2007 10:04:52 -0400 Subject: [Ruby-activeldap-discuss] establishing connection In-Reply-To: <20070914.222805.777577422.kou@cozmixng.org> References: <6a7129610709140540g69211acfme734a57c072ab942@mail.gmail.com> <20070914.215627.-1958224047.kou@cozmixng.org> <6a7129610709140610y2020529cob41b07ca7914a1fe@mail.gmail.com> <20070914.222805.777577422.kou@cozmixng.org> Message-ID: <6a7129610709140704r1eb329a9ucfbee76791bd3824@mail.gmail.com> > Uhmm. Are you running Apache and ActiveLdap on same host? > Does ldapsearch work with same configuration? No, different hosts. the ldapsearch query works on the working Apache host but not on my dev box -- So I guess I need to get that working...maybe because openssl isn't set up correctly? Josh -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ruby-activeldap-discuss/attachments/20070914/07705d2e/attachment.html From automatthew at gmail.com Fri Sep 14 11:52:31 2007 From: automatthew at gmail.com (Matthew King) Date: Fri, 14 Sep 2007 10:52:31 -0500 Subject: [Ruby-activeldap-discuss] limit and offset In-Reply-To: <46EA8F20.50609@unipi.it> References: <46E6C4DD.302@unipi.it> <20070913.215847.1494119178.kou@cozmixng.org> <46E952B9.9000205@unipi.it> <46287E10-A79A-4F6F-87F0-D4CF577B5E9A@gmail.com> <46EA8F20.50609@unipi.it> Message-ID: On Sep 14, 2007, at 8:39 AM, Davide Vaghetti wrote: > What I'm trying to do is the following: whatever the search is, in > first > place I request only the DN, I store the DNs in an array, than I start > getting the number of entry I wish requesting them one by one through > the DN (you could put them in another array or whatever)... well, this > too is ugly, but it's faster than actually ask for all the attributes > for each entry. Good call. That is much cleaner than monkeypatching the search method. It will let you use Array#slice for paging, as well. Does anyone know whether ldap filters have a maximum string length? Or whether any implementations have arbitrary limits? I'm wondering how far you could get by constructing a filter that ORs together searches by rdn: (|(cn=Kid Chino)(cn=The Ironist)(cn=Miss Vixen)(cn=Cosmo Girl)...) Matthew From lists at suares.an Fri Sep 14 15:12:45 2007 From: lists at suares.an (Ace Suares) Date: Fri, 14 Sep 2007 15:12:45 -0400 Subject: [Ruby-activeldap-discuss] establishing connection In-Reply-To: <6a7129610709140704r1eb329a9ucfbee76791bd3824@mail.gmail.com> References: <6a7129610709140540g69211acfme734a57c072ab942@mail.gmail.com> <20070914.222805.777577422.kou@cozmixng.org> <6a7129610709140704r1eb329a9ucfbee76791bd3824@mail.gmail.com> Message-ID: <200709141512.45511.lists@suares.an> On Friday 14 September 2007, Josh Sharpe wrote: > > Uhmm. Are you running Apache and ActiveLdap on same host? > > Does ldapsearch work with same configuration? > > No, different hosts. the ldapsearch query works on the working Apache > host but not on my dev box -- So I guess I need to get that > working...maybe because openssl isn't set up correctly? > > Josh Or because on the apache host the server runs on 127.0.0.1 and not on it's external IP ? _ace From kou at cozmixng.org Fri Sep 21 06:50:41 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Fri, 21 Sep 2007 19:50:41 +0900 (JST) Subject: [Ruby-activeldap-discuss] ActiveLdap in trunk with Rails Message-ID: <20070921.195041.1955056053.kou@cozmixng.org> Hi, I made a little Wiki page for helping how to use ActiveLdap in trunk with Rails: http://code.google.com/p/ruby-activeldap/wiki/UsingTrunkWithRails Thanks, -- kou From lists at suares.an Fri Sep 21 10:06:30 2007 From: lists at suares.an (Ace Suares) Date: Fri, 21 Sep 2007 10:06:30 -0400 Subject: [Ruby-activeldap-discuss] ActiveLdap in trunk with Rails In-Reply-To: <20070921.195041.1955056053.kou@cozmixng.org> References: <20070921.195041.1955056053.kou@cozmixng.org> Message-ID: <200709211006.30707.lists@suares.an> On Friday 21 September 2007, Kouhei Sutou wrote: > Hi, > > I made a little Wiki page for helping how to use ActiveLdap > in trunk with Rails: > http://code.google.com/p/ruby-activeldap/wiki/UsingTrunkWithRails > > > Thanks, > -- > kou > _______________________________________________ > Ruby-activeldap-discuss mailing list > Ruby-activeldap-discuss at rubyforge.org > http://rubyforge.org/mailman/listinfo/ruby-activeldap-discuss Yeah I saw it.. cool. I hope I have time over the weekend to test it and to proceed with the tutorial... ace From kou at cozmixng.org Sat Sep 22 00:24:25 2007 From: kou at cozmixng.org (Kouhei Sutou) Date: Sat, 22 Sep 2007 13:24:25 +0900 (JST) Subject: [Ruby-activeldap-discuss] type cast support Message-ID: <20070922.132425.1099528125.kou@cozmixng.org> Hi, I've committed codes that supports type cast. THIS CHANGES MAY BREAK YOUR APPLICATION!!! Before: user.uid_number # => "1000" user.uid_number_before_type_cast # => "1000" After: user.uid_number # => 1000 user.uid_number_before_type_cast # => "1000" Thanks, -- kou