Giter Club home page Giter Club logo

Comments (10)

 avatar commented on August 18, 2024 4

Okay so it's maybe a fix for your project but not for qor project which should support multiple languages.

from qor-example.

jinzhu avatar jinzhu commented on August 18, 2024 2

Need to run go run db/seeds/main.go db/seeds/seeds.go to generate the sample data.

from qor-example.

hhstore avatar hhstore commented on August 18, 2024

then run main.go, error log:

xx@mac [15时34分34秒] [~/xx/iGoSpace/src/github.com/qor/qor-example] [master]
-> % go run main.go

Failed to find configuration config/smtp.yml, using example file config/smtp.example.yml
Failed to find configuration config/database.yml, using example file config/database.example.yml
[info] replacing callback `gorm:delete` from /Users/xx/iGit/iGoSpace/src/github.com/qor/publish/publish.go:147
Failed to create unique index for translations key & locale, got: Error 1170: BLOB/TEXT column 'key' used in key specification without a key length

(Error 1170: BLOB/TEXT column 'key' used in key specification without a key length)
[2016-09-20 15:34:37]
[register] Loading
[auth]     Loading
[confirm]  Loading
[recover]  Loading
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:   export GIN_MODE=release
 - using code:  gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET    /                         --> github.com/qor/qor-example/app/controllers.HomeIndex (4 handlers)
[GIN-debug] GET    /products/:code           --> github.com/qor/qor-example/app/controllers.ProductShow (4 handlers)
[GIN-debug] GET    /switch_locale            --> github.com/qor/qor-example/app/controllers.SwitchLocale (4 handlers)
[register] Route: /auth/register
[auth]     Route: /auth/login
[auth]     Route: /auth/logout
[confirm]  Route: /auth/confirm
[recover]  Route: /auth/recover
[recover]  Route: /auth/recover/complete


Duplicated meta Name defined for resource Widget Content
goroutine 1 [running]:
runtime/debug.Stack(0x2d, 0xc4210dd7a8, 0x2)
    /usr/local/Cellar/go/1.7.1/libexec/src/runtime/debug/stack.go:24 +0x79
runtime/debug.PrintStack()
    /usr/local/Cellar/go/1.7.1/libexec/src/runtime/debug/stack.go:16 +0x22
github.com/qor/qor/utils.ExitWithMsg(0x679960, 0xc421012090, 0xc4210dd7a8, 0x2, 0x2)
    /Users/xx/iGit/iGoSpace/src/github.com/qor/qor/utils/utils.go:175 +0x161
github.com/qor/admin.(*Resource).Meta(0xc420065520, 0xc420ffb200, 0xc4210dd858)
    /Users/xx/iGit/iGoSpace/src/github.com/qor/admin/resource.go:46 +0x2f1
github.com/qor/widget.(*QorWidgetSetting).ConfigureQorResource(0xc4208e29c0, 0xa7ce80, 0xc420065520)
    /Users/xx/iGit/iGoSpace/src/github.com/qor/widget/setting.go:131 +0x13e
github.com/qor/admin.(*Resource).configure(0xc420065520)
    /Users/xx/iGit/iGoSpace/src/github.com/qor/admin/resource.go:498 +0x21b
github.com/qor/admin.(*Admin).MountTo(0xc4201d7b80, 0x75c056, 0x6, 0xc420b2f920)
    /Users/xx/iGit/iGoSpace/src/github.com/qor/admin/route.go:268 +0x262
main.main()
    /Users/xx/iGit/iGoSpace/src/github.com/qor/qor-example/main.go:18 +0xc3
Listening on: 7000

my develop environment:

- mac osx
- xampp (for mysql)
- go 1.7.1

issue:

  1. this could access by browser, http:127.0.0.1:7000
  2. but login module and register module are not work.
  3. any packages have i missed install?

from qor-example.

nateweisiger avatar nateweisiger commented on August 18, 2024

I get this same message as well. It is occurring because the column "key" in the translations table. See below:
http://stackoverflow.com/questions/1827063/mysql-error-key-specification-without-a-key-length

So far it hasn't caused me any problems.

from qor-example.

leenux avatar leenux commented on August 18, 2024

same +1
我在第一步go get ./db/seeds/...就提示错误:
# go get ./db/seeds/...
# github.com/qor/qor-example/db/seeds
runtime.main: call to external function main.main
runtime.main: main.main: not defined
runtime.main: undefined: main.main
第二步跟题主同样错误

go是1.7.1

from qor-example.

herohenu avatar herohenu commented on August 18, 2024
go run db/seeds/main.go db/seeds/seeds.go

it helped me

from qor-example.

randomtask2000 avatar randomtask2000 commented on August 18, 2024

I have tried running go run db/seeds/main.go db/seeds/seeds.go and I still get this error mysql:

Failed to create unique index for translations key & locale, got: Error 1170: BLOB/TEXT column 'key' 
used in key specification without a key length

(Error 1170: BLOB/TEXT column 'key' used in key specification without a key length)

Does anyone know how to fix this? It appears to be a repository data type issue. I have also seen post on mysql projects stating that you can't generate a key on a limitless BLOB/TEXT field unless you change the datatype to a VARCHAR or limit the indexed field chars.

Bottom line, how do I fix this?

from qor-example.

nateweisiger avatar nateweisiger commented on August 18, 2024

To fix - Remove that field from the table create. If I remember correctly, that is only used for the translate feature.

from qor-example.

 avatar commented on August 18, 2024

@nateweisiger this is not a fix, this is a workaround.

Can anyone help us?

from qor-example.

nateweisiger avatar nateweisiger commented on August 18, 2024

It is a fix if you are not using multiple languages.

from qor-example.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.