google-code-export / ruby-activeldap

Automatically exported from code.google.com/p/ruby-activeldap
Other
1 stars 1 forks source link

[Rails 2.3 Support] :: Running WEBrick Hangs #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello koutou.
I need to run Ruby 1.9.1 + Rails 2.3 + Activeldap + WEBrick (And later +
Thin) :)

Did you thinking about Rails 2.3 ? Do you have time for this ? :) I hope,
yes. So, lets begin. :)

= Install Ruby 1.9.1-p0 =
{{{
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.gz
tar -xjpf ruby-1.9.1-p0.tar.bz2
cd ruby-1.9.1-p0
./configure
make && make_install
}}}

= Reinstall Rubygems 1.3.1 =
{{{
wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
tar -xzpf rubygems-1.3.1.tgz
cd rubygems-1.3.1
ruby setup.rb
}}}

= Install Rails 2.3.0 RC1 =
{{{
gem install rake rack test-unit
gem install rails --source http://gems.rubyonrails.org
gem install thin
}}}

{{{
[root al-admin]# gem list
*** LOCAL GEMS ***
actionmailer (2.3.1)
actionpack (2.3.1)
activerecord (2.3.1)
activeresource (2.3.1)
activesupport (2.3.1)
daemons (1.0.10)
eventmachine (0.12.4)
rack (0.9.1)
rails (2.3.1)
rake (0.8.4)
test-unit (2.0.2)
thin (1.0.0)
}}}

= Getting Activeldap from trunk r837 =
{{{ 
cd /root
svn checkout http://ruby-activeldap.googlecode.com/svn/trunk/
ruby-activeldap-read-only
cd ruby-activeldap-read-only/examples/al-admin/
}}}

Change RAILS_GEM_VERSION to 2.3.1 in config/environment.rb

= Trying to update rails =
{{{
[root al-admin]# rake rails:update
(in /root/ruby-activeldap-read-only/examples/al-admin)
/root/ruby-activeldap-read-only/examples/al-admin/app/controllers/application.rb
has been renamed to
/root/ruby-activeldap-read-only/examples/al-admin/app/controllers/application_co
ntroller.rb,
update your SCM as necessary
}}}

Looks great. :)

= Trying to run server (Webrick) =
{{{
[root al-admin]# mv config/database.yml.example config/database.yml
[root al-admin]# script/server
=> Booting WEBrick
=> Rails 2.3.1 application starting on http://0.0.0.0:3000
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/dependencie
s.rb:158:in
`require': no such file to load -- md5 (MissingSourceFile)
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/dependencie
s.rb:158:in
`require'
        from
/root/ruby-activeldap-read-only/lib/active_ldap/user_password.rb:2:in `<top
(required)>'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/dependencie
s.rb:158:in
`require'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/dependencie
s.rb:158:in
`require'
        from /root/ruby-activeldap-read-only/lib/active_ldap.rb:969:in
`<top (required)>'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/dependencie
s.rb:158:in
`require'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/dependencie
s.rb:158:in
`require'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/core_ext/ke
rnel/requires.rb:7:in
`block in require_library_or_gem'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/core_ext/ke
rnel/reporting.rb:11:in
`silence_warnings'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/core_ext/ke
rnel/requires.rb:5:in
`require_library_or_gem'
        from
/root/ruby-activeldap-read-only/examples/al-admin/../../rails/init.rb:1:in
`block in evaluate_init_rb'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/rails/plugin.rb:146:in `eval'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/rails/plugin.rb:146:in `block
in evaluate_init_rb'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/core_ext/ke
rnel/reporting.rb:11:in
`silence_warnings'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/rails/plugin.rb:142:in
`evaluate_init_rb'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/rails/plugin.rb:48:in `load'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/rails/plugin/loader.rb:38:in
`block in load_plugins'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/rails/plugin/loader.rb:37:in
`each'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/rails/plugin/loader.rb:37:in
`load_plugins'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/initializer.rb:346:in
`load_plugins'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/initializer.rb:163:in `process'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/initializer.rb:113:in `run'
        from
/root/ruby-activeldap-read-only/examples/al-admin/config/environment.rb:13:in
`<top (required)>'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/dependencie
s.rb:156:in
`require'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/dependencie
s.rb:156:in
`block in require'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/dependencie
s.rb:521:in
`new_constants_in'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/dependencie
s.rb:156:in
`require'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/commands/server.rb:84:in
`<top (required)>'
        from script/server:3:in `require'
        from script/server:3:in `<main>'
}}}

This can be fixed by:
{{{
# svn diff lib/active_ldap/user_password.rb
Index: lib/active_ldap/user_password.rb
===================================================================
--- lib/active_ldap/user_password.rb    (revision 837)
+++ lib/active_ldap/user_password.rb    (working copy)
@@ -1,6 +1,6 @@
 require 'English'
-require 'md5'
-require 'sha1'
+require 'digest/md5'
+require 'digest/sha1'

 module ActiveLdap
   module UserPassword
}}}

Trying to run server again:
{{{
[root al-admin]# script/server
=> Booting WEBrick
=> Rails 2.3.1 application starting on http://0.0.0.0:3000
/root/ruby-activeldap-read-only/lib/active_ldap/user_password.rb:81:in
`block in <module:Salt>': undefined method `to_a' for ".":String
(NoMethodError)
        from
/root/ruby-activeldap-read-only/lib/active_ldap/user_password.rb:80:in
`collect'
        from
/root/ruby-activeldap-read-only/lib/active_ldap/user_password.rb:80:in
`<module:Salt>'
        from
/root/ruby-activeldap-read-only/lib/active_ldap/user_password.rb:79:in
`<module:UserPassword>'
        from
/root/ruby-activeldap-read-only/lib/active_ldap/user_password.rb:6:in
`<module:ActiveLdap>'
        from
/root/ruby-activeldap-read-only/lib/active_ldap/user_password.rb:5:in `<top
(required)>'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/dependencie
s.rb:158:in
`require'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/dependencie
s.rb:158:in
`require'
        from /root/ruby-activeldap-read-only/lib/active_ldap.rb:969:in
`<top (required)>'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/dependencie
s.rb:158:in
`require'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/dependencie
s.rb:158:in
`require'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/core_ext/ke
rnel/requires.rb:7:in
`block in require_library_or_gem'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/core_ext/ke
rnel/reporting.rb:11:in
`silence_warnings'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/core_ext/ke
rnel/requires.rb:5:in
`require_library_or_gem'
        from
/root/ruby-activeldap-read-only/examples/al-admin/../../rails/init.rb:1:in
`block in evaluate_init_rb'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/rails/plugin.rb:146:in `eval'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/rails/plugin.rb:146:in `block
in evaluate_init_rb'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/core_ext/ke
rnel/reporting.rb:11:in
`silence_warnings'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/rails/plugin.rb:142:in
`evaluate_init_rb'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/rails/plugin.rb:48:in `load'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/rails/plugin/loader.rb:38:in
`block in load_plugins'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/rails/plugin/loader.rb:37:in
`each'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/rails/plugin/loader.rb:37:in
`load_plugins'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/initializer.rb:346:in
`load_plugins'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/initializer.rb:163:in `process'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/initializer.rb:113:in `run'
        from
/root/ruby-activeldap-read-only/examples/al-admin/config/environment.rb:13:in
`<top (required)>'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/dependencie
s.rb:156:in
`require'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/dependencie
s.rb:156:in
`block in require'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/dependencie
s.rb:521:in
`new_constants_in'
        from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/dependencie
s.rb:156:in
`require'
        from
/usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/commands/server.rb:84:in
`<top (required)>'
        from script/server:3:in `require'
        from script/server:3:in `<main>'
}}}

This can be fixed by:
{{{
# svn diff lib/active_ldap/user_password.rb
Index: lib/active_ldap/user_password.rb
===================================================================
--- lib/active_ldap/user_password.rb    (revision 837)
+++ lib/active_ldap/user_password.rb    (working copy)
@@ -78,7 +78,7 @@

     module Salt
       CHARS = ['.', '/', '0'..'9', 'A'..'Z', 'a'..'z'].collect do |x|
-        x.to_a
+        x.is_a?(Range) ? x.entries : x
       end.flatten

       module_function
}}}

Checked if it works in irb:
{{{
[root al-admin]# irb
>        CHARS = ['.', '/', '0'..'9', 'A'..'Z', 'a'..'z'].collect do |x|
*          x.is_a?(Range) ? x.entries : x
>        end.flatten
=> [".", "/", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B",
"C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q",
"R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f",
"g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u",
"v", "w", "x", "y", "z"]
}}}

Trying to run server again:
{{{
[root al-admin]# script/server
=> Booting WEBrick
=> Rails 2.3.1 application starting on http://0.0.0.0:3000
Missing these required gems:
  locale_rails

You're running:
  ruby 1.9.1.0 at /usr/bin/ruby
  rubygems 1.3.1 at /root/.gem/ruby/1.9.1, /usr/lib/ruby/gems/1.9.1

Run `rake gems:install` to install the missing gems.
}}}

After installing needed gem and running server - running hangs:
{{{
[root al-admin]# gem list
*** LOCAL GEMS ***
actionmailer (2.3.1)
actionpack (2.3.1)
activerecord (2.3.1)
activeresource (2.3.1)
activesupport (2.3.1)
daemons (1.0.10)
eventmachine (0.12.4)
locale (0.9.0)
locale_rails (0.1.0)
rack (0.9.1)
rails (2.3.1)
rake (0.8.4)
test-unit (2.0.2)
thin (1.0.0)

[root al-admin]# script/server
=> Booting WEBrick
=> Rails 2.3.1 application starting on http://0.0.0.0:3000
}}}

From other shell you can see CPU load by script/server:
{{{
[root al-admin]# top                                            
top - 14:42:09 up 3 days,  3:42,  3 users,  load average: 0.82, 0.43, 0.33
Tasks:  72 total,   3 running,  69 sleeping,   0 stopped,   0 zombie
Cpu(s): 99.7%us,  0.3%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    969284k total,   855808k used,   113476k free,   134720k buffers
Swap:  2104504k total,        0k used,  2104504k free,   566508k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND      

21294 root      20   0 34688  28m 3756 R 99.3  3.0   1:39.00 ruby         

}}}

And only kill -9 helps to stop server :(
Please help me.

Small info about migrating to Ruby 1.9:
- http://boga.wordpress.com/2008/04/15/ruby-19-porting-notes/
- http://www.scribd.com/doc/2589469/Migrating-to-Ruby-19

Original issue reported on code.google.com by Alexey.Chebotar@gmail.com on 5 Mar 2009 at 1:57

GoogleCodeExporter commented 9 years ago
Oh, WikiSyntax  does not works in issues... :(

Original comment by Alexey.Chebotar@gmail.com on 5 Mar 2009 at 1:59

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have great news. I can run my project. But al-admin still not running :(
{{{
# gem list
*** LOCAL GEMS ***
actionmailer (2.3.1)
actionpack (2.3.1)
activerecord (2.3.1)
activeresource (2.3.1)
activesupport (2.3.1)
daemons (1.0.10)
eventmachine (0.12.4)
hoe (1.9.0)
locale (0.9.0)
locale_rails (0.1.0)
rack (0.9.1)
rails (2.3.1)
rake (0.8.4)
rbus (0.2.0)
rubyforge (1.0.3)
sqlite3-ruby (1.2.4)
sys-uptime (0.5.2)
SyslogLogger (1.4.0)
test-unit (2.0.2)
thin (1.0.0)
uuidtools (1.0.7)
}}}

Trying to run server after patching and compiling rbus and ruby-ldap-0.9.7 (See
attach. I will send patch to developers later):
{{{
# script/server -e development
=> Booting WEBrick                                                    
=> Rails 2.3.1 application starting on http://0.0.0.0:3000            
/usr/lib/ruby/gems/1.9.1/gems/rbus-0.2.0/lib/rbus/etc/blankslate.rb:29: warning:
undefining `object_id' may cause serious problem
=> Call with -d to detach                                                       

=> Ctrl-C to shutdown server                                                    

[2009-03-06 09:32:28] INFO  WEBrick 1.3.1                                       

[2009-03-06 09:32:28] INFO  ruby 1.9.1 (2009-01-30) [i686-linux]                

[2009-03-06 09:32:28] WARN  TCPServer Error: Address already in use - bind(2)   

[2009-03-06 09:32:28] INFO  WEBrick::HTTPServer#start: pid=15432 port=3000      

/usr/lib/ruby/site_ruby/1.9.1/i686-linux/ldap.so: warning: defining
LDAP::Conn.allocate is deprecated; use rb_define_alloc_func()
/usr/lib/ruby/site_ruby/1.9.1/i686-linux/ldap.so: warning: defining
LDAP::Mod.allocate is deprecated; use rb_define_alloc_func() 

Processing LoginsController#new (for ::ffff:192.168.2.1 at 2009-03-06 09:33:11) 
[GET]
Attempting to reconnect                                                         

Reconnect to server failed: :plain is not one of the available connect methods:
:base, :ssl, :tls, :plain
Reconnect to server failed backtrace:                                           

  /root/onm/vendor/activeldap-trunk/lib/active_ldap/adapter/ldap.rb:202:in
`ensure_method'                 
  /root/onm/vendor/activeldap-trunk/lib/active_ldap/adapter/base.rb:45:in `connect' 

  /root/onm/vendor/activeldap-trunk/lib/active_ldap/adapter/ldap.rb:54:in `connect' 

  /root/onm/vendor/activeldap-trunk/lib/active_ldap/adapter/base.rb:559:in `block in
reconnect'            
  /root/onm/vendor/activeldap-trunk/lib/active_ldap/adapter/base.rb:546:in `loop'   

  /root/onm/vendor/activeldap-trunk/lib/active_ldap/adapter/base.rb:546:in
`reconnect'                     
  /root/onm/vendor/activeldap-trunk/lib/active_ldap/adapter/base.rb:579:in
`reconnect_if_need'             
  /root/onm/vendor/activeldap-trunk/lib/active_ldap/adapter/base.rb:250:in
`operation'                     
  /root/onm/vendor/activeldap-trunk/lib/active_ldap/adapter/base.rb:150:in `search' 

  /root/onm/vendor/activeldap-trunk/lib/active_ldap/adapter/ldap.rb:88:in `search'  

  /root/onm/vendor/activeldap-trunk/lib/active_ldap/operations.rb:65:in `search'    

  /root/onm/vendor/activeldap-trunk/lib/active_ldap/operations.rb:238:in `find_every'

  /root/onm/vendor/activeldap-trunk/lib/active_ldap/operations.rb:209:in `find'     

  /root/onm/app/controllers/application_controller.rb:32:in `menu_data'             

/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/callbacks.r
b:178:in
`evaluate_method'

/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/callbacks.r
b:166:in
`call'           

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/filters.rb:
225:in `call'

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/filters.rb:
629:in `run_before_filters'

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/filters.rb:
615:in `call_filters'

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/filters.rb:
610:in `perform_action_with_filters'

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/benchmarkin
g.rb:68:in
`block in perform_action_with_benchmark'

/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/core_ext/be
nchmark.rb:17:in
`block in ms'                     
  /usr/lib/ruby/1.9.1/benchmark.rb:308:in `realtime'                                

/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.1/lib/active_support/core_ext/be
nchmark.rb:17:in
`ms'                              

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/benchmarkin
g.rb:68:in
`perform_action_with_benchmark'         

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/rescue.rb:1
60:in
`perform_action_with_rescue'                 

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/flash.rb:14
1:in
`perform_action_with_flash'                   
  /usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/base.rb:523:in
`process'                                      

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/filters.rb:
606:in `process_with_filters'

  /usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/base.rb:391:in
`process'                                      
  /usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/base.rb:386:in
`call'                                         

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/routing/rou
te_set.rb:433:in
`call'                            

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/dispatcher.
rb:88:in
`dispatch'                                

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/dispatcher.
rb:111:in
`_call'                                  

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/dispatcher.
rb:82:in
`block in initialize'                     

/usr/lib/ruby/gems/1.9.1/gems/activerecord-2.3.1/lib/active_record/query_cache.r
b:29:in
`call'                                     

/usr/lib/ruby/gems/1.9.1/gems/activerecord-2.3.1/lib/active_record/query_cache.r
b:29:in
`block in call'                            

/usr/lib/ruby/gems/1.9.1/gems/activerecord-2.3.1/lib/active_record/connection_ad
apters/abstract/query_cache.rb:34:in
`cache'       

/usr/lib/ruby/gems/1.9.1/gems/activerecord-2.3.1/lib/active_record/query_cache.r
b:9:in `cache'

/usr/lib/ruby/gems/1.9.1/gems/activerecord-2.3.1/lib/active_record/query_cache.r
b:28:in
`call'                                     

/usr/lib/ruby/gems/1.9.1/gems/activerecord-2.3.1/lib/active_record/connection_ad
apters/abstract/connection_pool.rb:361:in
`call'   

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/vendor/rack
-1.0/rack/head.rb:9:in
`call'                      

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/vendor/rack
-1.0/rack/methodoverride.rb:24:in
`call'           

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/params_pars
er.rb:15:in
`call'                                 

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/rewindable_
input.rb:25:in
`call'                              

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/session/coo
kie_store.rb:93:in
`call'                          

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/reloader.rb
:9:in
`call'                                       

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/failsafe.rb
:11:in `call'

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/vendor/rack
-1.0/rack/lock.rb:11:in
`block in call'            
  <internal:prelude>:8:in `synchronize'                                             

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/vendor/rack
-1.0/rack/lock.rb:11:in
`call'                     

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/dispatcher.
rb:106:in
`call'                                   
  /usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/rails/rack/static.rb:27:in `call'   

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/vendor/rack
-1.0/rack/urlmap.rb:42:in
`block in call'          

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/vendor/rack
-1.0/rack/urlmap.rb:36:in
`each'                   

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/vendor/rack
-1.0/rack/urlmap.rb:36:in
`call'                   
  /usr/lib/ruby/gems/1.9.1/gems/rails-2.3.1/lib/rails/rack/log_tailer.rb:17:in `call'

/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.1/lib/action_controller/vendor/rack
-1.0/rack/handler/webrick.rb:40:in
`service'       
  /usr/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'                        

  /usr/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'                             

  /usr/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'              

  Attempting to reconnect                                                           

  Reconnect to server failed: :plain is not one of the available connect methods:
:base, :ssl, :tls, :plain                          
  Reconnect to server failed backtrace:                                             

  ... same as first backtrace ...

ActiveLdap::ConnectionError (Giving up trying to reconnect to LDAP server.):
  vendor/activeldap-trunk/lib/active_ldap/adapter/base.rb:548:in `block in reconnect'
  vendor/activeldap-trunk/lib/active_ldap/adapter/base.rb:546:in `loop'              
  vendor/activeldap-trunk/lib/active_ldap/adapter/base.rb:546:in `reconnect'         
  vendor/activeldap-trunk/lib/active_ldap/adapter/base.rb:579:in `reconnect_if_need' 
  vendor/activeldap-trunk/lib/active_ldap/adapter/base.rb:250:in `operation'         
  vendor/activeldap-trunk/lib/active_ldap/adapter/base.rb:150:in `search'            
  vendor/activeldap-trunk/lib/active_ldap/adapter/ldap.rb:88:in `search'             
  vendor/activeldap-trunk/lib/active_ldap/operations.rb:65:in `search'               
  vendor/activeldap-trunk/lib/active_ldap/operations.rb:238:in `find_every'          
  vendor/activeldap-trunk/lib/active_ldap/operations.rb:209:in `find'
  app/controllers/application_controller.rb:32:in `menu_data'
  activesupport (2.3.1) lib/active_support/callbacks.rb:178:in `evaluate_method'
  activesupport (2.3.1) lib/active_support/callbacks.rb:166:in `call'
  actionpack (2.3.1) lib/action_controller/filters.rb:225:in `call'
  actionpack (2.3.1) lib/action_controller/filters.rb:629:in `run_before_filters'
  actionpack (2.3.1) lib/action_controller/filters.rb:615:in `call_filters'
  actionpack (2.3.1) lib/action_controller/filters.rb:610:in
`perform_action_with_filters'
  actionpack (2.3.1) lib/action_controller/benchmarking.rb:68:in `block in
perform_action_with_benchmark'
  actionpack (2.3.1) lib/action_controller/benchmarking.rb:68:in
`perform_action_with_benchmark'
  actionpack (2.3.1) lib/action_controller/rescue.rb:160:in `perform_action_with_rescue'
  actionpack (2.3.1) lib/action_controller/flash.rb:141:in `perform_action_with_flash'
  actionpack (2.3.1) lib/action_controller/base.rb:523:in `process'
  actionpack (2.3.1) lib/action_controller/filters.rb:606:in `process_with_filters'
  actionpack (2.3.1) lib/action_controller/base.rb:391:in `process'
  actionpack (2.3.1) lib/action_controller/base.rb:386:in `call'
  actionpack (2.3.1) lib/action_controller/routing/route_set.rb:433:in `call'
  actionpack (2.3.1) lib/action_controller/dispatcher.rb:88:in `dispatch'
  actionpack (2.3.1) lib/action_controller/dispatcher.rb:111:in `_call'
  actionpack (2.3.1) lib/action_controller/dispatcher.rb:82:in `block in initialize'
  activerecord (2.3.1) lib/active_record/query_cache.rb:29:in `call'
  activerecord (2.3.1) lib/active_record/query_cache.rb:29:in `block in call'
  activerecord (2.3.1)
lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
  activerecord (2.3.1) lib/active_record/query_cache.rb:9:in `cache'
  activerecord (2.3.1) lib/active_record/query_cache.rb:28:in `call'
  activerecord (2.3.1)
lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
  actionpack (2.3.1) lib/action_controller/vendor/rack-1.0/rack/head.rb:9:in `call'
  actionpack (2.3.1)
lib/action_controller/vendor/rack-1.0/rack/methodoverride.rb:24:in `call'
  actionpack (2.3.1) lib/action_controller/params_parser.rb:15:in `call'
  actionpack (2.3.1) lib/action_controller/rewindable_input.rb:25:in `call'
  actionpack (2.3.1) lib/action_controller/session/cookie_store.rb:93:in `call'
  actionpack (2.3.1) lib/action_controller/reloader.rb:9:in `call'
  actionpack (2.3.1) lib/action_controller/failsafe.rb:11:in `call'
  actionpack (2.3.1) lib/action_controller/vendor/rack-1.0/rack/lock.rb:11:in `block
in call'
  <internal:prelude>:8:in `synchronize'
  actionpack (2.3.1) lib/action_controller/vendor/rack-1.0/rack/lock.rb:11:in `call'
  actionpack (2.3.1) lib/action_controller/dispatcher.rb:106:in `call'
  rails (2.3.1) lib/rails/rack/static.rb:27:in `call'
  actionpack (2.3.1) lib/action_controller/vendor/rack-1.0/rack/urlmap.rb:42:in
`block in call'
  actionpack (2.3.1) lib/action_controller/vendor/rack-1.0/rack/urlmap.rb:36:in `each'
  actionpack (2.3.1) lib/action_controller/vendor/rack-1.0/rack/urlmap.rb:36:in `call'
  rails (2.3.1) lib/rails/rack/log_tailer.rb:17:in `call'
  actionpack (2.3.1)
lib/action_controller/vendor/rack-1.0/rack/handler/webrick.rb:40:in `service'
  /usr/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
  /usr/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
  /usr/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'

Rendered rescues/_trace (183.7ms)
Rendered rescues/_request_and_response (4.9ms)
Rendering rescues/layout (internal_server_error)
}}}
P.S. Special thanks to Sergey Yanovitsky. For help in patching ruby-ldap. :)

Do you have any idea ?

Original comment by Alexey.Chebotar@gmail.com on 6 Mar 2009 at 8:54

Attachments:

GoogleCodeExporter commented 9 years ago
We need to support Ruby 1.9.1 before support Rails 2.3.1. ;-)
It means that 'ruby1.9 test/run-test.rb' pass all tests.

Could you submit a new ticket for 'Ruby 1.9.1 Support' and comment to it not 
this ticket?

P.S. The problem in #3 is fixed in trunk.

Original comment by kou...@gmail.com on 7 Mar 2009 at 8:16

GoogleCodeExporter commented 9 years ago
Ok. I will create new ticket soon :)

Original comment by Alexey.Chebotar@gmail.com on 10 Mar 2009 at 11:52

GoogleCodeExporter commented 9 years ago
So, Ruby 1.9.1 now supported. Can you run al-admin via WEBrick? :)

On my project:
=> Booting WEBrick
=> Rails 2.3.1 application starting on http://0.0.0.0:3000
/usr/lib/ruby/gems/1.9.1/gems/rbus-0.2.0/lib/rbus/etc/blankslate.rb:29: warning:
undefining `object_id' may cause serious problem
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2009-03-16 11:06:15] INFO  WEBrick 1.3.1
[2009-03-16 11:06:15] INFO  ruby 1.9.1 (2009-01-30) [i686-linux]
[2009-03-16 11:06:15] WARN  TCPServer Error: Address already in use - bind(2)
[2009-03-16 11:06:15] INFO  WEBrick::HTTPServer#start: pid=6696 port=3000

Processing LoginsController#new (for ::ffff:192.168.2.1 at 2009-03-16 11:07:12) 
[GET]
Reconnect to server failed: Local error
Reconnect to server failed backtrace:
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/adapter/ldap_ext.rb:80
:in
`assert_error_code'
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/adapter/ldap.rb:181:in
`rescue in execute'
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/adapter/ldap.rb:177:in
`execute'
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/adapter/ldap.rb:237:in
`block in sasl_bind'
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/adapter/base.rb:334:in
`block in sasl_bind'
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/adapter/base.rb:332:in
 `each'
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/adapter/base.rb:332:in
`sasl_bind'
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/adapter/ldap.rb:225:in
`sasl_bind'
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/adapter/base.rb:83:in 
`bind'
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/adapter/ldap.rb:70:in 
`bind'
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/adapter/base.rb:53:in 
`connect'
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/adapter/ldap.rb:54:in 
`connect'
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/adapter/base.rb:570:in
`block in reconnect'
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/adapter/base.rb:557:in
 `loop'
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/adapter/base.rb:557:in
`reconnect'
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/adapter/base.rb:590:in
`reconnect_if_need'
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/adapter/base.rb:263:in
`operation'
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/adapter/base.rb:164:in
 `search'
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/adapter/ldap.rb:83:in 
`search'
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/operations.rb:65:in 
`search'
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/operations.rb:238:in
`find_every'
/root/onm/vendor/plugins/activeldap-trunk/lib/active_ldap/operations.rb:209:in 
`find'
/root/onm/app/controllers/application_controller.rb:32:in `menu_data'
...

Original comment by Alexey.Chebotar@gmail.com on 16 Mar 2009 at 10:29

GoogleCodeExporter commented 9 years ago
AL-Admin is worked on my environment. :-)

I need to put https.rb into lib/net/ with the following content:

  require 'net/http'

net/https is removed from Ruby 1.9.1 but ActiveResource uses it.

Original comment by kou...@gmail.com on 17 Mar 2009 at 2:22

GoogleCodeExporter commented 9 years ago
Sorry. "net/https" isn't my misunderstand. Please ignore it.

Original comment by kou...@gmail.com on 17 Mar 2009 at 2:28

GoogleCodeExporter commented 9 years ago
Oops... "net/https" *is* my misunderstand.

Original comment by kou...@gmail.com on 17 Mar 2009 at 2:28

GoogleCodeExporter commented 9 years ago
That's great. I will try run my environment :)

Original comment by Alexey.Chebotar@gmail.com on 17 Mar 2009 at 2:35

GoogleCodeExporter commented 9 years ago
Issue 23 has been merged into this issue.

Original comment by Alexey.Chebotar@gmail.com on 23 Mar 2009 at 9:16