librelist archives

« back to archive

terminal out put and integrity output different

terminal out put and integrity output different

From:
Christopher Flöß
Date:
2010-08-23 @ 10:40
Hi all,

I tried posting this in the channel, but didn't get a response.

Basically, we've been using integrity pretty successfully, but recently
something went wrong and we're not sure what the issue is.

Simply put, "bundle install && rake --trace" doesn't work when integrity
runs it, but it works on the command line.

The problem is similar to what was covered here:


http://librelist.com/browser//integrity/2010/2/1/missing-the-rails-2-3-5-gem-please-gem-install/#a90965d800315af9713fde46573f0730

but the suggested patch didn't solve our problem.

I'm not sure how else to trouble-shoot this at this point, but I do find
it curious that we're getting the output error

"Missing gem file 'nap-0.3.1.gem'."

which is actually a dependency of integrity, but not any of our
applications. Is it possible that integrity is somehow running 'bundle
install' in the wrong directory?

This mistake is actually persistent across 3 projects.

We've also tried updating integrity, but that didn't help either.

I'll attach the complete both command line and integrity output for one
of the projects. You'll notice also that the dependencies are completely
different. Thanks for your time.

-- Chris

Integrity output:

Using rake (0.8.7) 
Using ZenTest (4.3.3) 
Using RubyInline (3.8.4) 
Using sexp_processor (3.0.4) 
Using ParseTree (3.0.5) 
Using activesupport (2.3.8) 
Using activerecord (2.3.8) 
Using addressable (2.1.1) 
Using ansi (1.2.2) 
Using rack (1.2.1) 
Using bcat (0.5.0) 
Using bcrypt-ruby (2.1.2) 
Using nap (0.3.1) 
Using broach (0.1.4) 
Using columnize (0.3.1) 
Using contest (0.1.2) 
Using crack (0.1.8) 
Using extlib (0.9.15) 
Using dm-core (1.0.0) 
Using dm-aggregates (1.0.0) 
Using dm-migrations (1.0.0) 
Using dm-constraints (1.0.0) 
Using fastercsv (1.5.3) 
Using json_pure (1.4.3) 
Using dm-serializer (1.0.0) 
Using dm-timestamps (1.0.0) 
Using dm-transactions (1.0.0) 
Using stringex (1.1.0) 
Using uuidtools (2.1.1) 
Using dm-types (1.0.0) 
Using dm-validations (1.0.0) 
Using data_mapper (1.0.0) 
Using data_objects (0.10.2) 
Using delayed_job (1.7.0) 
Using dm-do-adapter (1.0.0) 
Using do_sqlite3 (0.10.2) 
Using dm-sqlite-adapter (1.0.0) 
Using randexp (0.1.5) 
Using dm-sweatshop (1.0.0) 
Using facets (2.8.4) 
Using haml (2.2.17) 
Using hpricot (0.8.2) 
Using json (1.1.9) 
Using sinatra (1.0) 
Using sinatra-authorization (1.0.0) 
Using thor (0.9.9) 
Using integrity (0.1.9.2) 
Using xmpp4r (0.5) 
Using jfcouture-xmpp4r-simple (0.8.9) 
Using integrity-jabber (1.0.7) 
Using linecache (0.43) 
Using mime-types (1.16) 
Using mailfactory (1.4.0) 
Using mocha (0.9.8) 
Using nokogiri (1.4.3.1) 
Using rack-test (0.5.0) 
Using redgreen (1.2.2) 
Using rr (0.10.11) 
Using ruby-debug-base (0.10.3) 
Using ruby-debug (0.10.3) 
Using rumbster (1.0.0) 
Using shout-bot (0.0.4) 
Using tlsmail (0.0.1) 
Using sinatra-ditties (0.0.2) 
Using sqlite3-ruby (1.3.1) 
Using turn (0.7.0) 
Using webmock (1.3.3) 
Using webrat (0.6.0) 
Using bundler (1.0.0.rc.2) 
Updating .gem files in vendor/cache
Missing gem file 'nap-0.3.1.gem'.

Command line output:

adva@servercharlie:~/integrity/builds/645$ bundle install && rake
--trace
Fetching source index for http://rubygems.org/
Using rake (0.8.7) 
Using abstract (1.0.0) 
Using activesupport (3.0.0.rc) 
Using builder (2.1.2) 
Using i18n (0.4.1) 
Using activemodel (3.0.0.rc) 
Using erubis (2.6.6) 
Using rack (1.2.1) 
Using rack-mount (0.6.12) 
Using rack-test (0.5.4) 
Using tzinfo (0.3.23) 
Using actionpack (3.0.0.rc) 
Using mime-types (1.16) 
Using polyglot (0.3.1) 
Using treetop (1.4.8) 
Using mail (2.2.5) 
Using actionmailer (3.0.0.rc) 
Using arel (0.4.0) 
Using activerecord (3.0.0.rc) 
Using activeresource (3.0.0.rc) 
Using bundler (1.0.0.rc.2) 
Using thor (0.14.0) 
Using railties (3.0.0.rc) 
Using rails (3.0.0.rc) 
Your bundle is complete! Use `bundle show [gemname]` to see where a
bundled gem is installed.

Your bundle was installed to `/home/adva/.rvm/gems/ree-1.8.7-2010.02`
(in /home/adva/integrity/builds/645)
** Invoke default (first_time)
** Invoke test (first_time)
** Execute test
/home/adva/.rvm/rubies/ree-1.8.7-2010.02/bin/ruby -I"lib"

"/home/adva/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
"test/foam_test.rb" 
Loaded
suite 
/home/adva/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
.
Finished in 0.341794 seconds.

1 tests, 9 assertions, 0 failures, 0 errors
** Execute default
adva@servercharlie:~/integrity/builds/645$

Re: [integrity] terminal out put and integrity output different

From:
David J. Hamilton
Date:
2010-08-23 @ 13:40
> Simply put, "bundle install && rake --trace" doesn't work when integrity
> runs it, but it works on the command line.

[snip]

> which is actually a dependency of integrity, but not any of our
> applications. Is it possible that integrity is somehow running 'bundle
> install' in the wrong directory?
>
> This mistake is actually persistent across 3 projects.

I suspect very strongly that you are running into a problem with
bundler.  Bundler pollutes the environment in several ways, modifying
RUBYOPT and also setting bundler-specific environment variables that
will confuse bundler invocations in subshells.  Integrity should (but
does not) clear those, but in the meantime you can set your build
command to a shell script that does.

    $ cat integrity.sh
    #!/bin/sh

    echo "Restoring environment broken by bundler."
    export RUBYOPT='-Ku'
    for k in `env | grep -P '^BUNDLE' | cut -d'=' -f 1`; do
        unset $k
    done

    rvm 1.9.2 -e 'system "bundle install"'
    rvm 1.9.2 -e 'system "rake spec"'


-- 
med vänlig hälsning
David JH

Re: [integrity] terminal out put and integrity output different

From:
Christopher Flöß
Date:
2010-08-23 @ 13:26
On Mon, 2010-08-23 at 06:40 -0700, David J. Hamilton wrote:
> $ cat integrity.sh
>     #!/bin/sh
> 
>     echo "Restoring environment broken by bundler."
>     export RUBYOPT='-Ku'
>     for k in `env | grep -P '^BUNDLE' | cut -d'=' -f 1`; do
>         unset $k
>     done
> 
>     rvm 1.9.2 -e 'system "bundle install"'
>     rvm 1.9.2 -e 'system "rake spec"'

Thank you David. That did it.