문제

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?

도움이 되었습니까?

해결책

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

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top