its work for me, Thanks! :)
On Wednesday, September 26, 2012 5:04:25 AM UTC+7, Ryan Bigg wrote:

This migration comes with spree_auth_devise. Run rake
railties:install:migrations and then rake db:migrate



On 26/09/2012, at 6:55, Laurens Nienhaus <l.nie...@gmail.com <javascript:>>
wrote:

Hi!

I updated to spree 1.2 and added spree_auth_devise for authentification.

Everything seems to work fine, except editing a user fails with the
exception

undefined method `spree_api_key`

Looking into the database, I saw the field in question is still called `
api_key`, without the spree_ prefix.

Renaming the field resolves the issue, but
is there a proper way to fix this, like a migration?

Thanks,
Laurens

--
You received this message because you are subscribed to the Google Groups
"Spree" group.
To post to this group, send email to spree...@googlegroups.com<javascript:>
.
To unsubscribe from this group, send email to
spree-user+...@googlegroups.com <javascript:>.
For more options, visit this group at
http://groups.google.com/group/spree-user?hl=en.
--
Don't miss SpreeConf on May 20-21: http://spreeconf.com
Spree is hiring: http://spreecommerce.com/careers

Search Discussions

  • Marc Gayle at May 27, 2013 at 8:29 am
    I just installed 2.0 and when I tried to login I am getting this error.

    Neither Ryan's nor Mike's suggestion worked for me.

    I don't have a `spree_api_key` column or `api_key` on my `spree_users`
    table.
    On Thursday, April 25, 2013 4:13:01 AM UTC-5, Agung Yuliaji wrote:

    its work for me, Thanks! :)
    On Wednesday, September 26, 2012 5:04:25 AM UTC+7, Ryan Bigg wrote:

    This migration comes with spree_auth_devise. Run rake
    railties:install:migrations and then rake db:migrate



    On 26/09/2012, at 6:55, Laurens Nienhaus wrote:

    Hi!

    I updated to spree 1.2 and added spree_auth_devise for authentification.

    Everything seems to work fine, except editing a user fails with the
    exception

    undefined method `spree_api_key`

    Looking into the database, I saw the field in question is still called `
    api_key`, without the spree_ prefix.

    Renaming the field resolves the issue, but
    is there a proper way to fix this, like a migration?

    Thanks,
    Laurens

    --
    You received this message because you are subscribed to the Google Groups
    "Spree" group.
    To post to this group, send email to spree...@googlegroups.com.
    To unsubscribe from this group, send email to
    spree-user+...@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/spree-user?hl=en.
  • Ryan Bigg at May 27, 2013 at 11:07 am
    Marc, please provide steps to reproduce. This key is normally added by a
    migration from the API component. It is possible that you installed just
    Spree Core.

    On Mon, May 27, 2013 at 4:29 AM, Marc Gayle wrote:

    I just installed 2.0 and when I tried to login I am getting this error.

    Neither Ryan's nor Mike's suggestion worked for me.

    I don't have a `spree_api_key` column or `api_key` on my `spree_users`
    table.

    On Thursday, April 25, 2013 4:13:01 AM UTC-5, Agung Yuliaji wrote:

    its work for me, Thanks! :)
    On Wednesday, September 26, 2012 5:04:25 AM UTC+7, Ryan Bigg wrote:

    This migration comes with spree_auth_devise. Run rake
    railties:install:migrations and then rake db:migrate



    On 26/09/2012, at 6:55, Laurens Nienhaus wrote:

    Hi!

    I updated to spree 1.2 and added spree_auth_devise for authentification.

    Everything seems to work fine, except editing a user fails with the
    exception

    undefined method `spree_api_key`

    Looking into the database, I saw the field in question is still called `
    api_key`, without the spree_ prefix.

    Renaming the field resolves the issue, but
    is there a proper way to fix this, like a migration?

    Thanks,
    Laurens

    --
    You received this message because you are subscribed to the Google
    Groups "Spree" group.
    To post to this group, send email to spree...@googlegroups.com.
    To unsubscribe from this group, send email to
    spree-user+...@googlegroups.**com.
    For more options, visit this group at http://groups.google.com/**
    group/spree-user?hl=en <http://groups.google.com/group/spree-user?hl=en>
    .

    --

    Ryan Bigg
    Community Manager
    Spree Commerce, Inc.

    Register now for SpreeConf
    May 20-21 in Washington, D.C.
    http://spreeconf.com
  • Matteo Latini at May 28, 2013 at 3:56 am
    Marc, it seems you're missing an old api_key column that was used by previous versions of
    spree.

    Check inside db/migrate if you have a migration file with something like this inside:

    add_column :spree_users, :api_key, :string, :limit => 40

    --
    Matteo Latini
    http://nebulab.it/

    Il giorno 28/mag/2013, alle ore 00:21, Marc Gayle <marcamillion@gmail.com> ha scritto:
    Ryan,
    I have an existing app, so I just added the following to my Gemfile:

    gem "spree", github: 'spree/spree', branch: '2-0-stable'
    gem "spree_auth_devise", github: 'spree/spree_auth_devise', branch: '2-0-stable'

    Then ran 'bundle'.

    Ran the following commands

    $ rake railties:install:migrations
    $ rake db:migrate
    [RailsAdmin] RailsAdmin initialization disabled by default. Pass SKIP_RAILS_ADMIN_INITIALIZER=false if you need it.
    $ rails c
    Loading development environment (Rails 3.2.13)
    2.0.0p0 :001 > m = ActiveRecord::Migration.new
    => #<ActiveRecord::Migration:0x007fe1619595a8 @name="ActiveRecord::Migration", @version=nil, @connection=nil, @reverting=false>
    2.0.0p0 :002 > m.rename_column :spree_users, :api_key, :spree_api_key
    -- rename_column(:spree_users, :api_key, :spree_api_key)
    (98.4ms) ALTER TABLE "spree_users" RENAME COLUMN "api_key" TO "spree_api_key"
    ActiveRecord::StatementInvalid: PG::Error: ERROR: column "api_key" does not exist
    : ALTER TABLE "spree_users" RENAME COLUMN "api_key" TO "spree_api_key"



    On Monday, May 27, 2013 6:07:49 AM UTC-5, Ryan Bigg wrote:
    Marc, please provide steps to reproduce. This key is normally added by a migration from the API component. It is possible that you installed just Spree Core.


    On Mon, May 27, 2013 at 4:29 AM, Marc Gayle wrote:
    I just installed 2.0 and when I tried to login I am getting this error.

    Neither Ryan's nor Mike's suggestion worked for me.

    I don't have a `spree_api_key` column or `api_key` on my `spree_users` table.


    On Thursday, April 25, 2013 4:13:01 AM UTC-5, Agung Yuliaji wrote:
    its work for me, Thanks! :)

    On Wednesday, September 26, 2012 5:04:25 AM UTC+7, Ryan Bigg wrote:
    This migration comes with spree_auth_devise. Run rake railties:install:migrations and then rake db:migrate


    On 26/09/2012, at 6:55, Laurens Nienhaus wrote:

    Hi!

    I updated to spree 1.2 and added spree_auth_devise for authentification.

    Everything seems to work fine, except editing a user fails with the exception

    undefined method `spree_api_key`

    Looking into the database, I saw the field in question is still called `api_key`, without the spree_ prefix.

    Renaming the field resolves the issue, but
    is there a proper way to fix this, like a migration?

    Thanks,
    Laurens

    --
    You received this message because you are subscribed to the Google Groups "Spree" group.
    To post to this group, send email to spree...@googlegroups.com.
    To unsubscribe from this group, send email to spree-user+...@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.


    --

    Ryan Bigg
    Community Manager
    Spree Commerce, Inc.

    Register now for SpreeConf
    May 20-21 in Washington, D.C.
    http://spreeconf.com

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedApr 25, '13 at 9:18a
activeMay 28, '13 at 3:56a
posts4
users4
websitespreecommerce.com
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase