Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not detect rake tasks (LanguagePack::Helpers::RakeRunner::CannotLoadRakefileError) #3356

Closed
apextemple opened this issue Dec 5, 2018 · 12 comments
Labels

Comments

@apextemple
Copy link

Hi, @indirect, thanks for fixing the issue with s3! I'm currently facing the issue that the rake tasks are not detected. I tried everything on my end to make it work, but couldn't find any solution.

The error appears after all gems are installed, the it suddenly throws an error when it tries to detect the rake tasks. I tried 'bundle exec rake -P' and everything works fine.

I think this is the relevant part of the error:

remote: /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/helpers/rake_runner.rb:106:in `load_rake_tasks!': Could not detect rake tasks (LanguagePack::Helpers::RakeRunner::CannotLoadRakefileError)
remote: ensure you can run `$ bundle exec rake -P` against your app
remote: and using the production group of your Gemfile.
remote: rake aborted!
remote: LoadError: cannot load such file -- polyamorous/activerecord_5.2.2_ruby_2/join_association
@nikhilthombare
Copy link

nikhilthombare commented Dec 12, 2018

the same issue facing too me.

The latest bundler is 2.0.0.pre.2, but you are currently running 1.15.2.
To update, run gem install bundler --pre
-----> Installing node-v8.10.0-linux-x64
-----> Detecting rake tasks

!
! Argument list too long - logger -p user.notice -t "slugc[$$]" "buildpack-ruby compile id=934d949aab2 framework=rails41 status=error finish=1544624489.39 elapsed=14.33 message=Argument\ list\ too\ long\ -\ \ logger\ -p\ user.notice\ -t\ "slugc[$$]"\ "buildpack-ruby\ assets_precompile\ id=934d949aab2\ framework=rails41\ status=error\ finish=1544624489.33\ elapsed=1.40\ message=Could\\ not\\ detect\\ rake\\ tasks''
! ''ensure\\ you\\ can\\ run\\ \`\$\\ bundle\\ exec\\ rake\\ -P\`\\ against\\ your\\ app''
! ''and\\ using\\ the\\ production\\ group\\ of\\ your\\ Gemfile.''
! ''/tmp/build/vendor/bundle/ruby/2.4.0/gems/activesupport-4.1.2/lib/active_support/core_ext/numeric/conversions.rb:121:\\ warning:\\ constant\\ ::Fixnum\\ is\\ deprecated''
! ''/tmp/build/vendor/bundle/ruby/2.4.0/gems/activesupport-4.1.2/lib/active_support/core_ext/numeric/conversions.rb:121:\\ warning:\\ constant\\ ::Bignum\\ is\\ deprecated''
! ''rake\\ aborted\!''
! ''SystemStackError:\\ stack\\ level\\ too\\ deep''
! ''/tmp/build/vendor/bundle/ruby/2.4.0/gems/activesupport-4.1.2/lib/active_support/core_ext/numeric/conversions.rb:131:in\\ \`block\\ \(2\\ levels\)\\ in\\ \<class:Numeric\>\'''
! ''/tmp/build/vendor/bundle/ruby/2.4.0/gems/activesupport-4.1.2/lib/active_support/core_ext/numeric/conversions.rb:131:in\\ \`block\\ \(2\\ levels\)\\ in\\ \<class:Numeric\>\'''
! ''/tmp/build/vendor/bundle/ruby/2.4.0/gems/activesupport-4.1.2/lib/active_support/core_ext/numeric/conversions.rb:131:in\\ \`block\\ \(2\\ levels\)\\ in\\ \<class:Numeric\>\'''
! ''/tmp/build/vendor/bundle/ruby/2.4.0/gems/activesupport-4.1.2/lib/active_support/core_ext/numeric/conversions.rb:131:in\\ \`block\\ \(2\\ levels\)\\ in\\ \<class:Numeric\>\'''

ruby version - ruby 2.3.0p0
rails version - Rails 4.1.2
issue face while deploying app on dokku.

@apextemple
Copy link
Author

@nikhilthombare

The latest bundler is 2.0.0.pre.2, but you are currently running 1.15.2.

Make sure to install the right bundler version. You're currently running on 1.15.2

Try
gem uninstall bundler
and deinstall the old versions and then install the new one
gem install bundler -v 2.0.0.pre.2

Probably you'll need to run bundle install

And then make sure your lockfile is correct, everything should work.

@nikhilthombare
Copy link

@apextemple
Thanks for the help. I updated version but still getting the same error -

      Bundle completed (0.79s)
      Cleaning up the bundler cache.
-----> Installing node-v8.10.0-linux-x64
-----> Detecting rake tasks

      !
      !     Argument list too long -  logger -p user.notice -t "slugc[$$]" "buildpack-ruby compile id=1b965aeade5 framework=rails41 status=error finish=1544688822.83 elapsed=9.39 message=Argument\ list\ too\ long\ -\ \ logger\ -p\ user.notice\ -t\ \"slugc\[\$\$\]\"\ \"buildpack-ruby\ assets_precompile\ id\=1b965aeade5\ framework\=rails41\ status\=error\ finish\=1544688822.78\ elapsed\=1.45\ message\=Could\\\ not\\\ detect\\\ rake\\\ tasks\''
      !     '\'ensure\\\ you\\\ can\\\ run\\\ \\\`\\\$\\\ bundle\\\ exec\\\ rake\\\ -P\\\`\\\ against\\\ your\\\ app\''
      !     '\'and\\\ using\\\ the\\\ production\\\ group\\\ of\\\ your\\\ Gemfile.\''
      !     '\'/tmp/build/vendor/bundle/ruby/2.4.0/gems/activesupport-4.1.2/lib/active_support/core_ext/numeric/conversions.rb:121:\\\ warning:\\\ constant\\\ ::Fixnum\\\ is\\\ deprecated\''
      !     '\'/tmp/build/vendor/bundle/ruby/2.4.0/gems/activesupport-4.1.2/lib/active_support/core_ext/numeric/conversions.rb:121:\\\ warning:\\\ constant\\\ ::Bignum\\\ is\\\ deprecated\''
      !     '\'rake\\\ aborted\\\!\''
      !     '\'SystemStackError:\\\ stack\\\ level\\\ too\\\ deep\''
      !     '\'/tmp/build/vendor/bundle/ruby/2.4.0/gems/activesupport-4.1.2/lib/active_support/core_ext/numeric/conversions.rb:124:in\\\ \\\`block\\\ \\\(2\\\ levels\\\)\\\ in\\\ \\\<class:Numeric\\\>\\\'\''
      !     '\'/tmp/build/vendor/bundle/ruby/2.4.0/gems/activesupport-4.1.2/lib/active_support/core_ext/numeric/conversions.rb:131:in\\\ \\\`block\\\ \\\(2\\\ levels\\\)\\\ in\\\ \\\<class:Numeric\\\>\\\'\''

colby-swandale referenced this issue in rubygems/bundler Dec 26, 2018
Some code that used to be unreachable was changed in https://github.com/bundler/bundler/issues/6829. This is causing some issues on some versions of Ruby, see #6849.
ghost referenced this issue in rubygems/bundler Dec 27, 2018
6849: revert commit b490e73 r=colby-swandale a=colby-swandale

### What was the end-user problem that led to this PR?

There is a *really* obscure bug in Bundler that is causing deploys in Heroku to fail for certain environments. 

The environment in this case being Ruby 1.9.3 and RubyGems 1.8

I also think that this is the same bug causing https://github.com/bundler/bundler/issues/6829

### What was your diagnosis of the problem?

See https://gist.github.com/schneems/0247e3d5c3e079ecffd7cd10887c3cc9

### What is your fix for the problem, implemented in this PR?

Revert the commit that was causing this bug. The original PR can be found at #6687

I can confirm the fix by being able to deploy to Heroku succesfully using Bundler 1.17.2 + the commit to revert the change being applied on top.

```
$ git push heroku master
Enumerating objects: 87, done.
Counting objects: 100% (87/87), done.
Delta compression using up to 4 threads
Compressing objects: 100% (72/72), done.
Writing objects: 100% (87/87), 28.14 KiB | 1.48 MiB/s, done.
Total 87 (delta 13), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-1.9.3
remote: -----> Installing dependencies using bundler 1.17.2
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:        Fetching gem metadata from https://rubygems.org/..........
remote:        RubyGems 1.8.23.2 is not threadsafe, so your gems will be installed one at a time. Upgrade to RubyGems 2.1.0 or higher to enable parallel gem installation.
remote:        Fetching rake 10.0.3
remote:        Installing rake 10.0.3
remote:        Fetching i18n 0.6.1
remote:        Installing i18n 0.6.1
remote:        Fetching multi_json 1.5.0
remote:        Installing multi_json 1.5.0
remote:        Fetching activesupport 3.2.11
remote:        Installing activesupport 3.2.11
remote:        Fetching builder 3.0.4
remote:        Installing builder 3.0.4
remote:        Fetching activemodel 3.2.11
remote:        Installing activemodel 3.2.11
remote:        Fetching erubis 2.7.0
remote:        Installing erubis 2.7.0
remote:        Fetching journey 1.0.4
remote:        Installing journey 1.0.4
remote:        Fetching rack 1.4.4
remote:        Installing rack 1.4.4
remote:        Fetching rack-cache 1.2
remote:        Installing rack-cache 1.2
remote:        Fetching rack-test 0.6.2
remote:        Installing rack-test 0.6.2
remote:        Fetching hike 1.2.1
remote:        Installing hike 1.2.1
remote:        Fetching tilt 1.3.3
remote:        Installing tilt 1.3.3
remote:        Fetching sprockets 2.2.2
remote:        Installing sprockets 2.2.2
remote:        Fetching actionpack 3.2.11
remote:        Installing actionpack 3.2.11
remote:        Fetching mime-types 1.19
remote:        Installing mime-types 1.19
remote:        Fetching polyglot 0.3.3
remote:        Installing polyglot 0.3.3
remote:        Fetching treetop 1.4.12
remote:        Installing treetop 1.4.12
remote:        Fetching mail 2.4.4
remote:        Installing mail 2.4.4
remote:        Fetching actionmailer 3.2.11
remote:        Installing actionmailer 3.2.11
remote:        Fetching arel 3.0.2
remote:        Installing arel 3.0.2
remote:        Fetching tzinfo 0.3.35
remote:        Installing tzinfo 0.3.35
remote:        Fetching activerecord 3.2.11
remote:        Installing activerecord 3.2.11
remote:        Fetching activeresource 3.2.11
remote:        Installing activeresource 3.2.11
remote:        Using bundler 1.17.2
remote:        Fetching coffee-script-source 1.4.0
remote:        Installing coffee-script-source 1.4.0
remote:        Fetching execjs 1.4.0
remote:        Installing execjs 1.4.0
remote:        Fetching coffee-script 2.2.0
remote:        Installing coffee-script 2.2.0
remote:        Fetching rack-ssl 1.3.2
remote:        Installing rack-ssl 1.3.2
remote:        Fetching json 1.7.6
remote:        Installing json 1.7.6 with native extensions
remote:        Fetching rdoc 3.12
remote:        Installing rdoc 3.12
remote:        Fetching thor 0.16.0
remote:        Installing thor 0.16.0
remote:        Fetching railties 3.2.11
remote:        Installing railties 3.2.11
remote:        Fetching coffee-rails 3.2.2
remote:        Installing coffee-rails 3.2.2
remote:        Fetching jquery-rails 2.2.0
remote:        Installing jquery-rails 2.2.0
remote:        Fetching pg 0.14.1
remote:        Installing pg 0.14.1 with native extensions
remote:        Fetching rails 3.2.11
remote:        Installing rails 3.2.11
remote:        Fetching sass 3.2.5
remote:        Installing sass 3.2.5
remote:        Fetching sass-rails 3.2.6
remote:        Installing sass-rails 3.2.6
remote:        Fetching uglifier 1.3.0
remote:        Installing uglifier 1.3.0
remote:        Bundle complete! 6 Gemfile dependencies, 40 gems now installed.
remote:        Gems in the groups development and test were not installed.
remote:        Bundled gems are installed into `./vendor/bundle`
remote:        Post-install message from rdoc:
remote:        Depending on your version of ruby, you may need to install ruby rdoc/ri data:
remote:
remote:        <= 1.8.6 : unsupported
remote:         = 1.8.7 : gem install rdoc-data; rdoc-data --install
remote:         = 1.9.1 : gem install rdoc-data; rdoc-data --install
remote:        >= 1.9.2 : nothing to do! Yay!
remote:        Bundle completed (14.08s)
remote:        Cleaning up the bundler cache.
remote: -----> Writing config/database.yml to read from DATABASE_URL
remote: -----> Installing node-v8.10.0-linux-x64
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_d734e3b0c78f48698e0d4217410bcdd9/Rakefile:7)
remote:        DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_d734e3b0c78f48698e0d4217410bcdd9/Rakefile:7)
remote:        DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_d734e3b0c78f48698e0d4217410bcdd9/Rakefile:7)
remote:        DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_d734e3b0c78f48698e0d4217410bcdd9/Rakefile:7)
remote:        Asset precompilation completed (6.29s)
remote: -----> Detecting rails configuration
remote:
remote: ###### WARNING:
remote:
remote:        Injecting plugin 'rails_log_stdout'
remote:
remote: ###### WARNING:
remote:
remote:        Injecting plugin 'rails3_serve_static_assets'
remote:
remote: ###### WARNING:
remote:
remote:        Add 'rails_12factor' gem to your Gemfile to skip plugin injection
remote:
remote: ###### WARNING:
remote:
remote:        No Procfile detected, using the default web server.
remote:        We recommend explicitly declaring how to boot your server process via a Procfile.
remote:        https://devcenter.heroku.com/articles/ruby-default-web-server
remote:
remote:
remote: -----> Discovering process types
remote:        Procfile declares types     -> (none)
remote:        Default types for buildpack -> console, rake, web
remote:
remote: -----> Compressing...
remote:        Done: 31.9M
remote: -----> Launching...
remote:        Released v6
remote:        https://glacial-ravine-68630.herokuapp.com/ deployed to Heroku
remote:
remote:  !   Warning: You are running on a deprecated stack.
remote:  !   Please upgrade to the latest stack by following the instructions on:
remote:  !   https://devcenter.heroku.com/articles/upgrading-to-the-latest-stack
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/glacial-ravine-68630.git
 * [new branch]      master -> master
```



Co-authored-by: Colby Swandale <me@colby.fyi>
colby-swandale referenced this issue in rubygems/bundler Dec 27, 2018
6849: revert commit b490e73 r=colby-swandale a=colby-swandale

### What was the end-user problem that led to this PR?

There is a *really* obscure bug in Bundler that is causing deploys in Heroku to fail for certain environments. 

The environment in this case being Ruby 1.9.3 and RubyGems 1.8

I also think that this is the same bug causing https://github.com/bundler/bundler/issues/6829

### What was your diagnosis of the problem?

See https://gist.github.com/schneems/0247e3d5c3e079ecffd7cd10887c3cc9

### What is your fix for the problem, implemented in this PR?

Revert the commit that was causing this bug. The original PR can be found at #6687

I can confirm the fix by being able to deploy to Heroku succesfully using Bundler 1.17.2 + the commit to revert the change being applied on top.

```
$ git push heroku master
Enumerating objects: 87, done.
Counting objects: 100% (87/87), done.
Delta compression using up to 4 threads
Compressing objects: 100% (72/72), done.
Writing objects: 100% (87/87), 28.14 KiB | 1.48 MiB/s, done.
Total 87 (delta 13), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-1.9.3
remote: -----> Installing dependencies using bundler 1.17.2
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:        Fetching gem metadata from https://rubygems.org/..........
remote:        RubyGems 1.8.23.2 is not threadsafe, so your gems will be installed one at a time. Upgrade to RubyGems 2.1.0 or higher to enable parallel gem installation.
remote:        Fetching rake 10.0.3
remote:        Installing rake 10.0.3
remote:        Fetching i18n 0.6.1
remote:        Installing i18n 0.6.1
remote:        Fetching multi_json 1.5.0
remote:        Installing multi_json 1.5.0
remote:        Fetching activesupport 3.2.11
remote:        Installing activesupport 3.2.11
remote:        Fetching builder 3.0.4
remote:        Installing builder 3.0.4
remote:        Fetching activemodel 3.2.11
remote:        Installing activemodel 3.2.11
remote:        Fetching erubis 2.7.0
remote:        Installing erubis 2.7.0
remote:        Fetching journey 1.0.4
remote:        Installing journey 1.0.4
remote:        Fetching rack 1.4.4
remote:        Installing rack 1.4.4
remote:        Fetching rack-cache 1.2
remote:        Installing rack-cache 1.2
remote:        Fetching rack-test 0.6.2
remote:        Installing rack-test 0.6.2
remote:        Fetching hike 1.2.1
remote:        Installing hike 1.2.1
remote:        Fetching tilt 1.3.3
remote:        Installing tilt 1.3.3
remote:        Fetching sprockets 2.2.2
remote:        Installing sprockets 2.2.2
remote:        Fetching actionpack 3.2.11
remote:        Installing actionpack 3.2.11
remote:        Fetching mime-types 1.19
remote:        Installing mime-types 1.19
remote:        Fetching polyglot 0.3.3
remote:        Installing polyglot 0.3.3
remote:        Fetching treetop 1.4.12
remote:        Installing treetop 1.4.12
remote:        Fetching mail 2.4.4
remote:        Installing mail 2.4.4
remote:        Fetching actionmailer 3.2.11
remote:        Installing actionmailer 3.2.11
remote:        Fetching arel 3.0.2
remote:        Installing arel 3.0.2
remote:        Fetching tzinfo 0.3.35
remote:        Installing tzinfo 0.3.35
remote:        Fetching activerecord 3.2.11
remote:        Installing activerecord 3.2.11
remote:        Fetching activeresource 3.2.11
remote:        Installing activeresource 3.2.11
remote:        Using bundler 1.17.2
remote:        Fetching coffee-script-source 1.4.0
remote:        Installing coffee-script-source 1.4.0
remote:        Fetching execjs 1.4.0
remote:        Installing execjs 1.4.0
remote:        Fetching coffee-script 2.2.0
remote:        Installing coffee-script 2.2.0
remote:        Fetching rack-ssl 1.3.2
remote:        Installing rack-ssl 1.3.2
remote:        Fetching json 1.7.6
remote:        Installing json 1.7.6 with native extensions
remote:        Fetching rdoc 3.12
remote:        Installing rdoc 3.12
remote:        Fetching thor 0.16.0
remote:        Installing thor 0.16.0
remote:        Fetching railties 3.2.11
remote:        Installing railties 3.2.11
remote:        Fetching coffee-rails 3.2.2
remote:        Installing coffee-rails 3.2.2
remote:        Fetching jquery-rails 2.2.0
remote:        Installing jquery-rails 2.2.0
remote:        Fetching pg 0.14.1
remote:        Installing pg 0.14.1 with native extensions
remote:        Fetching rails 3.2.11
remote:        Installing rails 3.2.11
remote:        Fetching sass 3.2.5
remote:        Installing sass 3.2.5
remote:        Fetching sass-rails 3.2.6
remote:        Installing sass-rails 3.2.6
remote:        Fetching uglifier 1.3.0
remote:        Installing uglifier 1.3.0
remote:        Bundle complete! 6 Gemfile dependencies, 40 gems now installed.
remote:        Gems in the groups development and test were not installed.
remote:        Bundled gems are installed into `./vendor/bundle`
remote:        Post-install message from rdoc:
remote:        Depending on your version of ruby, you may need to install ruby rdoc/ri data:
remote:
remote:        <= 1.8.6 : unsupported
remote:         = 1.8.7 : gem install rdoc-data; rdoc-data --install
remote:         = 1.9.1 : gem install rdoc-data; rdoc-data --install
remote:        >= 1.9.2 : nothing to do! Yay!
remote:        Bundle completed (14.08s)
remote:        Cleaning up the bundler cache.
remote: -----> Writing config/database.yml to read from DATABASE_URL
remote: -----> Installing node-v8.10.0-linux-x64
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_d734e3b0c78f48698e0d4217410bcdd9/Rakefile:7)
remote:        DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_d734e3b0c78f48698e0d4217410bcdd9/Rakefile:7)
remote:        DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_d734e3b0c78f48698e0d4217410bcdd9/Rakefile:7)
remote:        DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_d734e3b0c78f48698e0d4217410bcdd9/Rakefile:7)
remote:        Asset precompilation completed (6.29s)
remote: -----> Detecting rails configuration
remote:
remote: ###### WARNING:
remote:
remote:        Injecting plugin 'rails_log_stdout'
remote:
remote: ###### WARNING:
remote:
remote:        Injecting plugin 'rails3_serve_static_assets'
remote:
remote: ###### WARNING:
remote:
remote:        Add 'rails_12factor' gem to your Gemfile to skip plugin injection
remote:
remote: ###### WARNING:
remote:
remote:        No Procfile detected, using the default web server.
remote:        We recommend explicitly declaring how to boot your server process via a Procfile.
remote:        https://devcenter.heroku.com/articles/ruby-default-web-server
remote:
remote:
remote: -----> Discovering process types
remote:        Procfile declares types     -> (none)
remote:        Default types for buildpack -> console, rake, web
remote:
remote: -----> Compressing...
remote:        Done: 31.9M
remote: -----> Launching...
remote:        Released v6
remote:        https://glacial-ravine-68630.herokuapp.com/ deployed to Heroku
remote:
remote:  !   Warning: You are running on a deprecated stack.
remote:  !   Please upgrade to the latest stack by following the instructions on:
remote:  !   https://devcenter.heroku.com/articles/upgrading-to-the-latest-stack
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/glacial-ravine-68630.git
 * [new branch]      master -> master
```



Co-authored-by: Colby Swandale <me@colby.fyi>
(cherry picked from commit c3ba633)
colby-swandale referenced this issue in rubygems/bundler Dec 28, 2018
6849: revert commit b490e73 r=colby-swandale a=colby-swandale

### What was the end-user problem that led to this PR?

There is a *really* obscure bug in Bundler that is causing deploys in Heroku to fail for certain environments. 

The environment in this case being Ruby 1.9.3 and RubyGems 1.8

I also think that this is the same bug causing https://github.com/bundler/bundler/issues/6829

### What was your diagnosis of the problem?

See https://gist.github.com/schneems/0247e3d5c3e079ecffd7cd10887c3cc9

### What is your fix for the problem, implemented in this PR?

Revert the commit that was causing this bug. The original PR can be found at #6687

I can confirm the fix by being able to deploy to Heroku succesfully using Bundler 1.17.2 + the commit to revert the change being applied on top.

```
$ git push heroku master
Enumerating objects: 87, done.
Counting objects: 100% (87/87), done.
Delta compression using up to 4 threads
Compressing objects: 100% (72/72), done.
Writing objects: 100% (87/87), 28.14 KiB | 1.48 MiB/s, done.
Total 87 (delta 13), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-1.9.3
remote: -----> Installing dependencies using bundler 1.17.2
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:        Fetching gem metadata from https://rubygems.org/..........
remote:        RubyGems 1.8.23.2 is not threadsafe, so your gems will be installed one at a time. Upgrade to RubyGems 2.1.0 or higher to enable parallel gem installation.
remote:        Fetching rake 10.0.3
remote:        Installing rake 10.0.3
remote:        Fetching i18n 0.6.1
remote:        Installing i18n 0.6.1
remote:        Fetching multi_json 1.5.0
remote:        Installing multi_json 1.5.0
remote:        Fetching activesupport 3.2.11
remote:        Installing activesupport 3.2.11
remote:        Fetching builder 3.0.4
remote:        Installing builder 3.0.4
remote:        Fetching activemodel 3.2.11
remote:        Installing activemodel 3.2.11
remote:        Fetching erubis 2.7.0
remote:        Installing erubis 2.7.0
remote:        Fetching journey 1.0.4
remote:        Installing journey 1.0.4
remote:        Fetching rack 1.4.4
remote:        Installing rack 1.4.4
remote:        Fetching rack-cache 1.2
remote:        Installing rack-cache 1.2
remote:        Fetching rack-test 0.6.2
remote:        Installing rack-test 0.6.2
remote:        Fetching hike 1.2.1
remote:        Installing hike 1.2.1
remote:        Fetching tilt 1.3.3
remote:        Installing tilt 1.3.3
remote:        Fetching sprockets 2.2.2
remote:        Installing sprockets 2.2.2
remote:        Fetching actionpack 3.2.11
remote:        Installing actionpack 3.2.11
remote:        Fetching mime-types 1.19
remote:        Installing mime-types 1.19
remote:        Fetching polyglot 0.3.3
remote:        Installing polyglot 0.3.3
remote:        Fetching treetop 1.4.12
remote:        Installing treetop 1.4.12
remote:        Fetching mail 2.4.4
remote:        Installing mail 2.4.4
remote:        Fetching actionmailer 3.2.11
remote:        Installing actionmailer 3.2.11
remote:        Fetching arel 3.0.2
remote:        Installing arel 3.0.2
remote:        Fetching tzinfo 0.3.35
remote:        Installing tzinfo 0.3.35
remote:        Fetching activerecord 3.2.11
remote:        Installing activerecord 3.2.11
remote:        Fetching activeresource 3.2.11
remote:        Installing activeresource 3.2.11
remote:        Using bundler 1.17.2
remote:        Fetching coffee-script-source 1.4.0
remote:        Installing coffee-script-source 1.4.0
remote:        Fetching execjs 1.4.0
remote:        Installing execjs 1.4.0
remote:        Fetching coffee-script 2.2.0
remote:        Installing coffee-script 2.2.0
remote:        Fetching rack-ssl 1.3.2
remote:        Installing rack-ssl 1.3.2
remote:        Fetching json 1.7.6
remote:        Installing json 1.7.6 with native extensions
remote:        Fetching rdoc 3.12
remote:        Installing rdoc 3.12
remote:        Fetching thor 0.16.0
remote:        Installing thor 0.16.0
remote:        Fetching railties 3.2.11
remote:        Installing railties 3.2.11
remote:        Fetching coffee-rails 3.2.2
remote:        Installing coffee-rails 3.2.2
remote:        Fetching jquery-rails 2.2.0
remote:        Installing jquery-rails 2.2.0
remote:        Fetching pg 0.14.1
remote:        Installing pg 0.14.1 with native extensions
remote:        Fetching rails 3.2.11
remote:        Installing rails 3.2.11
remote:        Fetching sass 3.2.5
remote:        Installing sass 3.2.5
remote:        Fetching sass-rails 3.2.6
remote:        Installing sass-rails 3.2.6
remote:        Fetching uglifier 1.3.0
remote:        Installing uglifier 1.3.0
remote:        Bundle complete! 6 Gemfile dependencies, 40 gems now installed.
remote:        Gems in the groups development and test were not installed.
remote:        Bundled gems are installed into `./vendor/bundle`
remote:        Post-install message from rdoc:
remote:        Depending on your version of ruby, you may need to install ruby rdoc/ri data:
remote:
remote:        <= 1.8.6 : unsupported
remote:         = 1.8.7 : gem install rdoc-data; rdoc-data --install
remote:         = 1.9.1 : gem install rdoc-data; rdoc-data --install
remote:        >= 1.9.2 : nothing to do! Yay!
remote:        Bundle completed (14.08s)
remote:        Cleaning up the bundler cache.
remote: -----> Writing config/database.yml to read from DATABASE_URL
remote: -----> Installing node-v8.10.0-linux-x64
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_d734e3b0c78f48698e0d4217410bcdd9/Rakefile:7)
remote:        DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_d734e3b0c78f48698e0d4217410bcdd9/Rakefile:7)
remote:        DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_d734e3b0c78f48698e0d4217410bcdd9/Rakefile:7)
remote:        DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_d734e3b0c78f48698e0d4217410bcdd9/Rakefile:7)
remote:        Asset precompilation completed (6.29s)
remote: -----> Detecting rails configuration
remote:
remote: ###### WARNING:
remote:
remote:        Injecting plugin 'rails_log_stdout'
remote:
remote: ###### WARNING:
remote:
remote:        Injecting plugin 'rails3_serve_static_assets'
remote:
remote: ###### WARNING:
remote:
remote:        Add 'rails_12factor' gem to your Gemfile to skip plugin injection
remote:
remote: ###### WARNING:
remote:
remote:        No Procfile detected, using the default web server.
remote:        We recommend explicitly declaring how to boot your server process via a Procfile.
remote:        https://devcenter.heroku.com/articles/ruby-default-web-server
remote:
remote:
remote: -----> Discovering process types
remote:        Procfile declares types     -> (none)
remote:        Default types for buildpack -> console, rake, web
remote:
remote: -----> Compressing...
remote:        Done: 31.9M
remote: -----> Launching...
remote:        Released v6
remote:        https://glacial-ravine-68630.herokuapp.com/ deployed to Heroku
remote:
remote:  !   Warning: You are running on a deprecated stack.
remote:  !   Please upgrade to the latest stack by following the instructions on:
remote:  !   https://devcenter.heroku.com/articles/upgrading-to-the-latest-stack
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/glacial-ravine-68630.git
 * [new branch]      master -> master
```



Co-authored-by: Colby Swandale <me@colby.fyi>
(cherry picked from commit c3ba633)
@ArisNance
Copy link

I have the same problem. How was this fixed? Any help is appreciated.

@apextemple
Copy link
Author

Could possibly send me the error?

@alldiezzz
Copy link

I have same issue here,
-----> Installing node-v10.15.3-linux-x64
-----> Detecting rake tasks
!
! Could not detect rake tasks
! ensure you can run $ bundle exec rake -P against your app
! and using the production group of your Gemfile.
! Activating bundler (2.0.1) failed:
! Could not find 'bundler' (2.0.1) required by your /tmp/build_1ebd7f39ecd7dd10dab6be41f433b13a/Gemfile.lock.
! To update to the latest version installed on your system, run bundle update --bundler.
! To install the missing version, run gem install bundler:2.0.1
! Checked in 'GEM_PATH=vendor/bundle/ruby/2.5.0', execute gem env for more information
!
! To install the version of bundler this project requires, run gem install bundler -v '2.0.1'
!
/app/tmp/buildpacks/b7af5642714be4eddaa5f35e2b4c36176b839b4abcd9bfe57ee71c358d71152b4fd2cf925c5b6e6816adee359c4f0f966b663a7f8649b0729509d510091abc07/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 -Pagainst your app and using the production group of your Gemfile. Activating bundler (2.0.1) failed: Could not find 'bundler' (2.0.1) required by your /tmp/build_1ebd7f39ecd7dd10dab6be41f433b13a/Gemfile.lock. To update to the latest version installed on your system, runbundle update --bundler. To install the missing version, run gem install bundler:2.0.1Checked in 'GEM_PATH=vendor/bundle/ruby/2.5.0', executegem envfor more information To install the version of bundler this project requires, rungem install bundler -v '2.0.1'`
from

@Zakkski
Copy link

Zakkski commented Jul 21, 2019

Also getting the same error as above. Any help would be appreciated!

@murtali
Copy link

murtali commented Aug 13, 2019

What do you get when you run bundler -v?

When I ran it I got:

bundler -v
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Bundler version 2.0.1

I then ran bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java which updated the Gemlock file.

This fixed the error and I was able to successfully deploy.

@jonbarlo
Copy link

Hey guys i have just found that Bundler version 2.0.1 is conflictive with heroku so using Bundler version 2.0.2 might fix the issue at least that was my case

  • gem install bundler -v 2.0.2
  • bundle update --bundler
  • commit & push Gemfile.lock changes in your repo
  • deploy with git push heroku master

that did the trick in my case hope it helps someone else!

@chrisyuaners
Copy link

Hey guys i have just found that Bundler version 2.0.1 is conflictive with heroku so using Bundler version 2.0.2 might fix the issue at least that was my case

  • gem install bundler -v 2.0.2
  • bundle update --bundler
  • commit & push Gemfile.lock changes in your repo
  • deploy with git push heroku master

that did the trick in my case hope it helps someone else!

had the same issue and this worked for me! thanks!

@andicooxy
Copy link

Hey guys i have just found that Bundler version 2.0.1 is conflictive with heroku so using Bundler version 2.0.2 might fix the issue at least that was my case

* `gem install bundler -v 2.0.2`

* `bundle update --bundler`

* commit & push `Gemfile.lock` changes in your repo

* deploy with `git push heroku master`

Hey I followed and it even worked without installing bundler -v 2.0.2`, thanks
that did the trick in my case hope it helps someone else!

@hsbt hsbt transferred this issue from rubygems/bundler Mar 14, 2020
@bronzdoc
Copy link
Member

bronzdoc commented Mar 22, 2020

Closing since it's fixed in bundler 2.0.2 otherwise please let us know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests