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

Don't know how to build task 'webpacker:install' #13

Closed
neonmate opened this issue Oct 8, 2017 · 4 comments
Closed

Don't know how to build task 'webpacker:install' #13

neonmate opened this issue Oct 8, 2017 · 4 comments

Comments

@neonmate
Copy link

neonmate commented Oct 8, 2017

I saw following error when saying katapult new $APPLICATION_NAME:

       rails  webpacker:install
rails aborted!
Don't know how to build task 'webpacker:install' (see --tasks)
/Users/neonmate/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands/rake/rake_command.rb:21:in `block in perform'
/Users/neonmate/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/Users/neonmate/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/command.rb:46:in `invoke'
/Users/neonmate/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
(See full trace by running task with --trace)

To solve this issue I needed to add a Gemfile with following content:

source 'https://rubygems.org'

gem 'katapult', :git => 'git://github.com/makandra/katapult'
gem 'webpacker', '=3.0'

Afterwards running bundleand bundle exec katapult new $APPLICATION_NAME worked.

@neonmate
Copy link
Author

neonmate commented Nov 8, 2017

--- a/katapult.gemspec
+++ b/katapult.gemspec
@@ -22,4 +22,5 @@ Gem::Specification.new do |spec|

   spec.add_runtime_dependency 'rails', Katapult::RAILS_VERSION
   spec.add_runtime_dependency 'spring' # speed-up
+  spec.add_runtime_dependency 'webpacker'
 end

This should fix it. Maybe we also want to add a info to the readme that npm + yarn is needed for webpack and has to be installed.

@neonmate neonmate mentioned this issue Nov 8, 2017
@codener
Copy link
Member

codener commented Jan 10, 2018

Ok, this is weird. webpacker is required by Rails, I don't think katapult needs it. Maybe it is because of a screwed bundler setup, or because of other broken things.

@triskweline
Copy link
Member

I think it's an optional dependency. I'm currently working on a Rails 5 app that uses sprockets only, and I don't have webpacker in my bundle.

@codener
Copy link
Member

codener commented Jan 10, 2018

Ok, seems it will be fixed in 0.3.0 (at least, I cannot reproduce it). Closing this for now, please reopen if the issue persists.

@codener codener closed this as completed Jan 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants