Ah, that's way :) My bad, thank you.

2013/4/6 Roberto De Ioris <[email protected]>

>
> > Hi,
> > today we upgrade uWSGI on our development server to 1.9.5 version. Since
> > that, none of Ruby on Rails applications running on Ruby 2.0.0-p0 works.
> I
> > create a blank Rails 3.2.13 application and it works without any problems
> > with Ruby 1.9.3, but on 2.0.0 uWSGI can't even run a application because
> > have some problems with `json` Gem.
> >
> >
> > There's a output from RoR app running 1.9.3:
> >
> > $ rvm current
> > ruby-1.9.3-p392
> >
> > $ gem list
> >
> > *** LOCAL GEMS ***
> >
> > actionmailer (3.2.13)
> > actionpack (3.2.13)
> > activemodel (3.2.13)
> > activerecord (3.2.13)
> > activeresource (3.2.13)
> > activesupport (3.2.13)
> > arel (3.0.2)
> > builder (3.0.4)
> > bundler (1.3.5)
> > coffee-rails (3.2.2)
> > coffee-script (2.2.0)
> > coffee-script-source (1.6.2)
> > erubis (2.7.0)
> > execjs (1.4.0)
> > hike (1.2.1)
> > i18n (0.6.1)
> > journey (1.0.4)
> > jquery-rails (2.2.1)
> > json (1.7.7)
> > libv8 (3.11.8.17 x86_64-linux)
> > mail (2.5.3)
> > mime-types (1.22)
> > multi_json (1.7.2)
> > mysql (2.9.1)
> > mysql2 (0.3.11)
> > polyglot (0.3.3)
> > rack (1.4.5)
> > rack-cache (1.2)
> > rack-ssl (1.3.3)
> > rack-test (0.6.2)
> > rails (3.2.13)
> > railties (3.2.13)
> > rake (10.0.4)
> > rdoc (3.12.2)
> > ref (1.0.4)
> > rubygems-bundler (1.1.1)
> > rvm (1.11.3.7)
> > sass (3.2.7)
> > sass-rails (3.2.6)
> > sprockets (2.2.2)
> > therubyracer (0.11.4)
> > thor (0.18.1)
> > tilt (1.3.6)
> > treetop (1.4.12)
> > tzinfo (0.3.37)
> > uglifier (2.0.0)
> >
> > $ uwsgi --rack config.ru -s 127.0.0.1:3031 --master
> > *** Starting uWSGI 1.9.5 (64bit) on [Sat Apr  6 17:49:43 2013] ***
> > compiled with version: 4.6.3 on 06 April 2013 15:58:40
> > os: Linux-3.2.13-grsec-xxxx-grs-ipv6-64 #1 SMP Thu Mar 29 09:48:59 UTC
> > 2012
> > nodename: ThePretender
> > machine: x86_64
> > clock source: unix
> > pcre jit disabled
> > detected number of CPU cores: 4
> > current working directory:
> > /srv/users/galmido/applications/main/application
> > detected binary path: /usr/local/bin/uwsgi
> > your processes number limit is 15841
> > your memory page size is 4096 bytes
> > detected max file descriptor number: 1024
> > lock engine: pthread robust mutexes
> > uwsgi socket 0 bound to TCP address 127.0.0.1:3031 fd 3
> > ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
> > your server socket listen backlog is limited to 100 connections
> > your mercy for graceful operations on workers is 60 seconds
> > mapped 161744 bytes (157 KB) for 1 cores
> > *** Operational MODE: single process ***
> > RACK app 0 loaded in 5 seconds at 0x1750 (GC frequency: AGGRESSIVE)
> > *** uWSGI is running in multiple interpreter mode ***
> > spawned uWSGI master process (pid: 27160)
> > spawned uWSGI worker 1 (pid: 27164, cores: 1)
> >
> >
> > And from 2.0.0-p0:
> >
> > $ rvm current
> > ruby-2.0.0-p0@main
> > $ gem list
> > *** LOCAL GEMS ***
> >
> > actionmailer (3.2.9.rc2)
> > actionpack (3.2.9.rc2)
> > activemodel (3.2.9.rc2)
> > activerecord (3.2.9.rc2)
> > activeresource (3.2.9.rc2)
> > activesupport (3.2.9.rc2)
> > arel (3.0.2)
> > bcrypt-ruby (3.0.1)
> > better_errors (0.7.2)
> > binding_of_caller (0.7.1)
> > bootstrap-sass (2.3.1.0)
> > builder (3.0.4)
> > bundler (1.3.4)
> > cancan (1.6.9)
> > capybara (2.0.2)
> > childprocess (0.3.9)
> > chunky_png (1.2.7)
> > climate_control (0.0.3)
> > closure_tree (3.10.1)
> > cocaine (0.5.1)
> > coderay (1.0.9)
> > coffee-rails (3.2.2)
> > coffee-script (2.2.0)
> > coffee-script-source (1.6.2)
> > compass (0.12.2)
> > compass-rails (1.0.3)
> > cucumber (1.2.3)
> > cucumber-rails (1.3.1)
> > database_cleaner (0.9.1)
> > debug_inspector (0.0.2)
> > devise (2.2.3)
> > diff-lcs (1.2.1)
> > erubis (2.7.0)
> > execjs (1.4.0)
> > ffi (1.5.0)
> > font-awesome-sass-rails (3.0.2.2)
> > foreigner (1.4.0)
> > fssm (0.2.10)
> > gherkin (2.11.6)
> > haml (4.0.1)
> > hike (1.2.1)
> > i18n (0.6.4)
> > journey (1.0.4)
> > jquery-fileupload-rails (0.4.1)
> > jquery-rails (2.2.1)
> > jquery-ui-rails (4.0.2)
> > json (1.7.7, 1.7.6)
> > kaminari (0.14.1)
> > libv8 (3.11.8.17 x86_64-linux, 3.3.10.4 x86_64-linux)
> > mail (2.4.4)
> > mail_form (1.4.1)
> > meta_request (0.2.2)
> > mime-types (1.22, 1.21)
> > multi_json (1.7.2)
> > mysql2 (0.3.11)
> > nokogiri (1.5.9)
> > orm_adapter (0.4.0)
> > paperclip (3.4.1)
> > polyamorous (0.5.0)
> > polyglot (0.3.3)
> > rabl (0.8.0)
> > rack (1.4.5)
> > rack-cache (1.2)
> > rack-contrib (1.1.0)
> > rack-ssl (1.3.3)
> > rack-test (0.6.2)
> > rails (3.2.9.rc2)
> > railties (3.2.9.rc2)
> > rake (10.0.4, 10.0.3)
> > rdoc (3.12.2)
> > redcarpet (2.2.2)
> > ref (1.0.4)
> > rubygems-bundler (1.1.1)
> > rubyzip (0.9.9)
> > rvm (1.11.3.6)
> > sass (3.2.7)
> > sass-rails (3.2.6)
> > selenium-webdriver (2.31.0)
> > sprockets (2.9.0)
> > squeel (1.0.18)
> > therubyracer (0.11.4, 0.10.2)
> > thor (0.18.1, 0.17.0)
> > tilt (1.3.6)
> > treetop (1.4.12)
> > tzinfo (0.3.37)
> > uglifier (1.3.0)
> > warden (1.2.1)
> > websocket (1.0.7)
> > with_advisory_lock (0.0.6)
> > xpath (1.0.0)
> >
> > $ uwsgi --rack config.ru -s 127.0.0.1:3031 --master
> > *** Starting uWSGI 1.9.5 (64bit) on [Sat Apr  6 17:53:20 2013] ***
> > compiled with version: 4.6.3 on 06 April 2013 15:58:40
> > os: Linux-3.2.13-grsec-xxxx-grs-ipv6-64 #1 SMP Thu Mar 29 09:48:59 UTC
> > 2012
> > nodename: ThePretender
> > machine: x86_64
> > clock source: unix
> > pcre jit disabled
> > detected number of CPU cores: 4
> > current working directory:
> > /srv/users/galmido/applications/main/application
> > detected binary path: /usr/local/bin/uwsgi
> > your processes number limit is 15841
> > your memory page size is 4096 bytes
> > detected max file descriptor number: 1024
> > lock engine: pthread robust mutexes
> > uwsgi socket 0 bound to TCP address 127.0.0.1:3031 fd 3
> > ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
> > your server socket listen backlog is limited to 100 connections
> > your mercy for graceful operations on workers is 60 seconds
> > mapped 161744 bytes (157 KB) for 1 cores
> > *** Operational MODE: single process ***
> > /home/galmido/.rvm/gems/ruby-2.0.0-p0@main
> /gems/json-1.7.7/lib/json/common.rb:67:in
> > `initialize': can't convert nil into Hash (TypeError)
> > from
> > /home/galmido/.rvm/gems/ruby-2.0.0-p0@main
> /gems/json-1.7.7/lib/json/common.rb:67:in
> > `new'
> >  from
> > /home/galmido/.rvm/gems/ruby-2.0.0-p0@main
> /gems/json-1.7.7/lib/json/common.rb:67:in
> > `generator='
> > from
> > /home/galmido/.rvm/gems/ruby-2.0.0-p0@main
> /gems/json-1.7.7/lib/json/ext.rb:17:in
> > `<module:Ext>'
> >  from
> > /home/galmido/.rvm/gems/ruby-2.0.0-p0@main
> /gems/json-1.7.7/lib/json/ext.rb:12:in
> > `<module:JSON>'
> > from
> > /home/galmido/.rvm/gems/ruby-2.0.0-p0@main
> /gems/json-1.7.7/lib/json/ext.rb:9:in
> > `<top (required)>'
> >  from
> > /home/galmido/.rvm/gems/ruby-2.0.0-p0@main
> /gems/json-1.7.7/lib/json.rb:58:in
> > `require'
> > from
> > /home/galmido/.rvm/gems/ruby-2.0.0-p0@main
> /gems/json-1.7.7/lib/json.rb:58:in
> > `<module:JSON>'
> >  from
> > /home/galmido/.rvm/gems/ruby-2.0.0-p0@main
> /gems/json-1.7.7/lib/json.rb:54:in
> > `<top (required)>'
> > from
> > /home/galmido/.rvm/gems/ruby-2.0.0-p0@global
> /gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in
> > `require'
> >  from
> > /home/galmido/.rvm/gems/ruby-2.0.0-p0@global
> /gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in
> > `block (2 levels) in require'
> > from
> > /home/galmido/.rvm/gems/ruby-2.0.0-p0@global
> /gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in
> > `each'
> >  from
> > /home/galmido/.rvm/gems/ruby-2.0.0-p0@global
> /gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in
> > `block in require'
> > from
> > /home/galmido/.rvm/gems/ruby-2.0.0-p0@global
> /gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in
> > `each'
> >  from
> > /home/galmido/.rvm/gems/ruby-2.0.0-p0@global
> /gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in
> > `require'
> > from
> > /home/galmido/.rvm/gems/ruby-2.0.0-p0@global
> /gems/bundler-1.3.4/lib/bundler.rb:132:in
> > `require'
> >  from
> >
> /srv/users/galmido/applications/main/application/config/application.rb:7:in
> > `<top (required)>'
> > from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
> >  from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
> > from
> >
> /srv/users/galmido/applications/main/application/config/environment.rb:2:in
> > `<top (required)>'
> >  from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
> > from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
> >  from config.ru:3:in `block in <main>'
> > from
> > /home/galmido/.rvm/gems/ruby-2.0.0-p0@main
> /gems/rack-1.4.5/lib/rack/builder.rb:51:in
> > `instance_eval'
> >  from
> > /home/galmido/.rvm/gems/ruby-2.0.0-p0@main
> /gems/rack-1.4.5/lib/rack/builder.rb:51:in
> > `initialize'
> > from config.ru:in `new'
> >  from config.ru:in `<main>'
> > from
> > /home/galmido/.rvm/gems/ruby-2.0.0-p0@main
> /gems/rack-1.4.5/lib/rack/builder.rb:40:in
> > `eval'
> >  from
> > /home/galmido/.rvm/gems/ruby-2.0.0-p0@main
> /gems/rack-1.4.5/lib/rack/builder.rb:40:in
> > `parse_file'
> >
> >
> > I struggling with this all day long and don't have any idea what is
> wrong.
> >
>
> You have to link uWSGI with the specific ruby version (or make a plugin
> for each ruby version). In the second example uWSGI has loaded ruby 1.9.3
> and then it tries to use 2.0 library.
>
> You can rebuild uWSGI specifying ruby 2.0:
>
> UWSGICONFIG_RUBYPATH=path/bin/ruby2.0 python uwsgiconfig.py --build rack
>
> or directly install uwsgi in the gemset via gem install/bundler
>
>
> --
> Roberto De Ioris
> http://unbit.it
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to