Solidus: Rake tasks errors with Bundler

Created on 4 Jan 2019  路  1Comment  路  Source: solidusio/solidus

~Bundler 2.0 has been released some days ago.~ _not related to Bundler version_ The Rakefile uses the Bundler constant for some tasks (e.g. rake sandbox) but it doesn't require bundler, causing such tasks to fail with the following error:

$ rake sandbox --trace
** Invoke sandbox (first_time)
** Execute sandbox
rake aborted!
NameError: uninitialized constant Bundler
/home/maurizio/Sviluppo/Nebulab/solidus/Rakefile:108:in `block in <top (required)>'
/home/maurizio/.asdf/installs/ruby/2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273:in `block in execute'
/home/maurizio/.asdf/installs/ruby/2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273:in `each'
/home/maurizio/.asdf/installs/ruby/2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273:in `execute'
/home/maurizio/.asdf/installs/ruby/2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:214:in `block in invoke_with_call_chain'
/home/maurizio/.asdf/installs/ruby/2.6.0/lib/ruby/2.6.0/monitor.rb:230:in `mon_synchronize'
/home/maurizio/.asdf/installs/ruby/2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:194:in `invoke_with_call_chain'
/home/maurizio/.asdf/installs/ruby/2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:183:in `invoke'
/home/maurizio/.asdf/installs/ruby/2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:160:in `invoke_task'
/home/maurizio/.asdf/installs/ruby/2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/home/maurizio/.asdf/installs/ruby/2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:116:in `each'
/home/maurizio/.asdf/installs/ruby/2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:116:in `block in top_level'
/home/maurizio/.asdf/installs/ruby/2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:125:in `run_with_threads'
/home/maurizio/.asdf/installs/ruby/2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:110:in `top_level'
/home/maurizio/.asdf/installs/ruby/2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:83:in `block in run'
/home/maurizio/.asdf/installs/ruby/2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exception_handling'
/home/maurizio/.asdf/installs/ruby/2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:80:in `run'
/home/maurizio/.asdf/installs/ruby/2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/home/maurizio/.asdf/installs/ruby/2.6.0/bin/rake:23:in `load'
/home/maurizio/.asdf/installs/ruby/2.6.0/bin/rake:23:in `<main>'
Tasks: TOP => sandbox

Steps to reproduce

gem install bundler -v '2.0.1'
rake sandbox

Expected behavior

The task should successfully complete

Actual behavior

The task fails showing the error above

System configuration

Solidus Version: 2.8.0.alpha / 942ec5cd663bebee033c6f397b54674a760ef846

Extensions in use: none

Bug

Most helpful comment

This is not related to Bundler 2.0 but to not running the command with bundle exec. The proposed fix is still needed though.

>All comments

This is not related to Bundler 2.0 but to not running the command with bundle exec. The proposed fix is still needed though.

Was this page helpful?
0 / 5 - 0 ratings