David A.
2011-Sep-21 21:10 UTC
rubyzip with Ruby 1.9.2 and Rails 3.1 - require ''zip/zip'' fails
I''m trying to move my application from Rails 2.3.5 to Rails 3.1 which is a challenge. In my application, require ''zip/zip'' fails with ''no such file to load -- zip/zip gem list --local shows rubyzip (0.9.4) I see zip.rb in d:\ruby192\lib\ruby\gems\1.9.1\gems\rubyzip-0.9.4\lib\zip\ -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Walter Lee Davis
2011-Sep-22 12:14 UTC
Re: rubyzip with Ruby 1.9.2 and Rails 3.1 - require ''zip/zip'' fails
On Sep 21, 2011, at 5:10 PM, David A. wrote:> I''m trying to move my application from Rails 2.3.5 to Rails 3.1 which is > a challenge. > > In my application, > require ''zip/zip'' > fails with ''no such file to load -- zip/zipTake this require out of wherever you''re putting it now, and put this line in Gemfile: gem ''rubyzip'', :require => ''zip/zip'' Walter> > gem list --local > shows > rubyzip (0.9.4) > > I see zip.rb in > d:\ruby192\lib\ruby\gems\1.9.1\gems\rubyzip-0.9.4\lib\zip\ > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Luis M
2011-Sep-22 14:05 UTC
Re: rubyzip with Ruby 1.9.2 and Rails 3.1 - require ''zip/zip'' fails
cat Gemfile -- A bug magnet El Sep 21, 2011, a las 17:10, "David A." <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> escribió:> I''m trying to move my application from Rails 2.3.5 to Rails 3.1 which is > a challenge. > > In my application, > require ''zip/zip'' > fails with ''no such file to load -- zip/zip > > gem list --local > shows > rubyzip (0.9.4) > > I see zip.rb in > d:\ruby192\lib\ruby\gems\1.9.1\gems\rubyzip-0.9.4\lib\zip\ > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
David A.
2011-Sep-22 17:26 UTC
Re: rubyzip with Ruby 1.9.2 and Rails 3.1 - require ''zip/zip'' fails
Walter Davis wrote in post #1023269:> On Sep 21, 2011, at 5:10 PM, David A. wrote: > >> I''m trying to move my application from Rails 2.3.5 to Rails 3.1 which is >> a challenge. >> >> In my application, >> require ''zip/zip'' >> fails with ''no such file to load -- zip/zip > > Take this require out of wherever you''re putting it now, and put this > line in Gemfile: > > gem ''rubyzip'', :require => ''zip/zip'' > > WalterThank you so much for your help - this did it. Is there any documentation on why this is needed and the regular require in the controller doesn''t work? What if I wanted to run this just as a Ruby app? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Walter Lee Davis
2011-Sep-22 21:09 UTC
Re: Re: rubyzip with Ruby 1.9.2 and Rails 3.1 - require ''zip/zip'' fails
On Sep 22, 2011, at 1:26 PM, David A. wrote:> Walter Davis wrote in post #1023269: >> On Sep 21, 2011, at 5:10 PM, David A. wrote: >> >>> I''m trying to move my application from Rails 2.3.5 to Rails 3.1 which is >>> a challenge. >>> >>> In my application, >>> require ''zip/zip'' >>> fails with ''no such file to load -- zip/zip >> >> Take this require out of wherever you''re putting it now, and put this >> line in Gemfile: >> >> gem ''rubyzip'', :require => ''zip/zip'' >> >> Walter > > Thank you so much for your help - this did it. > > Is there any documentation on why this is needed and the regular require > in the controller doesn''t work? What if I wanted to run this just as a > Ruby app? >If you''re not running in a bundler environment, then certainly you can simply do this: require ''rubygems'' require ''zip/zip'' and you''ll be good to go. But inside an application that is running bundler, I have found that it''s much better to stay with one approach -- do it the bundler way -- and let it sort out the dependencies and load order and everything else. Fewer moving parts that way. Walter -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.