Skip to content

Calling generate "devise", "User" creates invalid migration #5007

@jcoyne

Description

@jcoyne

When I use Rails 6.0.0.beta1

and I have a generator that calls the devise generator:

generate "devise", 'User'

Then railties-6.0.0.beta1/lib/rails/generators/actions.rb:294 adds RAILS_ENV=test to the end of the command, which causes the migration to have:

t.string :RAILS_ENV=test

which is a syntax error.

rake aborted!
SyntaxError: internal_test_app/db/migrate/20190119062007_devise_create_users.rb:35: syntax error, unexpected tIDENTIFIER, expecting keyword_end
...t.string :RAILS_ENV=development
...                    ^~~~~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions