Vida
Vida

Reputation: 540

ember-simple-auth with ember-cli

Trying to follow the instructions for using ember-simple-auth with ember-cli here:

http://ember-simple-auth.simplabs.com/

At the start it says to do :

npm install --save-dev ember-cli-simple-auth
ember generate ember-cli-simple-auth

But as soon as I try that 'ember generate' I get the following error:

The `ember generate` command requires an entity name to be specified. For more details, use `ember help`.

So it looks like that ember generate command isn't right... anyone able to help? Am I to generate an initialiser or something?

Thanks

Upvotes: 0

Views: 446

Answers (3)

Vida
Vida

Reputation: 540

Two things were needed to sort this out.

Firstly to upgrade the version of ember-cli

This is covered here:

http://www.ember-cli.com/#upgrading-an-ember-cli-app

Use NPM to update to the latest released version of Ember CLI.

npm install --save-dev ember-cli

When you update to the latest version you may need to re-install files from the app blueprint and update Node NPM dependencies.

ember init

This will re-copy files from the project blueprint. You can choose to overwrite existing files or not. It will subsequently call npm install to update any changed dependencies.

And Secondly, needed to find the updated blog instructions for ember-simple-auth:

http://log.simplabs.com/post/90339547725/using-ember-simple-auth-with-ember-cli

which don't include the generate command now.

Upvotes: 3

Craicerjack
Craicerjack

Reputation: 6332

Ember simple auth and ember cli simple auth are two slightly different things. On the ember simple auth page https://github.com/simplabs/ember-simple-auth#ember-cli it says

If you're using Ember CLI, just add the ember-cli-simple-auth Ember CLI Addon to your project and Ember Simple Auth will setup itself.

which means to do what you are doing you need the ember-cli-simple-auth add on - found here https://github.com/simplabs/ember-cli-simple-auth

The way to install that is how youve described above.

Ember simple auth has gone through a lot of changes in its time so the page you are getting your instructions from might not be the most up to date. Github is usually the best place to check for solutions to packages if you are having difficulties as the most up to date documentation will most liekly be there.

Upvotes: 0

RyanHirsch
RyanHirsch

Reputation: 1847

Typically the blueprints the generators use, require the following syntax: ember generate <blueprint> <name>

I would expect the usage of simple-auth to follow the convention and you would do something like

ember generate ember-cli-simple-auth <your new route name>

Upvotes: 0

Related Questions