Comments (10)
Okay so it's maybe a fix for your project but not for qor project which should support multiple languages.
from qor-example.
Need to run go run db/seeds/main.go db/seeds/seeds.go
to generate the sample data.
from qor-example.
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:
- this could access by browser, http:127.0.0.1:7000
- but
login
module andregister
module are not work. - any packages have i missed install?
from qor-example.
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.
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.
go run db/seeds/main.go db/seeds/seeds.go
it helped me
from qor-example.
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.
To fix - Remove that field from the table create. If I remember correctly, that is only used for the translate feature.
from qor-example.
@nateweisiger this is not a fix, this is a workaround.
Can anyone help us?
from qor-example.
It is a fix if you are not using multiple languages.
from qor-example.
Related Issues (20)
- Demo link is redirecting to docs HOT 1
- config.NoMetadata undefined HOT 1
- Error 1170: BLOB/TEXT column 'key' used in key specification without a key length HOT 2
- Error 1054: Unknown column 'basics.provider' in 'where clause' - "invalid account" error message
- Unable to start this project
- create a theme folder with all views and assets
- AssetFS is used before overwrite it!
- enterprise.getqor.com/microsite: cannot find module providing package enterprise.getqor.com/microsite HOT 2
- sheet.Rows undefined (type *xlsx.Sheet has no field or method Rows) HOT 2
- The sample project has a problem and is still not running HOT 1
- Is run after compile not possible ? HOT 1
- Undefined variable
- twitter/github auth, how to make them work ?
- `go run main.go` fails HOT 1
- Create new user failed
- Admin not working HOT 1
- Make example work with less dependency : e.g default squlite for db, admin/admin for uid/pwd
- example db connection missing port in connection string
- all image files in "public/system/...." folder are not displayed after cmd "go run main.go".
- unit/integration tests missing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qor-example.