Closed Empact closed 15 years ago
With rails 2.3.2 and ROXML 2.5.3, this doesn't seem to be an issue anymore
I still see deprecation issues with 2.5.3 and rails 2.3.4
mvargo@mvargo-lt:~/workspace/cms$ script/console Loading development environment (Rails 2.3.4)
require 'onix' TypeError: {:to_h=>:to_hash} is not a symbol from /usr/lib/ruby/gems/1.8/gems/deprecated-2.0.1/lib/deprecated.rb:176:in
instance_method' from /usr/lib/ruby/gems/1.8/gems/deprecated-2.0.1/lib/deprecated.rb:176:in
deprecate' from /usr/lib/ruby/gems/1.8/gems/roxml-2.5.3/lib/roxml/extensions/array/conversions.rb:26 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
require' from /home/mvargo/workspace/cms/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:inrequire' from /home/mvargo/workspace/cms/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in
new_constants_in' from /home/mvargo/workspace/cms/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:inrequire' from /usr/lib/ruby/gems/1.8/gems/roxml-2.5.3/lib/roxml/extensions/array.rb:9 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' from /home/mvargo/workspace/cms/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in
require' from /home/mvargo/workspace/cms/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:innew_constants_in' from /home/mvargo/workspace/cms/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in
require' from /usr/lib/ruby/gems/1.8/gems/roxml-2.5.3/lib/roxml/extensions.rb:5 from /usr/lib/ruby/gems/1.8/gems/roxml-2.5.3/lib/roxml/extensions.rb:4:ineach' ... 5 levels... from /home/mvargo/workspace/cms/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in
require' from /usr/lib/ruby/gems/1.8/gems/roxml-2.5.3/lib/roxml.rb:7 from /usr/lib/ruby/gems/1.8/gems/roxml-2.5.3/lib/roxml.rb:6:ineach' from /usr/lib/ruby/gems/1.8/gems/roxml-2.5.3/lib/roxml.rb:6 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' from /home/mvargo/workspace/cms/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in
require' from /home/mvargo/workspace/cms/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:innew_constants_in' from /home/mvargo/workspace/cms/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in
require' from /usr/lib/ruby/gems/1.8/gems/onix-0.7.7/lib/onix.rb:12 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:ingem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in
require' from /home/mvargo/workspace/cms/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:inrequire' from /home/mvargo/workspace/cms/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in
new_constants_in' from /home/mvargo/workspace/cms/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require' from (irb):1>>
I've posted 3.1, which doesn't use the ActiveSupport deprecation api at all. Let me know if the problem remains.
Switch that: reopen if it's still a problem.
Hi,
Got the new code and I can load it up successfully from my rails 2.3.4 env.
class Foo include ROXML xml_accessor :foo_name, :from => "FooName" end => [#<ROXML::Definition:0x7f93bd2de648 @blocks=[], @type=:text, @required=nil, @attr_name="foo_name", @array=false, @namespace=nil, @cdata=nil, @frozen=nil, @accessor="foo_name", @name_explicit=true, @default=nil, @name="FooName", @wrapper=nil, @to_xml=nil>] foo = Foo.new => #Foo:0x7f93bd2daea8 foo.foo_name = "Buddy" => "Buddy" foo.to_xml =>
Buddy
Now I just have to figure out how to bolt it up to the ONIX gem.
Reported by James Healy:
On an unrelated note, I'm seeing an odd interation with ROXML 2.5.1 and rails 2.3.1. I've got a test branch where I'm trying out my app on rails 2.3.1, and mongrel is refusing to boot since I started using 2.5.1. Everything still works as expected with rails 2.2.2.
=> Booting Mongrel => Rails 2.3.1 application starting on http://0.0.0.0:3000 /var/lib/gems/1.8/gems/roxml-2.5.1/lib/roxml/definition.rb:48:in
try': undefined method
xml_name_without_deprecation?' for :text:Symbol (NoMethodError) from /var/lib/gems/1.8/gems/roxml-2.5.1/lib/roxml/definition.rb:48:ininitialize' from /var/lib/gems/1.8/gems/roxml-2.5.1/lib/roxml.rb:445:in
new' from /var/lib/gems/1.8/gems/roxml-2.5.1/lib/roxml.rb:445:inxml_attr' from /var/lib/gems/1.8/gems/roxml-2.5.1/lib/roxml.rb:474:in
xml_accessor' from /var/lib/gems/1.8/gems/onix-0.5.1/lib/onix/sender_identifier.rb:7 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
require' from /var/lib/gems/1.8/gems/activesupport-2.3.1/lib/active_support/dependencies.rb:156:inrequire' from /var/lib/gems/1.8/gems/activesupport-2.3.1/lib/active_support/dependencies.rb:521:in
new_constants_in' from /var/lib/gems/1.8/gems/activesupport-2.3.1/lib/active_support/dependencies.rb:156:inrequire' from /var/lib/gems/1.8/gems/onix-0.5.1/lib/onix.rb:65 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire' from /var/lib/gems/1.8/gems/activesupport-2.3.1/lib/active_support/dependencies.rb:156:in
require' from /var/lib/gems/1.8/gems/activesupport-2.3.1/lib/active_support/dependencies.rb:521:innew_constants_in' from /var/lib/gems/1.8/gems/activesupport-2.3.1/lib/active_support/dependencies.rb:156:in
require' from /var/lib/gems/1.8/gems/rails-2.3.1/lib/rails/gem_dependency.rb:96:inload' from /var/lib/gems/1.8/gems/rails-2.3.1/lib/initializer.rb:304:in
load_gems' from /var/lib/gems/1.8/gems/rails-2.3.1/lib/initializer.rb:304:ineach' from /var/lib/gems/1.8/gems/rails-2.3.1/lib/initializer.rb:304:in
load_gems' from /var/lib/gems/1.8/gems/rails-2.3.1/lib/initializer.rb:162:inprocess' from /var/lib/gems/1.8/gems/rails-2.3.1/lib/initializer.rb:113:in
send' from /var/lib/gems/1.8/gems/rails-2.3.1/lib/initializer.rb:113:inrun' from /home/jh/git/rba_staff_site/config/environment.rb:13 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire' from /var/lib/gems/1.8/gems/activesupport-2.3.1/lib/active_support/dependencies.rb:156:in
require' from /var/lib/gems/1.8/gems/activesupport-2.3.1/lib/active_support/dependencies.rb:521:innew_constants_in' from /var/lib/gems/1.8/gems/activesupport-2.3.1/lib/active_support/dependencies.rb:156:in
require' from /var/lib/gems/1.8/gems/rails-2.3.1/lib/commands/server.rb:84 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
require' from ./script/server:3