Net::ftp error from libffi.rb in omnibus-software


#1

I’m trying to build a package using omnibus-ruby on my osx mavericks
laptop. The package uses the ruby and rubygems recipes (are they called
recipes in omnibus?) from omnibus-software which pulls in libffi.rb.
libffi is trying to download a tarball via ftp and I’m getting a net::ftp
error. I’ve tried adding a “require ‘net/ftp’” to the git_fetcher.rb in
omnibus-ruby, but that doesn’t help.
Any thoughts on how I can fix this error?

Full error is here: https://gist.github.com/albertsj1/af22659753599dffe367

Thanks


John Alberts


#2

On Friday, July 11, 2014 at 10:49 AM, John Alberts wrote:

I’m trying to build a package using omnibus-ruby on my osx mavericks laptop. The package uses the ruby and rubygems recipes (are they called recipes in omnibus?) from omnibus-software which pulls in libffi.rb. libffi is trying to download a tarball via ftp and I’m getting a net::ftp error. I’ve tried adding a “require ‘net/ftp’” to the git_fetcher.rb in omnibus-ruby, but that doesn’t help.
Any thoughts on how I can fix this error?

Full error is here: https://gist.github.com/albertsj1/af22659753599dffe367

Thanks


John Alberts

net/ftp is part of the ruby stdlib, so it seems your ruby installation is busted (or you have something very wrong with your load path). Find your ruby stdlib dir (something like gem which forwardable should get you close) and check if net/ftp.rb is there.


Daniel DeLeo


#3

I’m pretty sure there’s nothing wrong with my ruby install. Works fine for
everything so far. I’m on osx Mavericks using rbenv installed ruby 1.9.3.
Did some basic checks, including your suggestion, and all seems well from
the command line. Even tried listing the specific file the libffi.rb
recipe is trying to retrieve. See below.

ᐅ which ruby
/Users/j.alberts/.rbenv/shims/ruby

ᐅ ruby -v
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin12.5.0]

ᐅ gem which forwardable
/Users/j.alberts/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/forwardable.rb

ᐅ ls /Users/j.alberts/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/net/ftp.rb
/Users/j.alberts/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/net/ftp.rb

ᐅ ruby -e “require ‘net/ftp’; ftp = Net::FTP.new(‘sourceware.org’);
ftp.login; ftp.chdir(‘pub/libffi’); puts ftp.ls(‘libffi-3.0.13.*’);
ftp.close”
-rw-r–r-- 1 ftp ftp 845747 Mar 17 2013 libffi-3.0.13.tar.gz

John

On Fri, Jul 11, 2014 at 11:03 AM, Daniel DeLeo dan@kallistec.com wrote:

On Friday, July 11, 2014 at 10:49 AM, John Alberts wrote:

I’m trying to build a package using omnibus-ruby on my osx mavericks
laptop. The package uses the ruby and rubygems recipes (are they called
recipes in omnibus?) from omnibus-software which pulls in libffi.rb. libffi
is trying to download a tarball via ftp and I’m getting a net::ftp error.
I’ve tried adding a “require ‘net/ftp’” to the git_fetcher.rb in
omnibus-ruby, but that doesn’t help.
Any thoughts on how I can fix this error?

Full error is here:
https://gist.github.com/albertsj1/af22659753599dffe367

Thanks


John Alberts

net/ftp is part of the ruby stdlib, so it seems your ruby installation is
busted (or you have something very wrong with your load path). Find your
ruby stdlib dir (something like gem which forwardable should get you
close) and check if net/ftp.rb is there.


Daniel DeLeo


John Alberts


#4

Should I be using a newer version of ruby with omnibus than 1.9.3?

On Fri, Jul 11, 2014 at 11:56 AM, John Alberts john.m.alberts@gmail.com
wrote:

I’m pretty sure there’s nothing wrong with my ruby install. Works fine
for everything so far. I’m on osx Mavericks using rbenv installed ruby
1.9.3. Did some basic checks, including your suggestion, and all seems
well from the command line. Even tried listing the specific file the
libffi.rb recipe is trying to retrieve. See below.

ᐅ which ruby
/Users/j.alberts/.rbenv/shims/ruby

ᐅ ruby -v
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin12.5.0]

ᐅ gem which forwardable
/Users/j.alberts/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/forwardable.rb

ᐅ ls /Users/j.alberts/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/net/ftp.rb
/Users/j.alberts/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/net/ftp.rb

ᐅ ruby -e “require ‘net/ftp’; ftp = Net::FTP.new(‘sourceware.org’);
ftp.login; ftp.chdir(‘pub/libffi’); puts ftp.ls(‘libffi-3.0.13.*’);
ftp.close”
-rw-r–r-- 1 ftp ftp 845747 Mar 17 2013 libffi-3.0.13.tar.gz

John

On Fri, Jul 11, 2014 at 11:03 AM, Daniel DeLeo dan@kallistec.com wrote:

On Friday, July 11, 2014 at 10:49 AM, John Alberts wrote:

I’m trying to build a package using omnibus-ruby on my osx mavericks
laptop. The package uses the ruby and rubygems recipes (are they called
recipes in omnibus?) from omnibus-software which pulls in libffi.rb. libffi
is trying to download a tarball via ftp and I’m getting a net::ftp error.
I’ve tried adding a “require ‘net/ftp’” to the git_fetcher.rb in
omnibus-ruby, but that doesn’t help.
Any thoughts on how I can fix this error?

Full error is here:
https://gist.github.com/albertsj1/af22659753599dffe367

Thanks


John Alberts

net/ftp is part of the ruby stdlib, so it seems your ruby installation is
busted (or you have something very wrong with your load path). Find your
ruby stdlib dir (something like gem which forwardable should get you
close) and check if net/ftp.rb is there.


Daniel DeLeo


John Alberts


John Alberts


#5

You shouldn’t need to. I don’t understand why you see this error, since net/ftp is required by omnibus/software which is definitely getting loaded, and your net/ftp seems to work outside of omnibus. You might try to debug it with puts statements in omnibus/software (run gem which omnibus/software to find it) and/or pry. Seems like require is “succeeding” without actually loading the files somehow?


Daniel DeLeo

On Friday, July 11, 2014 at 1:47 PM, John Alberts wrote:

Should I be using a newer version of ruby with omnibus than 1.9.3?

On Fri, Jul 11, 2014 at 11:56 AM, John Alberts <john.m.alberts@gmail.com (mailto:john.m.alberts@gmail.com)> wrote:

I’m pretty sure there’s nothing wrong with my ruby install. Works fine for everything so far. I’m on osx Mavericks using rbenv installed ruby 1.9.3. Did some basic checks, including your suggestion, and all seems well from the command line. Even tried listing the specific file the libffi.rb recipe is trying to retrieve. See below.

ᐅ which ruby
/Users/j.alberts/.rbenv/shims/ruby

ᐅ ruby -v
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin12.5.0]

ᐅ gem which forwardable
/Users/j.alberts/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/forwardable.rb

ᐅ ls /Users/j.alberts/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/net/ftp.rb
/Users/j.alberts/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/net/ftp.rb

ᐅ ruby -e “require ‘net/ftp’; ftp = Net::FTP.new(‘sourceware.org (http://sourceware.org)’); ftp.login; ftp.chdir(‘pub/libffi’); puts ftp.ls (http://ftp.ls)(‘libffi-3.0.13.*’); ftp.close”
-rw-r–r-- 1 ftp ftp 845747 Mar 17 2013 libffi-3.0.13.tar.gz

John

On Fri, Jul 11, 2014 at 11:03 AM, Daniel DeLeo <dan@kallistec.com (mailto:dan@kallistec.com)> wrote:

On Friday, July 11, 2014 at 10:49 AM, John Alberts wrote:

I’m trying to build a package using omnibus-ruby on my osx mavericks laptop. The package uses the ruby and rubygems recipes (are they called recipes in omnibus?) from omnibus-software which pulls in libffi.rb. libffi is trying to download a tarball via ftp and I’m getting a net::ftp error. I’ve tried adding a “require ‘net/ftp’” to the git_fetcher.rb in omnibus-ruby, but that doesn’t help.
Any thoughts on how I can fix this error?

Full error is here: https://gist.github.com/albertsj1/af22659753599dffe367

Thanks


John Alberts

net/ftp is part of the ruby stdlib, so it seems your ruby installation is busted (or you have something very wrong with your load path). Find your ruby stdlib dir (something like gem which forwardable should get you close) and check if net/ftp.rb is there.


Daniel DeLeo


John Alberts


John Alberts


#6

OSX upgrades and time machine restores seem to regularly wreck my
homebrew and ruby installs and i need to reinstall all my homebrew
stuff and often I find it best to install the latest ruby
(ruby-1.9.3-p547) and start over with a clean gemset.

On Fri Jul 11 13:54:31 2014, Daniel DeLeo wrote:

You shouldn’t need to. I don’t understand why you see this error, since net/ftp is required by omnibus/software which is definitely getting loaded, and your net/ftp seems to work outside of omnibus. You might try to debug it with puts statements in omnibus/software (run gem which omnibus/software to find it) and/or pry. Seems like require is “succeeding” without actually loading the files somehow?


Daniel DeLeo

On Friday, July 11, 2014 at 1:47 PM, John Alberts wrote:

Should I be using a newer version of ruby with omnibus than 1.9.3?

On Fri, Jul 11, 2014 at 11:56 AM, John Alberts <john.m.alberts@gmail.com (mailto:john.m.alberts@gmail.com)> wrote:

I’m pretty sure there’s nothing wrong with my ruby install. Works fine for everything so far. I’m on osx Mavericks using rbenv installed ruby 1.9.3. Did some basic checks, including your suggestion, and all seems well from the command line. Even tried listing the specific file the libffi.rb recipe is trying to retrieve. See below.

ᐅ which ruby
/Users/j.alberts/.rbenv/shims/ruby

ᐅ ruby -v
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin12.5.0]

ᐅ gem which forwardable
/Users/j.alberts/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/forwardable.rb

ᐅ ls /Users/j.alberts/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/net/ftp.rb
/Users/j.alberts/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/net/ftp.rb

ᐅ ruby -e “require ‘net/ftp’; ftp = Net::FTP.new(‘sourceware.org (http://sourceware.org)’); ftp.login; ftp.chdir(‘pub/libffi’); puts ftp.ls (http://ftp.ls)(‘libffi-3.0.13.*’); ftp.close”
-rw-r–r-- 1 ftp ftp 845747 Mar 17 2013 libffi-3.0.13.tar.gz

John

On Fri, Jul 11, 2014 at 11:03 AM, Daniel DeLeo <dan@kallistec.com (mailto:dan@kallistec.com)> wrote:

On Friday, July 11, 2014 at 10:49 AM, John Alberts wrote:

I’m trying to build a package using omnibus-ruby on my osx mavericks laptop. The package uses the ruby and rubygems recipes (are they called recipes in omnibus?) from omnibus-software which pulls in libffi.rb. libffi is trying to download a tarball via ftp and I’m getting a net::ftp error. I’ve tried adding a “require ‘net/ftp’” to the git_fetcher.rb in omnibus-ruby, but that doesn’t help.
Any thoughts on how I can fix this error?

Full error is here: https://gist.github.com/albertsj1/af22659753599dffe367

Thanks


John Alberts

net/ftp is part of the ruby stdlib, so it seems your ruby installation is busted (or you have something very wrong with your load path). Find your ruby stdlib dir (something like gem which forwardable should get you close) and check if net/ftp.rb is there.


Daniel DeLeo


John Alberts


John Alberts


#7

I did recently update to 10.9. Maybe that’s it. I’ll reinstall everything
and see if that helps.
On Jul 11, 2014 2:44 PM, “Lamont Granquist” lamont@opscode.com wrote:

OSX upgrades and time machine restores seem to regularly wreck my homebrew
and ruby installs and i need to reinstall all my homebrew stuff and often I
find it best to install the latest ruby (ruby-1.9.3-p547) and start over
with a clean gemset.

On Fri Jul 11 13:54:31 2014, Daniel DeLeo wrote:

You shouldn’t need to. I don’t understand why you see this error, since
net/ftp is required by omnibus/software which is definitely getting loaded,
and your net/ftp seems to work outside of omnibus. You might try to debug
it with puts statements in omnibus/software (run gem which omnibus/software to find it) and/or pry. Seems like require is
“succeeding” without actually loading the files somehow?


Daniel DeLeo

On Friday, July 11, 2014 at 1:47 PM, John Alberts wrote:

Should I be using a newer version of ruby with omnibus than 1.9.3?

On Fri, Jul 11, 2014 at 11:56 AM, John Alberts <john.m.alberts@gmail.com
(mailto:john.m.alberts@gmail.com)> wrote:

I’m pretty sure there’s nothing wrong with my ruby install. Works fine
for everything so far. I’m on osx Mavericks using rbenv installed ruby
1.9.3. Did some basic checks, including your suggestion, and all seems well
from the command line. Even tried listing the specific file the libffi.rb
recipe is trying to retrieve. See below.

ᐅ which ruby
/Users/j.alberts/.rbenv/shims/ruby

ᐅ ruby -v
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin12.5.0]

ᐅ gem which forwardable
/Users/j.alberts/.rbenv/versions/1.9.3-p448/lib/ruby/
1.9.1/forwardable.rb

ᐅ ls /Users/j.alberts/.rbenv/versions/1.9.3-p448/lib/ruby/
1.9.1/net/ftp.rb
/Users/j.alberts/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/net/ftp.rb

ᐅ ruby -e “require ‘net/ftp’; ftp = Net::FTP.new(‘sourceware.org (
http://sourceware.org)’); ftp.login; ftp.chdir(‘pub/libffi’); puts
ftp.ls (http://ftp.ls)(‘libffi-3.0.13.*’); ftp.close”
-rw-r–r-- 1 ftp ftp 845747 Mar 17 2013 libffi-3.0.13.tar.gz

John

On Fri, Jul 11, 2014 at 11:03 AM, Daniel DeLeo <dan@kallistec.com
(mailto:dan@kallistec.com)> wrote:

On Friday, July 11, 2014 at 10:49 AM, John Alberts wrote:

I’m trying to build a package using omnibus-ruby on my osx mavericks

laptop. The package uses the ruby and rubygems recipes (are they called
recipes in omnibus?) from omnibus-software which pulls in libffi.rb. libffi
is trying to download a tarball via ftp and I’m getting a net::ftp error.
I’ve tried adding a “require ‘net/ftp’” to the git_fetcher.rb in
omnibus-ruby, but that doesn’t help.
Any thoughts on how I can fix this error?

Full error is here: https://gist.github.com/
albertsj1/af22659753599dffe367

Thanks


John Alberts

net/ftp is part of the ruby stdlib, so it seems your ruby installation
is busted (or you have something very wrong with your load path). Find your
ruby stdlib dir (something like gem which forwardable should get you
close) and check if net/ftp.rb is there.


Daniel DeLeo


John Alberts


John Alberts


#8

I get the same thing on build lab hosts (both linux/windows) provisioned
with omnibus cookbook, when not using S3 caching. I don’t think it has
anything to do with Mac OSX.

Eric G. Wolfe
email: eric.wolfe@cyclecomputing.com
cell: 304.942.3970
twitter: @atomic_penguin

Cycle Computing
Leader in Utility HPC Software


twitter: @cyclecomputing

“Hello?” “Hi baybee” “Are you Johnie Ingram?” “For you I’ll be
anyone” “Ermm… Do you sell slink CD’s?” “I love slinkies”

On 07/11/2014 06:01 PM, John Alberts wrote:

I did recently update to 10.9. Maybe that’s it. I’ll reinstall
everything and see if that helps.

On Jul 11, 2014 2:44 PM, “Lamont Granquist” <lamont@opscode.com
mailto:lamont@opscode.com> wrote:

OSX upgrades and time machine restores seem to regularly wreck my
homebrew and ruby installs and i need to reinstall all my homebrew
stuff and often I find it best to install the latest ruby
(ruby-1.9.3-p547) and start over with a clean gemset.

On Fri Jul 11 13:54:31 2014, Daniel DeLeo wrote:

    You shouldn’t need to. I don’t understand why you see this
    error, since net/ftp is required by omnibus/software which is
    definitely getting loaded, and your net/ftp seems to work
    outside of omnibus. You might try to debug it with `puts`
    statements in omnibus/software (run `gem which
    omnibus/software` to find it) and/or pry. Seems like `require`
    is “succeeding” without actually loading the files somehow?

    --
    Daniel DeLeo


    On Friday, July 11, 2014 at 1:47 PM, John Alberts wrote:

        Should I be using a newer version of ruby with omnibus
        than 1.9.3?



        On Fri, Jul 11, 2014 at 11:56 AM, John Alberts
        <john.m.alberts@gmail.com
        <mailto:john.m.alberts@gmail.com>
        (mailto:john.m.alberts@gmail.com
        <mailto:john.m.alberts@gmail.com>)> wrote:

            I'm pretty sure there's nothing wrong with my ruby
            install. Works fine for everything so far. I'm on osx
            Mavericks using rbenv installed ruby 1.9.3. Did some
            basic checks, including your suggestion, and all seems
            well from the command line. Even tried listing the
            specific file the libffi.rb recipe is trying to
            retrieve. See below.

            ᐅ which ruby
            /Users/j.alberts/.rbenv/shims/ruby

            ᐅ ruby -v
            ruby 1.9.3p448 (2013-06-27 revision 41675)
            [x86_64-darwin12.5.0]

            ᐅ gem which forwardable
            /Users/j.alberts/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/forwardable.rb

            ᐅ ls
            /Users/j.alberts/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/net/ftp.rb
            /Users/j.alberts/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/net/ftp.rb

            ᐅ ruby -e "require 'net/ftp'; ftp =
            Net::FTP.new('sourceware.org <http://sourceware.org>
            (http://sourceware.org)'); ftp.login;
            ftp.chdir('pub/libffi'); puts ftp.ls <http://ftp.ls>
            (http://ftp.ls)('libffi-3.0.13.*'); ftp.close"
            -rw-r--r-- 1 ftp ftp 845747 Mar 17 2013
            libffi-3.0.13.tar.gz


            John



            On Fri, Jul 11, 2014 at 11:03 AM, Daniel DeLeo
            <dan@kallistec.com <mailto:dan@kallistec.com>
            (mailto:dan@kallistec.com <mailto:dan@kallistec.com>)>
            wrote:



                On Friday, July 11, 2014 at 10:49 AM, John Alberts
                wrote:

                    I'm trying to build a package using
                    omnibus-ruby on my osx mavericks laptop. The
                    package uses the ruby and rubygems recipes
                    (are they called recipes in omnibus?) from
                    omnibus-software which pulls in libffi.rb.
                    libffi is trying to download a tarball via ftp
                    and I'm getting a net::ftp error. I've tried
                    adding a "require 'net/ftp'" to the
                    git_fetcher.rb in omnibus-ruby, but that
                    doesn't help.
                    Any thoughts on how I can fix this error?

                    Full error is here:
                    https://gist.github.com/albertsj1/af22659753599dffe367

                    Thanks


                    --
                    John Alberts



                net/ftp is part of the ruby stdlib, so it seems
                your ruby installation is busted (or you have
                something very wrong with your load path). Find
                your ruby stdlib dir (something like `gem which
                forwardable` should get you close) and check if
                net/ftp.rb is there.

                --
                Daniel DeLeo





            --
            John Alberts





        --
        John Alberts

#9

On Fri Jul 11 19:24:18 2014, Eric G. Wolfe wrote:
I’ve

                    tried adding a "require 'net/ftp'" to the
                    git_fetcher.rb in omnibus-ruby, but that
                    doesn't help.

not sure if this was just a thinko when you were typing this out, but
you’d need to patch net_fetcher.rb, not git_fetcher.rb


#10

Yes. I meant net_fetcher.
I won’t get a chance to see if reinstalling Ruby helps, but Eric W. says
it’s reproducable.
On Jul 12, 2014 3:44 AM, “Lamont Granquist” lamont@opscode.com wrote:

On Fri Jul 11 19:24:18 2014, Eric G. Wolfe wrote:
I’ve

                    tried adding a "require 'net/ftp'" to the
                    git_fetcher.rb in omnibus-ruby, but that
                    doesn't help.

not sure if this was just a thinko when you were typing this out, but
you’d need to patch net_fetcher.rb, not git_fetcher.rb


#11

What about this using pry or irb:

% pry
[1] pry(main)> require ‘net/ftp’
=> true
[2] pry(main)> Net::FTP.class
=> Class

If that doesn’t work then ruby is probably busted.

Make sure to do that from within the bundle that you were running
omnibus-ruby from in order to pick up the same ruby + gemset.

On Sat Jul 12 06:40:11 2014, John Alberts wrote:

Yes. I meant net_fetcher.
I won’t get a chance to see if reinstalling Ruby helps, but Eric W.
says it’s reproducable.

On Jul 12, 2014 3:44 AM, “Lamont Granquist” <lamont@opscode.com
mailto:lamont@opscode.com> wrote:

On Fri Jul 11 19:24:18 2014, Eric G. Wolfe wrote:
I've

                                tried adding a "require 'net/ftp'"
        to the
                                git_fetcher.rb in omnibus-ruby,
        but that
                                doesn't help.


not sure if this was just a thinko when you were typing this out,
but you'd need to patch net_fetcher.rb, not git_fetcher.rb

#12

On Sat, Jul 12, 2014 at 10:35 AM, Lamont Granquist lamont@opscode.com
wrote:

% pry
[1] pry(main)> require ‘net/ftp’
=> true
[2] pry(main)> Net::FTP.class
=> Class

Thanks everyone for all of the suggestions. Sorry for the slow response.
Busy weekend and just got to the office after a long flight.

Regarding the suggestions for pry; yes, I get the same output you show.
That was actually the first thing I checked. :slight_smile:

I also tried reinstalling ruby. I actually used rbenv to install a new
1.9.3-p547 version of ruby. That didn’t help.

I did manage to get around the error by putting a “require ‘net/ftp’” in
lib/omnibus.rb. Yes, I know it definitely doesn’t belong there. I just
put it there to test if it fixed the issue and it did. I tried putting the
require statement in lib/omnibus/fetchers/net_fetcher.rb and also tried
lib/omnibus/fetcher.rb but that didn’t eliminate the error message.
I still plan to trace the code and figure out exactly where is the
appropriate place for the require statement and I’ll submit a PR. I just
wanted to update on my progress and thank everyone for the help.

John


John Alberts