Scaffolding-ruby: Ruby app types not yet supported with this Scaffolding?

scaffoldings
ruby
#1

We are packaging up a rails app and hab studio is erroring out on build( see message below).

Our plan.sh is using pkg_scaffolding="core/scaffolding-ruby"and scaffolding_ruby_pkg=core/ruby24/2.4.5. The ruby version is also declared in the Gemfile, and in a .ruby-version file at 2.4.5. It seems that hab is skipping/ignoring the ruby version specified.

There is a github issue that states that the core/bundler package are built against core/ruby packages and NOT core/rubyXX… https://github.com/habitat-sh/core-plans/issues/2196 Not sure if this is related or if it is even causing the issue.

This problem surfaced last week with no changes to the plan. So what changed between March 7th (last successful build ), and now?

I am unsure of how to progress, Any assistance or ideas would be greatly appreciated.

relevant error output:

☛ Verifying core/bundler/1.17.3/20190305221319
✓ Installed core/ruby/2.5.3/20190305212319
✓ Installed core/scaffolding-ruby/0.8.10/20190305234820
★ Install of core/scaffolding-ruby/0.8.10/20190305234820 complete with 10 new packages installed.
   careers: Resolved scaffolding dependency 'core/scaffolding-ruby' to /hab/pkgs/core/scaffolding-ruby/0.8.10/20190305234820
   careers: Loading Scaffolding /hab/pkgs/core/scaffolding-ruby/0.8.10/20190305234820/lib/scaffolding.sh
Traceback (most recent call last):
        2: from /hab/pkgs/core/bundler/1.17.3/20190305221319/bin/bundle.real:23:in `<main>'
        1: from /hab/pkgs/core/ruby/2.5.3/20190305212319/lib/ruby/site_ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
/hab/pkgs/core/ruby/2.5.3/20190305212319/lib/ruby/site_ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)
   careers: Detected Ruby app type
   careers: WARN: Ruby app types not yet supported with this Scaffolding
   careers: ERROR: App type not supported
   careers: Build time: 0m25s
   careers: Exiting on error
0 Likes

#2

This is causing me some heartache as well. I’ve been playing around with the idea of upgrading scaffolding-ruby's dependency on core/ruby to 2.6 which would more tightly couple bundler with rubygems and also eleminate the core/bundler dependency. This is driven by my suspicion that something weird is going on with the GEM_PATH between how scaffolding-ruby sets up and how my project builds which I don’t understand yet.

So, after changing scaffolding-ruby to use core/ruby26 and removing core/bundler I am able to get past this error, but now I have another one:

✓ Installed cattywampus/scaffolding-ruby/0.9.0/20190328034013
★ Install of cattywampus/scaffolding-ruby/0.9.0/20190328034013 complete with 1 new packages installed.
   careers: Resolved scaffolding dependency 'cattywampus/scaffolding-ruby' to /hab/pkgs/cattywampus/scaffolding-ruby/0.9.0/20190328034013
   careers: Loading Scaffolding /hab/pkgs/cattywampus/scaffolding-ruby/0.9.0/20190328034013/lib/scaffolding.sh
   careers: Detected Ruby app type
   careers: WARN: Ruby app types not yet supported with this Scaffolding
   careers: ERROR: App type not supported
   careers: Build time: 0m2s
   careers: Exiting on error

Still digging, but any other help or expertise in ruby, scaffolding, etc would be very helpful

/cc @robbkidd @nellshamrell

0 Likes

#3

Our rails app was bundled with version 2.0.X locally.
So on a hunch I deleted the BUNDLED WITH 2.0.X from the end of our Gemfile.lock and ran build again.
It worked, Zero errors…
Changing this line to BUNDLED WITH 1.17.3 , the current version of core/bundler, also worked and produced a successful build. Testing so far is not showing any issues. I changed my local version of bundler to 1.17.3 to avoid further issues.

I was able to reproduce this issue using rails new and bootstrapping a basic rail app. If you are using bundler version 2.0 this error will happen when running a build in hab studio.

0 Likes