deplate 0.8.3 and rubygems

Deplate
2008-07-20
2013-04-17
  • Andrea Fazzi
    Andrea Fazzi
    2008-07-20

    Hi,

    there is some problem when requiring deplate 0.8.3 gem:

    irb(main):001:0> require 'rubygems'
    => true
    irb(main):002:0> require 'deplate'
    LoadError: no such file to load -- deplate/formatter
        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
        from /usr/lib/ruby/gems/1.8/gems/deplate-0.8.3/lib/deplate/template.rb:19
        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from /usr/lib/ruby/gems/1.8/gems/deplate-0.8.3/lib/deplate.rb:26
        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
        from (irb):2
    irb(main):003:0>

    Bye.
    Andrea

     
    • Andrea Fazzi
      Andrea Fazzi
      2008-07-20

      I'm using rubygems version 1.2.0

      Bye.
      Andrea

       
    • Tom Link
      Tom Link
      2008-07-20

      I uploaded a newly packaged version that looks good to me (but the original one did too):
      http://deplate.sourceforge.net/deplate-testing.gem

      I still use rubygems 1.1.1 though.

      > from /usr/lib/ruby/gems/1.8/gems/deplate-0.8.3/lib/deplate/template.rb:19

      That is:

      > require 'deplate/formatter'

      I don't quite see what's wrong with that. (The file exists on your disk?)

      You could try these commands to check for additional information:

      $ ruby --debug -e "require 'deplate'; require 'deplate/formatter'"
      $ ruby --debug -e "module Deplate; end; require 'deplate/formatter'"

      Otherwise ...?

      Do you have GEM_HOME, GEM_PATH set?

       
      • Andrea Fazzi
        Andrea Fazzi
        2008-07-20

        I think the problem is related to rubygems 1.2.0:

        andrea@andrea-laptop:~$ ruby --debug -e "require 'rubygems'; require 'deplate'"
        Exception `LoadError' at /usr/local/lib/site_ruby/1.8/rubygems.rb:772 - no such file to load -- rubygems/defaults/operating_system
        Exception `LoadError' at /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27 - no such file to load -- deplate
        /usr/lib/ruby/gems/1.8/gems/deplate-0.8.3/lib/deplate/input.rb:556: warning: `&' interpreted as argument prefix
        /usr/lib/ruby/gems/1.8/gems/deplate-0.8.3/lib/deplate/particles.rb:322: warning: `&' interpreted as argument prefix
        Exception `LoadError' at /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27 - no such file to load -- deplate/formatter
        Exception `LoadError' at /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32 - no such file to load -- deplate/formatter
        Exception `LoadError' at /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:34 - no such file to load -- deplate/formatter
        /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require': no such file to load -- deplate/formatter (LoadError)
            from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
            from /usr/lib/ruby/gems/1.8/gems/deplate-0.8.3/lib/deplate/template.rb:19
            from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
            from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
            from /usr/lib/ruby/gems/1.8/gems/deplate-0.8.3/lib/deplate.rb:26
            from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
            from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
            from -e:1

        With rubygems 1.1.1 all seems ok.

        Bye.
        Andrea

         
        • Andrea Fazzi
          Andrea Fazzi
          2008-07-20

          No, the problem is not related with rubygems 1.2.0 but with the file permission I have on formatter.rb (read only by root).
          This sounds strange because I installed rubygems and deplate from scratch on a VirtualBox machine with Xubuntu 8.04 without making any file permission changes on it ...

          Andrea

           
          • Andrea Fazzi
            Andrea Fazzi
            2008-07-20

            Ok, I can reproduce and fix the problem in this way:

            1. Remove all versions of deplate

            sudo gem uninstall deplate

            2. Install the last version of deplate

            sudo gem install deplate

            3. Throw the error

            andrea@ganimoide:~$ irb
            irb(main):001:0> require 'rubygems'
            => true
            irb(main):002:0> require 'deplate'
            LoadError: no such file to load -- deplate/formatter
                    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
                    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
                    from /usr/lib/ruby/gems/1.8/gems/deplate-0.8.3/lib/deplate/template.rb:19
                    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
                    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
                    from /usr/lib/ruby/gems/1.8/gems/deplate-0.8.3/lib/deplate.rb:26
                    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
                    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
                    from (irb):2

            4. Enter in deplate lib directory and check formatter.rb permissions

            cd /usr/lib/ruby/gems/1.8/gems/deplate-0.8.3/lib/deplate/
            ls -l formatter.rb

            -rw------- 1 root root 57741 2008-07-20 16:23 formatter.rb

            5. Change formatter.rb permissions

            sudo chmod a+r formatter.rb

            6. Test if the problem has been fixed

            andrea@ganimoide:~$ irb
            irb(main):001:0> require 'rubygems'
            => true
            irb(main):002:0> require 'deplate'
            => true

            So, I think there is some problem in formatter.rb's permissions packaged in the gem.

            Bye.
            Andrea

             
          • Tom Link
            Tom Link
            2008-07-20

            May I ask you if you could give http://deplate.sourceforge.net/deplate-testing.gem a try.

            The permission of formatter.rb was actually wrong. On cygwin/windows, rubygems installed in with the right permissions though.

             
            • Andrea Fazzi
              Andrea Fazzi
              2008-07-20

              Hi Thomas,

              deplate-testing.gem works.

              Thank you.
              Andrea

               
              • Tom Link
                Tom Link
                2008-07-20

                Many thanks.