问:
Heroku Build failed – "Installing node-v6.10.0-linux-x64 ---> Detecting rake tasks sh: 2: Syntax error: Unterminated quoted string"
PROBLEM: My app works locally but Heroku can't built it

My App (older version) is already in production and works fine

After updating my gems Heroku can't build it

LOGFILE:

```> -----> Ruby app detected
> -----> Compiling Ruby/Rails
> -----> Using Ruby version: ruby-2.4.0
> -----> Installing dependencies using bundler 1.13.7
>        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
>        Warning: the running version of Bundler (1.13.7) is older than the version that created the lockfile (1.15.1). We suggest you upgrade
> to the latest version of Bundler by running `gem install bundler`.
> [...]
>        Using two_factor_authentication 2.0.0 from https://github.com/Houdini/two_factor_authentication.git (at
> master@20c9d14)
>        Bundle complete! 95 Gemfile dependencies, 166 gems now installed.
>        Gems in the groups development and test were not installed.
>        Bundled gems are installed into ./vendor/bundle.
>        Bundle completed (8.87s)
>        Cleaning up the bundler cache.
>        Warning: the running version of Bundler (1.13.7) is older than the version that created the lockfile (1.15.1). We suggest you upgrade
> to the latest version of Bundler by running `gem install bundler`.
>        Removing rake (11.3.0)
>        Removing sanitize (4.4.0)
>        Removing puma (3.9.0)
> -----> Installing node-v6.10.0-linux-x64
> -----> Detecting rake tasks sh: 2: Syntax error: Unterminated quoted string sh: 2: Syntax error: Unterminated quoted string  !  !     Could
> not detect rake tasks  !     ensure you can run `$ bundle exec rake
> -P` against your app  !     and using the production group of your Gemfile.  !     rake aborted!  !     LoadError:
> /tmp/build_d57fe8071d52b0e09ad9d1d1102c6aeb/oanstein-oanstein-9fd67121d7068e6188756c5927264e99f0a90d83/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.7.2/ext/nokogiri/nokogiri.so:
> cannot open shared object file: No such file or directory -
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/nokogumbo-1.4.12/lib/nokogumboc.so
> !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `block in require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:258:in `load_dependency'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/nokogumbo-1.4.12/lib/nokogumbo.rb:2:in
> `<top (required)>'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `block in require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:258:in `load_dependency'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/sanitize-4.5.0/lib/sanitize.rb:3:in
> `<top (required)>'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:91:in
> `require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:91:in
> `block (2 levels) in require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in
> `each'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in
> `block in require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in
> `each'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in
> `require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler.rb:106:in
> `require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/config/application.rb:8:in
> `<top (required)>'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/Rakefile:4:in
> `require_relative'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/Rakefile:4:in
> `<top (required)>'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in
> `load'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in
> `load_rakefile'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:687:in
> `raw_load_rakefile'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:96:in
> `block in load_rakefile'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in
> `standard_exception_handling'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:95:in
> `load_rakefile'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:79:in
> `block in run'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in
> `standard_exception_handling'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:77:in
> `run'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/exe/rake:27:in
> `<top (required)>'  !     vendor/bundle/bin/rake:17:in `load'  !
> vendor/bundle/bin/rake:17:in `'  !
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/helpers/rake_runner.rb:106:in
> `load_rake_tasks!': Could not detect rake tasks
> (LanguagePack::Helpers::RakeRunner::CannotLoadRakefileError) ensure
> you can run `$ bundle exec rake -P` against your app and using the
> production group of your Gemfile. rake aborted! LoadError:
> /tmp/build_d57fe8071d52b0e09ad9d1d1102c6aeb/oanstein-oanstein-9fd67121d7068e6188756c5927264e99f0a90d83/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.7.2/ext/nokogiri/nokogiri.so:
> cannot open shared object file: No such file or directory -
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/nokogumbo-1.4.12/lib/nokogumboc.so
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `block in require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:258:in `load_dependency'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/nokogumbo-1.4.12/lib/nokogumbo.rb:2:in
> `<top (required)>'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `block in require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:258:in `load_dependency'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/sanitize-4.5.0/lib/sanitize.rb:3:in
> `<top (required)>'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:91:in
> `require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:91:in
> `block (2 levels) in require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in
> `each'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in
> `block in require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in
> `each'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in
> `require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler.rb:106:in
> `require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/config/application.rb:8:in
> `<top (required)>'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/Rakefile:4:in
> `require_relative'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/Rakefile:4:in
> `<top (required)>'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in
> `load'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in
> `load_rakefile'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:687:in
> `raw_load_rakefile'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:96:in
> `block in load_rakefile'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in
> `standard_exception_handling'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:95:in
> `load_rakefile'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:79:in
> `block in run'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in
> `standard_exception_handling'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:77:in
> `run'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/exe/rake:27:in
> `<top (required)>' vendor/bundle/bin/rake:17:in `load'
> vendor/bundle/bin/rake:17:in `'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/ruby.rb:757:in
> `rake'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/rails4.rb:77:in
> `block (2 levels) in run_assets_precompile_rake_task'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:132:in
> `log'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/rails4.rb:71:in
> `block in run_assets_precompile_rake_task'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:18:in
> `block (2 levels) in instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:40:in
> `yield_with_block_depth'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:17:in
> `block in instrument'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/ruby/cedar-14/lib/ruby/2.3.0/benchmark.rb:308:in
> `realtime'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:16:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:49:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:45:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/rails4.rb:70:in
> `run_assets_precompile_rake_task'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/ruby.rb:109:in
> `block (2 levels) in compile'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/ruby.rb:778:in
> `allow_git'   from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/ruby.rb:103:in
> `block in compile'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:18:in
> `block (2 levels) in instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:40:in
> `yield_with_block_depth'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:17:in
> `block in instrument'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/ruby/cedar-14/lib/ruby/2.3.0/benchmark.rb:308:in
> `realtime'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:16:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:49:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:45:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/ruby.rb:92:in
> `compile'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/rails2.rb:57:in
> `block in compile'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:18:in
> `block (2 levels) in instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:40:in
> `yield_with_block_depth'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:17:in
> `block in instrument'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/ruby/cedar-14/lib/ruby/2.3.0/benchmark.rb:308:in
> `realtime'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:16:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:49:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:45:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/rails2.rb:55:in
> `compile'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/rails3.rb:42:in
> `block in compile'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:18:in
> `block (2 levels) in instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:40:in
> `yield_with_block_depth'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:17:in
> `block in instrument'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/ruby/cedar-14/lib/ruby/2.3.0/benchmark.rb:308:in
> `realtime'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:16:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:49:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:45:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/rails3.rb:41:in
> `compile'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/rails4.rb:41:in
> `block in compile'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:18:in
> `block (2 levels) in instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:40:in
> `yield_with_block_depth'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:17:in
> `block in instrument'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/ruby/cedar-14/lib/ruby/2.3.0/benchmark.rb:308:in
> `realtime'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:16:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:49:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:45:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/rails4.rb:40:in
> `compile'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/bin/support/ruby_compile:20:in
> `block (2 levels) in '  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:132:in
> `log'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/bin/support/ruby_compile:19:in
> `block in '     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:35:in
> `block in trace'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:18:in
> `block (2 levels) in instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:40:in
> `yield_with_block_depth'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:17:in
> `block in instrument'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/ruby/cedar-14/lib/ruby/2.3.0/benchmark.rb:308:in
> `realtime'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:16:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:35:in
> `trace'   from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/bin/support/ruby_compile:15:in
> `'  !     Push rejected, failed to compile Ruby app.  !     Push
> failed
```

There is this error in the logs:

load_rake_tasks!': Could not detect rake tasks
  LanguagePack::Helpers::RakeRunner::CannotLoadRakefileError) ensure you
  can run $ bundle exec rake -P against your app and using the
  production group of your Gemfile

MY GEM CHANGES

答:
Found the problematic gem: Nokogumbo 1.4.12 crashes on Heroku

https://github.com/rubys/nokogumbo/issues/61

Rolled it back to 1.4.11 and now Heroku is able to build the app

Body:
PROBLEM: My app works locally but Heroku can't built it

My App (older version) is already in production and works fine

After updating my gems Heroku can't build it

LOGFILE:

> -----> Ruby app detected
> -----> Compiling Ruby/Rails
> -----> Using Ruby version: ruby-2.4.0
> -----> Installing dependencies using bundler 1.13.7
>        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
>        Warning: the running version of Bundler (1.13.7) is older than the version that created the lockfile (1.15.1). We suggest you upgrade
> to the latest version of Bundler by running `gem install bundler`.
> [...]
>        Using two_factor_authentication 2.0.0 from https://github.com/Houdini/two_factor_authentication.git (at
> master@20c9d14)
>        Bundle complete! 95 Gemfile dependencies, 166 gems now installed.
>        Gems in the groups development and test were not installed.
>        Bundled gems are installed into ./vendor/bundle.
>        Bundle completed (8.87s)
>        Cleaning up the bundler cache.
>        Warning: the running version of Bundler (1.13.7) is older than the version that created the lockfile (1.15.1). We suggest you upgrade
> to the latest version of Bundler by running `gem install bundler`.
>        Removing rake (11.3.0)
>        Removing sanitize (4.4.0)
>        Removing puma (3.9.0)
> -----> Installing node-v6.10.0-linux-x64
> -----> Detecting rake tasks sh: 2: Syntax error: Unterminated quoted string sh: 2: Syntax error: Unterminated quoted string  !  !     Could
> not detect rake tasks  !     ensure you can run `$ bundle exec rake
> -P` against your app  !     and using the production group of your Gemfile.  !     rake aborted!  !     LoadError:
> /tmp/build_d57fe8071d52b0e09ad9d1d1102c6aeb/oanstein-oanstein-9fd67121d7068e6188756c5927264e99f0a90d83/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.7.2/ext/nokogiri/nokogiri.so:
> cannot open shared object file: No such file or directory -
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/nokogumbo-1.4.12/lib/nokogumboc.so
> !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `block in require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:258:in `load_dependency'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/nokogumbo-1.4.12/lib/nokogumbo.rb:2:in
> `<top (required)>'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `block in require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:258:in `load_dependency'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/sanitize-4.5.0/lib/sanitize.rb:3:in
> `<top (required)>'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:91:in
> `require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:91:in
> `block (2 levels) in require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in
> `each'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in
> `block in require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in
> `each'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in
> `require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler.rb:106:in
> `require'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/config/application.rb:8:in
> `<top (required)>'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/Rakefile:4:in
> `require_relative'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/Rakefile:4:in
> `<top (required)>'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in
> `load'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in
> `load_rakefile'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:687:in
> `raw_load_rakefile'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:96:in
> `block in load_rakefile'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in
> `standard_exception_handling'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:95:in
> `load_rakefile'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:79:in
> `block in run'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in
> `standard_exception_handling'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:77:in
> `run'  !
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/exe/rake:27:in
> `<top (required)>'  !     vendor/bundle/bin/rake:17:in `load'  !
> vendor/bundle/bin/rake:17:in `'  !
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/helpers/rake_runner.rb:106:in
> `load_rake_tasks!': Could not detect rake tasks
> (LanguagePack::Helpers::RakeRunner::CannotLoadRakefileError) ensure
> you can run `$ bundle exec rake -P` against your app and using the
> production group of your Gemfile. rake aborted! LoadError:
> /tmp/build_d57fe8071d52b0e09ad9d1d1102c6aeb/oanstein-oanstein-9fd67121d7068e6188756c5927264e99f0a90d83/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.7.2/ext/nokogiri/nokogiri.so:
> cannot open shared object file: No such file or directory -
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/nokogumbo-1.4.12/lib/nokogumboc.so
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `block in require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:258:in `load_dependency'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/nokogumbo-1.4.12/lib/nokogumbo.rb:2:in
> `<top (required)>'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `block in require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:258:in `load_dependency'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/sanitize-4.5.0/lib/sanitize.rb:3:in
> `<top (required)>'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:91:in
> `require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:91:in
> `block (2 levels) in require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in
> `each'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in
> `block in require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in
> `each'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in
> `require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler.rb:106:in
> `require'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/config/application.rb:8:in
> `<top (required)>'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/Rakefile:4:in
> `require_relative'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/Rakefile:4:in
> `<top (required)>'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in
> `load'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in
> `load_rakefile'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:687:in
> `raw_load_rakefile'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:96:in
> `block in load_rakefile'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in
> `standard_exception_handling'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:95:in
> `load_rakefile'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:79:in
> `block in run'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in
> `standard_exception_handling'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:77:in
> `run'
> /tmp/build_29247bb29579dec7ce1e38d2d8a4dac0/oanstein-oanstein-c5fa658ece352b50b13c6f2fe165fd6007dca37a/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/exe/rake:27:in
> `<top (required)>' vendor/bundle/bin/rake:17:in `load'
> vendor/bundle/bin/rake:17:in `'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/ruby.rb:757:in
> `rake'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/rails4.rb:77:in
> `block (2 levels) in run_assets_precompile_rake_task'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:132:in
> `log'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/rails4.rb:71:in
> `block in run_assets_precompile_rake_task'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:18:in
> `block (2 levels) in instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:40:in
> `yield_with_block_depth'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:17:in
> `block in instrument'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/ruby/cedar-14/lib/ruby/2.3.0/benchmark.rb:308:in
> `realtime'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:16:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:49:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:45:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/rails4.rb:70:in
> `run_assets_precompile_rake_task'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/ruby.rb:109:in
> `block (2 levels) in compile'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/ruby.rb:778:in
> `allow_git'   from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/ruby.rb:103:in
> `block in compile'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:18:in
> `block (2 levels) in instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:40:in
> `yield_with_block_depth'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:17:in
> `block in instrument'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/ruby/cedar-14/lib/ruby/2.3.0/benchmark.rb:308:in
> `realtime'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:16:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:49:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:45:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/ruby.rb:92:in
> `compile'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/rails2.rb:57:in
> `block in compile'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:18:in
> `block (2 levels) in instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:40:in
> `yield_with_block_depth'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:17:in
> `block in instrument'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/ruby/cedar-14/lib/ruby/2.3.0/benchmark.rb:308:in
> `realtime'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:16:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:49:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:45:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/rails2.rb:55:in
> `compile'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/rails3.rb:42:in
> `block in compile'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:18:in
> `block (2 levels) in instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:40:in
> `yield_with_block_depth'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:17:in
> `block in instrument'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/ruby/cedar-14/lib/ruby/2.3.0/benchmark.rb:308:in
> `realtime'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:16:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:49:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:45:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/rails3.rb:41:in
> `compile'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/rails4.rb:41:in
> `block in compile'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:18:in
> `block (2 levels) in instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:40:in
> `yield_with_block_depth'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:17:in
> `block in instrument'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/ruby/cedar-14/lib/ruby/2.3.0/benchmark.rb:308:in
> `realtime'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:16:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:49:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:45:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/rails4.rb:40:in
> `compile'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/bin/support/ruby_compile:20:in
> `block (2 levels) in '  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/base.rb:132:in
> `log'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/bin/support/ruby_compile:19:in
> `block in '     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:35:in
> `block in trace'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:18:in
> `block (2 levels) in instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:40:in
> `yield_with_block_depth'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:17:in
> `block in instrument'     from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/ruby/cedar-14/lib/ruby/2.3.0/benchmark.rb:308:in
> `realtime'    from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:16:in
> `instrument'  from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:35:in
> `trace'   from
> /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/bin/support/ruby_compile:15:in
> `'  !     Push rejected, failed to compile Ruby app.  !     Push
> failed

There is this error in the logs:

load_rake_tasks!': Could not detect rake tasks
  LanguagePack::Helpers::RakeRunner::CannotLoadRakefileError) ensure you
  can run $ bundle exec rake -P against your app and using the
  production group of your Gemfile

MY GEM CHANGES


来源: stackexchange

问:
Can `typeof(T).IsAssignableFrom(x.GetType())` be safely rewritten as `x is T`?

Note: This is not a duplicate of "Use of IsAssignableFrom and “is” keyword in C#". That other question asks about typeof(T).IsAssignableFrom(type)), where type is not an object but a Type.

This seems trivial — I can hear you saying, "Just call x.GetType()!" — but due to the COM-related corner case mentioned below, that call causes problems, which is why I'm asking about the rewrite.

… or are there rare special cases where the two might give different results?

I stumbled upon a type check of the form:

```<code>typeof(TValue).IsAssignableFrom(value.GetType())
</code>```

where TValue is a generic type parameter (without any constraints) and value is an object.

I am not entirely sure whether it is safe to rewrite the above simply as:

```<code>value is TValue
</code>```

To my current knowledge, the two tests are equivalent with the exception of COM objects. is should trigger a proper QueryInterface, while IsAssignableFrom might get confused by the __ComObject RCW wrapper type and report a false negative.

Are there any other differences between is and the shown use of IsAssignableFrom?

答:
```<code>    static void Main(string[] args)
    {
        int? bob = null;

        Test(bob);
    }

    private static void Test<T>(T bob)
    {
        Console.WriteLine(bob is T);
        Console.WriteLine(typeof(T).IsInstanceOfType(bob));
        Console.WriteLine(typeof(T).IsAssignableFrom(bob.GetType()));
        Console.ReadLine();
    }
</code>```

Is an example where they act slightly differently (since bob is null).
https://stackoverflow.com/a/15853213/34092 may be of interest.

Other than that (and the other exceptions you mention) they do appear to be equivalent.

ContentLicense: CC BY-SA 3.0

Body:
Note: This is not a duplicate of "Use of IsAssignableFrom and “is” keyword in C#". That other question asks about typeof(T).IsAssignableFrom(type)), where type is not an object but a Type.

This seems trivial — I can hear you saying, "Just call x.GetType()!" — but due to the COM-related corner case mentioned below, that call causes problems, which is why I'm asking about the rewrite.

… or are there rare special cases where the two might give different results?

I stumbled upon a type check of the form:

typeof(TValue).IsAssignableFrom(value.GetType())

where TValue is a generic type parameter (without any constraints) and value is an object.

I am not entirely sure whether it is safe to rewrite the above simply as:

value is TValue

To my current knowledge, the two tests are equivalent with the exception of COM objects. is should trigger a proper QueryInterface, while IsAssignableFrom might get confused by the __ComObject RCW wrapper type and report a false negative.

Are there any other differences between is and the shown use of IsAssignableFrom?

Body:
    static void Main(string[] args)
    {
        int? bob = null;

        Test(bob);
    }

    private static void Test<T>(T bob)
    {
        Console.WriteLine(bob is T);
        Console.WriteLine(typeof(T).IsInstanceOfType(bob));
        Console.WriteLine(typeof(T).IsAssignableFrom(bob.GetType()));
        Console.ReadLine();
    }

Is an example where they act slightly differently (since bob is null).
https://stackoverflow.com/a/15853213/34092 may be of interest.

Other than that (and the other exceptions you mention) they do appear to be equivalent.


问:
autoresize text in qml
In the process of studying QML and QtQuick, the following question arose. How can I make the text automatically reduce the font size by decreasing the element in which it is located.
Now I have this method

```<code>Rectangle {
id: main_window
width: 700
height: 500

property int main_w: main_window.width

Rectangle {
    width: 400
    height: 400
    anchors.centerIn: parent
    color: 'green'

    Text {
        text: "SIZE ME!!!"
        anchors.centerIn: parent
        color: 'white'
        font.pointSize: {
            if (main_window.main_w < main_window.width)
                return main_window.main_w / 35 // we need 20pt
            return main_window.width / 35
        }
        visible: {
            if (parent.width < 100)
                return false
            return true
        }
    }
}
</code>```

It works, but not too elegantly. Maybe there are some methods that the text automatically resized. If the wrap in the ColumnLayout does not work.

Please help. Thank you

Here my code with fontSizeMode trying:

```<code>Rectangle {
id: root
width: 700
height: 700
property int mrg: 10

Rectangle {
    anchors.centerIn: parent
    width: 400
    height: 400
    color: 'green'

    Text {
        id: field
        text: "Size me!"
        minimumPointSize: 10
        font.pointSize: 60
        fontSizeMode: Text.Fit
        color: 'white'
        anchors.centerIn: parent
    }
}
}
</code>```

答:
Use the Text elements fontSizeMode property to set autosizing (Text.HorizontalFit, Text.VerticalFit or Text.Fit).
You can adjust the minimum font size with minimumPixelSize property.

See http://doc.qt.io/qt-5/qml-qtquick-text.html#fontSizeMode-prop for details

Title: autoresize text in qml

Body:
In the process of studying QML and QtQuick, the following question arose. How can I make the text automatically reduce the font size by decreasing the element in which it is located.
Now I have this method

Rectangle {
id: main_window
width: 700
height: 500

property int main_w: main_window.width

Rectangle {
    width: 400
    height: 400
    anchors.centerIn: parent
    color: 'green'

    Text {
        text: "SIZE ME!!!"
        anchors.centerIn: parent
        color: 'white'
        font.pointSize: {
            if (main_window.main_w < main_window.width)
                return main_window.main_w / 35 // we need 20pt
            return main_window.width / 35
        }
        visible: {
            if (parent.width < 100)
                return false
            return true
        }
    }
}

It works, but not too elegantly. Maybe there are some methods that the text automatically resized. If the wrap in the ColumnLayout does not work.

Please help. Thank you

Here my code with fontSizeMode trying:

Rectangle {
id: root
width: 700
height: 700
property int mrg: 10

Rectangle {
    anchors.centerIn: parent
    width: 400
    height: 400
    color: 'green'

    Text {
        id: field
        text: "Size me!"
        minimumPointSize: 10
        font.pointSize: 60
        fontSizeMode: Text.Fit
        color: 'white'
        anchors.centerIn: parent
    }
}
}


问:
How to play a video in HTML 5 by playlist already listed?
I have a single code index.html like this:
I create the style, script and the video body.

```<code><html>
<head>
<title>tes video</title>
</head>
<style type="text/css">
        #playlist {
        display:table;
    }
    #playlist li{
        cursor:pointer;
        padding:8px;
    }

    #playlist li:hover{
        color:blue;
    }
    #videoarea {
        float:left;
        width:1280px;
        height:720px;
        margin:10px;
        border:1px solid silver;
    }
</style>
<script type="text/javascript">
        $(function() {
            $("#playlist li").on("click", function() {
            $("#videoarea").attr({
                "src": $(this).attr("movieurl"),
                "autoplay": "autoplay"
                "type: video/mp4"
            })
        })
            $("#videoarea").attr({
            "src": $("#playlist li").eq(0).attr("movieurl"),
        })
        })
</script>

<body>
    <video id="videoarea" controls="controls" src=""></video>

    <ul id="playlist">
        <li movieurl="kendrickdna.mp4">Dna</li>
        <li movieurl="kendrickhumble.mp4">Humble</li>
    </ul>
</body>
<html>
</code>```

i want to create a simple playlist video in my html but the video doesn't appear, what i'm wrong? thanks in advance

答:
syntax error here: "type: video/mp4".

it should be "type": "video/mp4".

you can see example here - jsfiddle.net/kv9s9a0a/1

```<code>$("#playlist li").on("click", function(){
    $("#videoarea").attr({
    "src": $(this).data("movieurl"),
    "autoplay": true,
    "type": "video/mp4"
  });
});
</code>```

Body:
I have a single code index.html like this:
I create the style, script and the video body.

<title>tes video</title>

    <video id="videoarea" controls="controls" src=""></video>

Dna

Humble

i want to create a simple playlist video in my html but the video doesn't appear, what i'm wrong? thanks in advance

Body:
syntax error here: "type: video/mp4".

it should be "type": "video/mp4".

you can see example here - jsfiddle.net/kv9s9a0a/1

$("#playlist li").on("click", function(){
    $("#videoarea").attr({
    "src": $(this).data("movieurl"),
    "autoplay": true,
    "type": "video/mp4"
  });
});


问:
Symfony / Doctrine UnitTests with SQLite memory DB
I'm still working on PHP unit tests for testing my symfony2 controllers. My test classes are derivations of WebTestCase and the tests are doing GET or POST requests do check if everything works fine.
I want to test all underlying layers, but I don't want to mess up my database with the tests. I don't want to use mock ups, but an in-memory SQLite db, where I can set up a test scenario to check all modifications.
I found a lot of hints how to do this with doctrine 1.x, but they don't work any more.
So I want something like this:

```<code>class BlahblahTest extends WebTestCase {
    public function testXXXYYY() {
        // 1. Setup a new database with SQLite:memory:
        // 2. create the database and all tables according the entities in my project
        $this->createTestScenario(); // 3.
        $crawler = $this->client->request('GET', '/testpage');  // 4.
        // 5. Lots of checks against the database and / or the $crawler data
    }
}
</code>```

Any chance to get this work?

Thanks in advance
Hennes

答: You can easily create entitymanager instance your self. Check this helper class You probably don't have it in symfony 2 but you can use the idea to build your own base testCaseClass and use it when needed. This even does not require to boot kernel.  </p>

Body:
I'm still working on PHP unit tests for testing my symfony2 controllers. My test classes are derivations of WebTestCase and the tests are doing GET or POST requests do check if everything works fine.
I want to test all underlying layers, but I don't want to mess up my database with the tests. I don't want to use mock ups, but an in-memory SQLite db, where I can set up a test scenario to check all modifications.
I found a lot of hints how to do this with doctrine 1.x, but they don't work any more.
So I want something like this:

class BlahblahTest extends WebTestCase {
    public function testXXXYYY() {
        // 1. Setup a new database with SQLite:memory:
        // 2. create the database and all tables according the entities in my project
        $this->createTestScenario(); // 3.
        $crawler = $this->client->request('GET', '/testpage');  // 4.
        // 5. Lots of checks against the database and / or the $crawler data
    }
}

Any chance to get this work?

Thanks in advance
Hennes


问:
How get the current date and the timezone in numbers format
I want to print the current date in this format 2017/06/05 > Year/Month/Day
and next to it, the  current timezone in this format +3

I used this code

```<code>String DateToday  = DateFormat.getDateInstance().format(new Date());
String TZtoday = DateFormat.getTimeInstance().getTimeZone().getDisplayName();
txt.setText(DateToday + " | "+ TZtoday );
</code>```

But, it shows like this:

Jun 5, 2017 | Arabia Standard Time

I want it like this:

2017/06/05 | +3

答:
I know you are on Android, and I know that what is offered built-in on Android are the long outdated classes like DateFormat, SimpleDateFormat, Date and Calendar. Still I say, if you are doing something with dates and/or times and/or time zones, you should seriously consider skipping these classes and moving on to their modern replacements. This will require you to get ThreeTenABP. Then I suggest this way:

```<code>    ZonedDateTime date = ZonedDateTime.now(ZoneId.systemDefault());
    String tzToday = date.format(DateTimeFormatter.ofPattern("uuuu/MM/dd | x"));
    tzToday = tzToday.replaceFirst("(?<=\\+|-)0", "");
</code>```

Result on my computer:

```<code>2017/06/05 | +2
</code>```

Result in Asia/Kathmandu time zone may not be exactly what you wanted:

```<code>2017/06/05 | +545
</code>```

You may think my code snippet isn’t very advantageous over using the old classes. You may take my word when I say that there are so many cases where the old classes give you negative surprises, so the sooner you can start using the new ones, the better. Or you may make a typo in the format pattern string, for example, and notice how you get a surprising result with the old classes with no sign that anything is wrong, while the newer ones will attempt to put together a meaningful error message.

Another detail to note is I am reading the system clock and JVM’s time zone only once (passing the time zone back to now() to make sure it is used for the time). Your code in the question formats the date first, then reads the time zone. If someone changes the time zone between the two, the result will be inconsistent. Very unlikely, but this also means it will be very unlikely anyone will be able to figure out what happened.

The (?<=\\+|-) in the regular expression is a lookbehind: I am replacing a 0 preceeded by either + or - with the empty string. I searched in vain for a way to format the zone offset like +3 as you desired, so I resorted to the replaceFirst method.

Further link: How to use ThreeTenABP in Android Project.

Body:
I want to print the current date in this format 2017/06/05 > Year/Month/Day
and next to it, the  current timezone in this format +3

I used this code

String DateToday  = DateFormat.getDateInstance().format(new Date());
String TZtoday = DateFormat.getTimeInstance().getTimeZone().getDisplayName();
txt.setText(DateToday + " | "+ TZtoday );

But, it shows like this:

Jun 5, 2017 | Arabia Standard Time

I want it like this:

2017/06/05 | +3

Body:
I know you are on Android, and I know that what is offered built-in on Android are the long outdated classes like DateFormat, SimpleDateFormat, Date and Calendar. Still I say, if you are doing something with dates and/or times and/or time zones, you should seriously consider skipping these classes and moving on to their modern replacements. This will require you to get ThreeTenABP. Then I suggest this way:

    ZonedDateTime date = ZonedDateTime.now(ZoneId.systemDefault());
    String tzToday = date.format(DateTimeFormatter.ofPattern("uuuu/MM/dd | x"));
    tzToday = tzToday.replaceFirst("(?<=\\+|-)0", "");

Result on my computer:

2017/06/05 | +2

Result in Asia/Kathmandu time zone may not be exactly what you wanted:

2017/06/05 | +545

You may think my code snippet isn’t very advantageous over using the old classes. You may take my word when I say that there are so many cases where the old classes give you negative surprises, so the sooner you can start using the new ones, the better. Or you may make a typo in the format pattern string, for example, and notice how you get a surprising result with the old classes with no sign that anything is wrong, while the newer ones will attempt to put together a meaningful error message.

Another detail to note is I am reading the system clock and JVM’s time zone only once (passing the time zone back to now() to make sure it is used for the time). Your code in the question formats the date first, then reads the time zone. If someone changes the time zone between the two, the result will be inconsistent. Very unlikely, but this also means it will be very unlikely anyone will be able to figure out what happened.

The (?<=\\+|-) in the regular expression is a lookbehind: I am replacing a 0 preceeded by either + or - with the empty string. I searched in vain for a way to format the zone offset like +3 as you desired, so I resorted to the replaceFirst method.

Further link: How to use ThreeTenABP in Android Project.


问:
Android: Edittext that only allows a digit from 1-9
I am looking for a way so that users can only input a number between 1-9 with edittext. No exception should be displayed. It should not be possible to type in more than one digit. </p>

答:
Ther have two ways for your question
1) in your XML fayl

```<code><EditText
  android:id="@+id/edittext"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:digits="123456789"
  android:inputType="number"
  android:maxLength="1"/>
</code>```

2) in your Activity class

```<code>    mEdit.setInputType(InputType.TYPE_CLASS_NUMBER );
    mEdit.setKeyListener(DigitsKeyListener.getInstance("0123456789"));
    mEdit.setSingleLine(true);
</code>```

Body:
Ther have two ways for your question
1) in your XML fayl

<EditText
  android:id="@+id/edittext"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:digits="123456789"
  android:inputType="number"
  android:maxLength="1"/>

2) in your Activity class

    mEdit.setInputType(InputType.TYPE_CLASS_NUMBER );
    mEdit.setKeyListener(DigitsKeyListener.getInstance("0123456789"));
    mEdit.setSingleLine(true);


问:
NavigationItem right button not setting
I am losing my mind setting the right button on my custom Navigation Controller.

I have my class that extends the UINavigationCOntroller. I cleaned everything and am just runnig the following code on the viewDidAppear.

```<code>navigationBar.topItem?.title = "Carpool"

    let languagesSpinner = UIBarButtonItem(title: "PT", style: .done, target: self, action: #selector(didClickLanguagesButton))
    navigationItem.setRightBarButton(languagesSpinner, animated: true)
</code>```

The title is seted up but not the button.

The strange thing is that, the item is setted up when i debug with po.

Can anyone help me please?

答:
You are setting title with navigationBar.topItem and setting rightBarButton with navigationItem so try setting rightBarButton also with navigationBar.topItem .

Try once

```<code>navigationBar.topItem?.setRightBarButton(languagesSpinner, animated: true)
</code>```

Instead of

```<code>navigationItem.setRightBarButton(languagesSpinner, animated: true)
</code>```

Title: NavigationItem right button not setting

Body:
I am losing my mind setting the right button on my custom Navigation Controller.

I have my class that extends the UINavigationCOntroller. I cleaned everything and am just runnig the following code on the viewDidAppear.

navigationBar.topItem?.title = "Carpool"

    let languagesSpinner = UIBarButtonItem(title: "PT", style: .done, target: self, action: #selector(didClickLanguagesButton))
    navigationItem.setRightBarButton(languagesSpinner, animated: true)

The title is seted up but not the button.

The strange thing is that, the item is setted up when i debug with po.

Can anyone help me please?

Body:
You are setting title with navigationBar.topItem and setting rightBarButton with navigationItem so try setting rightBarButton also with navigationBar.topItem .

Try once

navigationBar.topItem?.setRightBarButton(languagesSpinner, animated: true)

Instead of

navigationItem.setRightBarButton(languagesSpinner, animated: true)


问:
converting date format
I got date as '14-Dec-2010' i want to get the month in number format for the given date.
that is., i want to convert the date to '14-12-2010'.

答:
```<code>DateFormat format = new SimpleDateFormat("dd-MMM-yyyy");
Date date= format.parse("14-Dec-2010");
</code>```

This is how you will get Date Object now you can print it in any format.

Note: month starts from 0 , so for Dec it would be 11

Here is working IDE One demo

Document

ContentLicense: CC BY-SA 2.5

Title: converting date format

Body:
DateFormat format = new SimpleDateFormat("dd-MMM-yyyy");
Date date= format.parse("14-Dec-2010");

This is how you will get Date Object now you can print it in any format.

Note: month starts from 0 , so for Dec it would be 11

Here is working IDE One demo

Document


问:
How to write query/trigger that satisfies following scenario?
Solution required in SQL Server.

Suppose there are 2 tables

TICKET table with following columns:

item_id - PK

ticket_cost

TICKET_PAST with columns:

price - FK

ticket_new_cost

The question is to write a trigger such that whenever a price in the TICKET table is inserted, updated or deleted a new row should be generated by trigger?

答:
Using an after update trigger, and accessing the new value from inserted and the old value from deleted:

```<code>create trigger dbo.item_price_update_trigger
  on dbo.item
    after update as
begin;
  set nocount on;
  insert into item_hist (item_id, price, new_price)
  select i.item_id, d.price, i.price
  from inserted i
    inner join deleted d
      on i.item_id = d.item_id
end;
go
</code>```

rextester demo: http://rextester.com/PBB85814

This trigger answers your question, but would most likely be just one of three triggers for a complete auditing/history solution. You may want a trigger for after insert to store the initial insert of an item, and an after delete trigger to record the final price of an item that was deleted.

You would also probably want to include the dates of when these actions occurred, so you could query what the effective price was of an item at a given time.

For a somewhat automated option of creating audit/history tables and related triggers, this article and the related scripts may be helpful: Quick And Easy Audit Tables - Dave Britten

Reference:

Use the inserted and deleted Tables

create trigger (Transact-SQL)

DML Triggers

Body:
Using an after update trigger, and accessing the new value from inserted and the old value from deleted:

create trigger dbo.item_price_update_trigger
  on dbo.item
    after update as
begin;
  set nocount on;
  insert into item_hist (item_id, price, new_price)
  select i.item_id, d.price, i.price
  from inserted i
    inner join deleted d
      on i.item_id = d.item_id
end;
go

rextester demo: http://rextester.com/PBB85814

This trigger answers your question, but would most likely be just one of three triggers for a complete auditing/history solution. You may want a trigger for after insert to store the initial insert of an item, and an after delete trigger to record the final price of an item that was deleted.

You would also probably want to include the dates of when these actions occurred, so you could query what the effective price was of an item at a given time.

For a somewhat automated option of creating audit/history tables and related triggers, this article and the related scripts may be helpful: Quick And Easy Audit Tables - Dave Britten

Reference:

Use the inserted and deleted Tables

create trigger (Transact-SQL)

DML Triggers


问:
deleting a specific value from a document in azure cosmos db nosql
In azure , when I have creating Resource Group, putting the resource group name (RG1,RG2,etc.,) in my cosmos db in an array as follows,

```<code>"id": "resourceGroup",
    "rgValues": {
        "name": [
            "RG1",
            "RG2"]}
</code>```

If I want to delete RG1 or RG2 alone from document while rollback the resource group in case of the elements failure.

答:
If I understood your question correctly, you want a mechanism to rollback your transaction in case of failure.

It's pretty much possible in cosmosdb. You have to write a stored procedure; it's a server side JS coding.

Transactions are deeply and natively integrated into Cosmos DB’s JavaScript programming model. Inside a JavaScript function, all operations are automatically wrapped under a single transaction. If the JavaScript completes without any exception, the operations to the database are committed. In effect, the “BEGIN TRANSACTION” and “COMMIT TRANSACTION” statements in relational databases are implicit in Cosmos DB. If there is any exception that’s propagated from the script, Cosmos DB’s JavaScript runtime will roll back the whole transaction

please follow the link for more info.

Body:
In azure , when I have creating Resource Group, putting the resource group name (RG1,RG2,etc.,) in my cosmos db in an array as follows,

"id": "resourceGroup",
    "rgValues": {
        "name": [
            "RG1",
            "RG2"]}

If I want to delete RG1 or RG2 alone from document while rollback the resource group in case of the elements failure.


问:
Check if the hostname is fully qualified (FQDN)
```<code>#!/bin/bash

for h in "bert" "ernie" "www.google.com"
do
    host $h 2>&1 > /dev/null
    if [ $? -eq 0 ]
    then
        echo "$h is a FQDN"
    else
        echo "$h is not a FQDN"
    fi
done
</code>```

Like to insert the output of 'hostname -f' instead of 'bert' or www.google.com
If the hostname is FQDN the script should continue, if not an error message should occur. PS. It is NOT important if the TLD exist or not. eg. hostname.domain is a FQDN or hostname.domain.tld is a FQDN. If the TLD is valid on the internet is not important to me. output of hostname -f

答:
```<code>for h in "bert" "ernie" "www.google.com"
do
    if [[ ${h//[^.]} != "" ]]
    then
        echo "$h contains ."
    else
        echo "$h doesn't contain ."
    fi
done
</code>```

if it supports regexp

```<code>if [[ $h =~ \. ]]; then
</code>```

Body:
#!/bin/bash

for h in "bert" "ernie" "www.google.com"
do
    host $h 2>&1 > /dev/null
    if [ $? -eq 0 ]
    then
        echo "$h is a FQDN"
    else
        echo "$h is not a FQDN"
    fi
done

Like to insert the output of 'hostname -f' instead of 'bert' or www.google.com
If the hostname is FQDN the script should continue, if not an error message should occur. PS. It is NOT important if the TLD exist or not. eg. hostname.domain is a FQDN or hostname.domain.tld is a FQDN. If the TLD is valid on the internet is not important to me. output of hostname -f

Body:
for h in "bert" "ernie" "www.google.com"
do
    if [[ ${h//[^.]} != "" ]]
    then
        echo "$h contains ."
    else
        echo "$h doesn't contain ."
    fi
done

if it supports regexp

if [[ $h =~ \. ]]; then


问:
how to create html table in php
I have the following snippet of code that basically uses explode to split out these values:

```<code><?php
$data=array();
$Inputfile = file("prod.txt");
foreach ($Inputfile as $line){
   $pieces = explode(";", $line);
   echo $pieces[0];
   echo $pieces[1];
   echo $pieces[2];
   echo $pieces[3];
//print_r($line);
}
?>
</code>```

Data: (prod.txt)

```<code>PREFIX=abc;PART=null;FILE=/myprojects/school/out/data/feed_abc_2010120810.gz2
PREFIX=efg;PART=sdsu;FILE=mail_efg.dat.2010120810.gz2
</code>```

Can someone show me how to put this in an HTML table dynamically, like this?? Is there an easy way to do this? Thanks.

```<code>PREFIX  PART   FILE
abc     null   /myprojects/school/out/data/feed_abc_2010120810.gz2
efg     sdsu   mail_efg.dat.2010120810.gz2
</code>```

答:
You've really got two problems here:

1) Parsing the information in each line into a record / associative array

2) Representing the series of these records/arrays as an HTML table.

Good code will separate these concerns somewhat.

```<code>function line2record($line) {
   $recordAA = array();
   $keyValuePairs = explode(';',$line);
   foreach($keyValuePairs as $kvp) {
       $pieces = explode('=',$kvp);
       $recordAA[$pieces[0]] = $pieces[1];
   }
   return $recordAA;
}

function record2TR($recordAA) {
   $str = implode('</td><td>',$recordAA);
   return "<tr><td>$str</td></tr>";
}
</code>```

After that, it's pretty much a matter of applying these two functions to each line of the file:

```<code>$Inputfile = file("prod.txt");
foreach ($Inputfile as $line)
    echo record2TR(line2record($line));
</code>```

To get the header row, and the table/open close markup, you might do something like this:

```<code>function record2TH($recordAA) {
    $headers = array_keys($recordAA);
    $str = implode('</th><th>',$headers);
    return "<tr><th>$str</th></tr>";
}
</code>```

and then:

```<code>$fp = fopen('prod.txt','r');
$line = fgets($fp,MAX_LINE_LENGTH);  // you'd set this constant
$firstRecord = line2record($line);
echo "<table>";
echo record2TH($firstRecord);
echo record2TR($firstRecord);
while($line = fgets($fp,MAX_LINE_LENGTH))
    echo record2TR(line2record($line));
echo "</table>";
</code>```

Title: how to create html table in php

Body:
I have the following snippet of code that basically uses explode to split out these values:

<?php
$data=array();
$Inputfile = file("prod.txt");
foreach ($Inputfile as $line){
   $pieces = explode(";", $line);
   echo $pieces[0];
   echo $pieces[1];
   echo $pieces[2];
   echo $pieces[3];
//print_r($line);
}
?>

Data: (prod.txt)

PREFIX=abc;PART=null;FILE=/myprojects/school/out/data/feed_abc_2010120810.gz2
PREFIX=efg;PART=sdsu;FILE=mail_efg.dat.2010120810.gz2

Can someone show me how to put this in an HTML table dynamically, like this?? Is there an easy way to do this? Thanks.

PREFIX  PART   FILE
abc     null   /myprojects/school/out/data/feed_abc_2010120810.gz2
efg     sdsu   mail_efg.dat.2010120810.gz2

Body:
You've really got two problems here:

1) Parsing the information in each line into a record / associative array

2) Representing the series of these records/arrays as an HTML table.

Good code will separate these concerns somewhat.

function line2record($line) {
   $recordAA = array();
   $keyValuePairs = explode(';',$line);
   foreach($keyValuePairs as $kvp) {
       $pieces = explode('=',$kvp);
       $recordAA[$pieces[0]] = $pieces[1];
   }
   return $recordAA;
}

function record2TR($recordAA) {
   $str = implode('</td><td>',$recordAA);
   return "<tr><td>$str</td></tr>";
}

After that, it's pretty much a matter of applying these two functions to each line of the file:

$Inputfile = file("prod.txt");
foreach ($Inputfile as $line)
    echo record2TR(line2record($line));

To get the header row, and the table/open close markup, you might do something like this:

function record2TH($recordAA) {
    $headers = array_keys($recordAA);
    $str = implode('</th><th>',$headers);
    return "<tr><th>$str</th></tr>";
}

and then:

$fp = fopen('prod.txt','r');
$line = fgets($fp,MAX_LINE_LENGTH);  // you'd set this constant
$firstRecord = line2record($line);
echo "<table>";
echo record2TH($firstRecord);
echo record2TR($firstRecord);
while($line = fgets($fp,MAX_LINE_LENGTH))
    echo record2TR(line2record($line));
echo "</table>";


问:
Loading tree nodes only when expanding nodes
I have a asp.net tree view control, which loads tree data on page load. Code given below:

```<code>protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DocEng.TreeProvider cmsTree = new DocEng.TreeProvider(MembershipContext.AuthenticatedUser);
                var node = cmsTree.SelectSingleNode(SiteContext.CurrentSiteName, "/", "en-US");
                DocEng.TreeNodeCollection myChildren = node.AllChildren;
                IEnumerable<DocEng.TreeNode> TreeNodes = myChildren.AsEnumerable<DocEng.TreeNode>();
                foreach (var tree in TreeNodes.Where(x => x.NodeLevel == 0))
                {
                    System.Web.UI.WebControls.TreeNode ParenTreeNode = new System.Web.UI.WebControls.TreeNode();
                    ParenTreeNode.Text = tree.NodeID.ToString() + ". " + SiteContext.CurrentSiteName;
                    ParenTreeNode.Value = tree.NodeID.ToString();
                    AddNodes(ParenTreeNode);
                    tvContentTree.Nodes.Add(ParenTreeNode);
                }
            }
        }

  /// <summary>
        /// Adding child for the parent
        /// </summary>
        /// <param name="TreeNode"></param>
        private void AddNodes(System.Web.UI.WebControls.TreeNode TreeNode)
        {
            DocEng.TreeProvider cmsTree = new DocEng.TreeProvider(MembershipContext.AuthenticatedUser);
            var node = cmsTree.SelectSingleNode(SiteContext.CurrentSiteName, "/", "en-US");
            DocEng.TreeNodeCollection myChildren = node.AllChildren;
            IEnumerable<DocEng.TreeNode> childTreeNodes = myChildren.AsEnumerable<DocEng.TreeNode>();
            foreach (var childTree in childTreeNodes.Where(x => x.NodeParentID == Convert.ToInt32(TreeNode.Value)))
            {
                System.Web.UI.WebControls.TreeNode ChildNode = new System.Web.UI.WebControls.TreeNode();
                ChildNode.Text = childTree.NodeID.ToString() + ". " + childTree.DocumentName.ToString();
                ChildNode.Value = childTree.NodeID.ToString();
                TreeNode.ChildNodes.Add(ChildNode);
                AddNodes(ChildNode);
                if (childTree.NodeLevel == 1)
                    ChildNode.Collapse();
            }
        }
</code>```

I need to rewrite this code, to load the data only when we expand the nodes. Moreover, while we expand, data should only populated to the clicked node and its children till the end.

答:
Try to Get only first level of nodes on Page-Load and foreach node add one empty child node, just to make it expandable.

Then after expanding remove this child node and populate it with normal children.

Body:
I have a asp.net tree view control, which loads tree data on page load. Code given below:

protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DocEng.TreeProvider cmsTree = new DocEng.TreeProvider(MembershipContext.AuthenticatedUser);
                var node = cmsTree.SelectSingleNode(SiteContext.CurrentSiteName, "/", "en-US");
                DocEng.TreeNodeCollection myChildren = node.AllChildren;
                IEnumerable<DocEng.TreeNode> TreeNodes = myChildren.AsEnumerable<DocEng.TreeNode>();
                foreach (var tree in TreeNodes.Where(x => x.NodeLevel == 0))
                {
                    System.Web.UI.WebControls.TreeNode ParenTreeNode = new System.Web.UI.WebControls.TreeNode();
                    ParenTreeNode.Text = tree.NodeID.ToString() + ". " + SiteContext.CurrentSiteName;
                    ParenTreeNode.Value = tree.NodeID.ToString();
                    AddNodes(ParenTreeNode);
                    tvContentTree.Nodes.Add(ParenTreeNode);
                }
            }
        }

  ///
        /// Adding child for the parent
        ///
        /// <param name="TreeNode"></param>
        private void AddNodes(System.Web.UI.WebControls.TreeNode TreeNode)
        {
            DocEng.TreeProvider cmsTree = new DocEng.TreeProvider(MembershipContext.AuthenticatedUser);
            var node = cmsTree.SelectSingleNode(SiteContext.CurrentSiteName, "/", "en-US");
            DocEng.TreeNodeCollection myChildren = node.AllChildren;
            IEnumerable<DocEng.TreeNode> childTreeNodes = myChildren.AsEnumerable<DocEng.TreeNode>();
            foreach (var childTree in childTreeNodes.Where(x => x.NodeParentID == Convert.ToInt32(TreeNode.Value)))
            {
                System.Web.UI.WebControls.TreeNode ChildNode = new System.Web.UI.WebControls.TreeNode();
                ChildNode.Text = childTree.NodeID.ToString() + ". " + childTree.DocumentName.ToString();
                ChildNode.Value = childTree.NodeID.ToString();
                TreeNode.ChildNodes.Add(ChildNode);
                AddNodes(ChildNode);
                if (childTree.NodeLevel == 1)
                    ChildNode.Collapse();
            }
        }

I need to rewrite this code, to load the data only when we expand the nodes. Moreover, while we expand, data should only populated to the clicked node and its children till the end.


问:
ReactJS not rerendering after setState
I have a simple ReactJS application that loads a list of users and shows a record for each user.

This is the component handling the loading of the users and showing them in a list, while the UserCard component will visualize the user information and allow for edits.

```<code>export default class UserManager extends React.Component {
constructor() {
    super();

    this.state = {
        users:[]
    };
};

componentDidMount() {
    this.loadUsers();
};

loadUsers() {
    $.getJSON('/api/users').then((data) => {
        this.setState({ users: data.items });
    });
};

render() {
    return (
        <div className="animated fadeIn">
            <div className="row">
                <div className="col-sm-8 col-md-10">
                    <div id="userslist" className="userlist" >
                        {
                            this.state.users.map((user) => {
                                <UserCard user={user} />
                            })
                        }
                    </div>
                </div>
            </div>
        </div>
    )
}
</code>```

}

I load the users on componentDidMount, and the api call returns successfully with all user data. The rendering of the users is however not triggered. The list will remain empty.

Am I missing something here? Do I have to trigger the rendering manually again?

答:
To add to @Mayank answer, you probably can do it without writing an explicit return statement, by using () instead of {} after the map function since it automatially returns the JSX inside it by default

```<code>        <div id="userslist" className="userlist" >
                    {
                        this.state.users.map((user) => (
                            <UserCard user={user} />
                        ))
                    }
                </div>
</code>```

Title: ReactJS not rerendering after setState

Body:
I have a simple ReactJS application that loads a list of users and shows a record for each user.

This is the component handling the loading of the users and showing them in a list, while the UserCard component will visualize the user information and allow for edits.

export default class UserManager extends React.Component {
constructor() {
    super();

    this.state = {
        users:[]
    };
};

componentDidMount() {
    this.loadUsers();
};

loadUsers() {
    $.getJSON('/api/users').then((data) => {
        this.setState({ users: data.items });
    });
};

render() {
    return (

                        {
                            this.state.users.map((user) => {
                                <UserCard user={user} />
                            })
                        }

    )
}

}

I load the users on componentDidMount, and the api call returns successfully with all user data. The rendering of the users is however not triggered. The list will remain empty.

Am I missing something here? Do I have to trigger the rendering manually again?

Body:
To add to @Mayank answer, you probably can do it without writing an explicit return statement, by using () instead of {} after the map function since it automatially returns the JSX inside it by default

        <div id="userslist" className="userlist" >
                    {
                        this.state.users.map((user) => (
                            <UserCard user={user} />
                        ))
                    }
                </div>