English 中文(简体)
RORQIite text length
原标题:ROR SQLIite text length
  • 时间:2011-08-06 17:51:13
  •  标签:
  • ruby

In my application I have a model, with a :string field containing a description. Everything works fine on my local machine, but heroku gives me an error message. I looked into logs and found the error:

ActiveRecord::StatementInvalid (PGError: ERROR: value too long for type character varying(255)

令人感兴趣的是,EXACTLY的同一文本对我的当地机器进行了罚款。 我在网上看到了一项建议,即我应当产生一种新的移徙:描述形式:文字形式。 我试图这样做,就像有人在那里看到的那样:

change_column :your_table_name, :name_of_field, :string, :text

But got en error:

-- change_column(:users, :about_me, :string, :text) rake aborted! An error has occurred, this and all later migrations canceled:

“未界定的方法:案文: 页: 1

问题是如何用长途 The子开展工作的,也是为了治疗,为什么它在当地机器上工作,并坠毁于 her?

Thanks in advance

页: 1

最佳回答

it s change_column :your_table_name, :name_of_field, :text So, about the error. It s PostgreSQL s error. PGError: (ERROR: value too long for type character varying(255)) It means that heroku is using PostgreSQL but you are using SQLite on your local machine.

问题回答

暂无回答




相关问题
Ruby parser in Java

The project I m doing is written in Java and parsers source code files. (Java src up to now). Now I d like to enable parsing Ruby code as well. Therefore I am looking for a parser in Java that parses ...

rails collection_select vs. select

collection_select and select Rails helpers: Which one should I use? I can t see a difference in both ways. Both helpers take a collection and generates options tags inside a select tag. Is there a ...

RubyCAS-Client question: Rails

I ve installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It s working, but I d like to remove the ?ticket= in the url. Is this possible?

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

multiple ruby extension modules under one directory

Can sources for discrete ruby extension modules live in the same directory, controlled by the same extconf.rb script? Background: I ve a project with two extension modules, foo.so and bar.so which ...

Text Editor for Ruby-on-Rails

guys which text editor is good for Rubyonrails? i m using Windows and i was using E-Texteditor but its not free n its expired now can anyone plese tell me any free texteditor? n which one is best an ...

热门标签