Webpacker: Hardcoded rake path, rake not found

Created on 5 Sep 2017  路  8Comments  路  Source: rails/webpacker

When I run webpacker:install it crashes with

ruby: No such file or directory -- rake (LoadError)

I do not have rake installed in /bin, it's in /usr/bin. I'm on CentOs.

Most helpful comment

Please run this: bundle install --binstubs to generate binstubs

All 8 comments

Why don't you have rake in /bin? Which version of rails are you using?

I'm on a vagrant machine, using rails 4.2.7

Please run this: bundle install --binstubs to generate binstubs

Thank you @gauravtiwari, this helped!

bundle binstubs rake --path bin
bundle exec rake webpacker:install

Now works!

Great 馃憤

I've got one last question, why are the bin not in $root$/bin rather than $root$/lib/install/bin?

Moving the bin to $root$/bin would allow me to do bundle binstubs webpacker and I could then avoid to generate all this files that I don't need.

@roine Because we add those binstubs through installer - webpacker:install and not bundle binstubs (atleast at this point)

@gauravtiwari Couldn't webpacker:install access the $root$/bin directory instead.

I'm trying to set things up for a pre existing webpack with elm code base and having to install all this stuff isn't convenient for me.

Also webpacker:install:elm requires to have run webpacker:install before because it requires the bins.

If I could run bundle binstubs webpacker I could then do the rest of the configuration manually.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

suhomlineugene picture suhomlineugene  路  3Comments

eriknygren picture eriknygren  路  3Comments

FrankFang picture FrankFang  路  3Comments

amandapouget picture amandapouget  路  3Comments

johan-smits picture johan-smits  路  3Comments