Domanda

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?

È stato utile?

Soluzione

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

Altri suggerimenti

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top