Rails engine commands

Yesterday I was creating a rails engine but somehow now I am unable to run normal rails commands like rails server.
$ rails s

Error: Command not recognized
Usage: rails COMMAND [ARGS]

The common rails commands available for engines are:
 generate    Generate new code (short-cut alias: "g")
 destroy     Undo code generated with "generate" (short-cut alias: "d")

All commands can be run with -h for more information.

If you want to run any commands that need to be run in context
of the application, like `rails server` or `rails console`,

If I do rvm get head I get this error

 * WARNING: Above files contains `PATH=` with no `$PATH` inside, this can break RVM,
    for details check https://github.com/wayneeseguin/rvm/issues/1351#issuecomment-10939525
    to avoid this warning append #PATH.

And I am on the bash shell. The zsh shell isnt detecting rails at all :frowning:

where was it that you were running rails s? From inside your application’s directory?

What happens if you do bundle exec rails s instead?

It looks like you’re having similar problems as this stackoverflow post. Are you trying to run rails s from inside the engine’s directory?

Posting your question to stackoverflow might get more eyes to look at the problem if you’re unsuccessful here.

Still getting the same error

Bundler is using a binstub that was created for a different gem.
This is deprecated, in future versions you may need to `bundle binstub xmppify` to work around a system/bundle conflict.