redhat-rcue / rcue

Red Hat Common User Interface (RCUE) reference implementation
Other
26 stars 16 forks source link

Gruntfile should build Jekyll dependencies through bundler #70

Closed jawnsy closed 7 years ago

jawnsy commented 7 years ago

PatternFly's build installs Ruby dependencies with bundler and then builds the Jekyll dependencies using bundle exec:

Running "run:bundleInstall" (run) task
Using addressable 2.4.0

...

Running "jekyll:tests" (jekyll) task
`bundle exec jekyll build --source tests/pages --destination dist/tests` was initiated.

RCUE, however, does not seem to manage Ruby gem (bundler) dependencies the same way, leading to this error when running grunt-build (after installing rubygem-jekyll on Fedora 25):

Running "jekyll:tests" (jekyll) task
>> Error: Command failed: jekyll -v
>> WARN: Unresolved specs during Gem::Specification.reset:
>>       listen (~> 3.0)
>> WARN: Clearing out unresolved specs.
>> Please report a bug if this causes problems.
>> /home/jawnsy/.gem/ruby/gems/bundler-1.14.6/lib/bundler/runtime.rb:40:in `block in setup': You have already activated addressable 2.5.0, but your Gemfile requires addressable 2.4.0. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
>>  from /home/jawnsy/.gem/ruby/gems/bundler-1.14.6/lib/bundler/runtime.rb:25:in `map'
>>  from /home/jawnsy/.gem/ruby/gems/bundler-1.14.6/lib/bundler/runtime.rb:25:in `setup'
>>  from /home/jawnsy/.gem/ruby/gems/bundler-1.14.6/lib/bundler.rb:100:in `setup'
>>  from /home/jawnsy/.gem/ruby/gems/jekyll-3.3.0/lib/jekyll/plugin_manager.rb:36:in `require_from_bundler'
>>  from /home/jawnsy/.gem/ruby/gems/jekyll-3.3.0/exe/jekyll:9:in `<top (required)>'
>>  from /bin/jekyll:23:in `load'
>>  from /bin/jekyll:23:in `<main>'
Warning: Please install Jekyll before running this task. Use --force to continue.

Aborted due to warnings.

Note that this is running jekyll directly rather than bundle exec jekyll, as PatternFly's build does. I'd like to propose copying PatternFly's build steps over to RCUE, and I'm happy to submit a PR for doing that.

WORKAROUND

An easy workaround for now is to run the whole build through bundler (bundle exec grunt build), or only run the grunt less target.

andresgalante commented 7 years ago

@bleathem you should take a look at this when you have time