Hi I''m trying to unpack hpricot to my vendor/gems direcotry. i have config.gem "hpricot" in my environment.rb file but when i run "rake gems:unpack" it dosn''t do anything. Is there any special mesures thats needs to be done. I running Vista with rails 2.2.2 and have hpricot gem (0.6.164). I''ve successfully unpacked several other gems with this method. Any suggestions would be very welcome Thanks /Mikael -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I found some suggestion online to do a manual unpack through the gem command in the vendor/gem directory instead "gem unpack hpricot". However when i start the server it errors out because it doesn''t seem to be able to handle the gem naming conventions on win32 c:/prog/rubyl/lib/ruby/site_ruby/1.8/rubygems/version.rb:53:in `initialize'': Malformed version number string mswin32 (ArgumentError) from c:/prog/rubyl/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/vendor_gem_source_index.rb:105:in `new'' from c:/prog/rubyl/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/vendor_gem_source_index.rb:105:in `version_for_dir'' from c:/prog/rubyl/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/vendor_gem_source_index.rb:47:in `refresh!'' .... When i look at the code it seems to be parsing for the version number of the gem "hpricot-0.6.164-x86-mswin32" Is this an known issue ? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I found a workaround sort of. I changed the regexp in the vendor_gem_source_index.rb from def version_for_dir(d) matches = /-([^-]+)$/.match(d) matches.to_a.each { | x | puts "Match {#{x}}" } Gem::Version.new(matches[1]) if matches end to def version_for_dir(d) matches = /-(\d+\.\d+\.\d+)/.match(d) matches.to_a.each { | x | puts "Match {#{x}}" } Gem::Version.new(matches[1]) if matches end Seems to load the gems fine now. However having very limited skill in crafting regexp I don''t know if this will work in all cases so if anyone have a better one i''m all ears :) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I have the exact same problem. It does not only appear with hpricot, but with all gems containing "mswin32" in the version string. is there an "official" fix for this? Cheers, Matthias On 1 Jan., 22:03, Mikael Rudberg <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I found a workaround sort of. I changed the regexp in the > vendor_gem_source_index.rb > > from > def version_for_dir(d) > matches = /-([^-]+)$/.match(d) > matches.to_a.each { | x | puts "Match {#{x}}" } > Gem::Version.new(matches[1]) if matches > end > > to > def version_for_dir(d) > matches = /-(\d+\.\d+\.\d+)/.match(d) > matches.to_a.each { | x | puts "Match {#{x}}" } > Gem::Version.new(matches[1]) if matches > end > > Seems to load the gems fine now. However having very limited skill in > crafting regexp I don''t know if this will work in all cases so if anyone > have a better one i''m all ears :) > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---