我的问题部署我的Sinatra + DataMapper应用程序到Heroku。 该应用程序在本地工作,但部署它爆炸。
这是错误:
带有显式:串行选项的整数ID已弃用,请使用串行(./hello.rb:15)/home/slugs/339253_c667ceb_65a5-45e31e8c-0236-4d03-96ec-a59bdabdf788/mnt/.gems/gems/dm-migrations- 1.0.2 / lib / dm-migrations / adapters / dm-postgres-adapter.rb:84:在`property_schema_hash':范围错误值(ArgumentError)
代码如下所示:
Class Post include DataMapper::Resource property :id, Integer, :serial => true property :title, String end Post.auto_migrate! first_post = Post.new first_post.title = "First!" first_post.save这是一个宝石版本问题,还是我错过了什么?
Im getting issues deploying my Sinatra + DataMapper app to Heroku. The app works locally but deploying it blows up.
Here's the error:
Integer id with explicit :serial option is deprecated, use Serial instead (./hello.rb:15) /home/slugs/339253_c667ceb_65a5-45e31e8c-0236-4d03-96ec-a59bdabdf788/mnt/.gems/gems/dm-migrations-1.0.2/lib/dm-migrations/adapters/dm-postgres-adapter.rb:84:in `property_schema_hash': bad value for range (ArgumentError)
The code looks like this:
Class Post include DataMapper::Resource property :id, Integer, :serial => true property :title, String end Post.auto_migrate! first_post = Post.new first_post.title = "First!" first_post.saveIs this a gem versioning issue, or am I missing something?
最满意答案
看起来你在本地使用了另一个版本的datamapper。
使用: gem list --local检查您的本地版本
建议使用Serial而不是Integer。
You use another version of datamapper locally it seems.
Check your local version with: gem list --local
Also use Serial instead of Integer as proposed.
更多推荐
发布评论