Pergunta

I have an app that's using multiple engines, following the RailsGuides guidelines. The engine works fine in my app, but the docs indicate that generators should work just fine from within the engine, and I can't get mine to work. When I try to run a generator, it says command not found: rails.

Here are the contents of bin/rails inside my engine's directory:

#!/usr/bin/env ruby
# This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application.

ENGINE_ROOT = File.expand_path('../..', __FILE__)
ENGINE_PATH = File.expand_path('../../lib/my_engine/engine', __FILE__)

require 'rails/all'

require 'rails/engine/commands'

Am I missing something?

Foi útil?

Solução

This was stupidly simple. I'd never run a bundle install in my engine folder. You'd think me a newb.

Outras dicas

I had to run bundle install and then bundle execafter having the same problem

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top