I'm trying to deploy my rails app with heroku. I ran heroku run rake db:migrate
and that worked fine. Then I tried running heroku run rake db:seed
and I got this error: value too long for type character varying(255)
.
我正在尝试用heroku部署我的rails应用。我运行heroku运行rake db: migration and that works well。然后我尝试运行heroku运行rake db:seed,我得到了这个错误:类型字符变化(255)值太长。
I looked through my code and I'm pretty sure that all the string attributes are less than 255 characters. How do I see which attribute is giving me the error?
我查看了我的代码,我确信所有的字符串属性都小于255个字符。我如何看到哪个属性给了我错误?
~/collegeanswerz >> heroku run rake db:migrate
Running `rake db:migrate` attached to terminal... up, run.6374
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
Connecting to database specified by DATABASE_URL
Migrating to CreateColleges (20130529230046)
Migrating to AddDetailsToCollege (20130529231454)
Migrating to AddMoredetailsToCollege (20130530024157)
Migrating to AddAaaToCollege (20130530140803)
Migrating to AddBbbToCollege (20130530141312)
Migrating to AddCccToCollege (20130530142345)
Migrating to AddDddToCollege (20130530142537)
Migrating to AddNameToCollege (20130530145608)
Migrating to AddUrlToColleges (20130607205230)
Migrating to DeleteActFromColleges (20130608162648)
Migrating to AddActToColleges (20130608162707)
Migrating to RemoveActFromColleges (20130608162808)
Migrating to AddCostToColleges (20130608193301)
Migrating to AddLinksToColleges (20130608232148)
Migrating to AddScholToColleges (20130608232522)
Migrating to AddMapToColleges (20130609222024)
Migrating to AddHousingToColleges (20130609235838)
Migrating to AddFwToColleges (20130610003429)
Migrating to AddDormsToColleges (20130610145106)
Migrating to AddMajorsooToColleges (20130610154704)
Migrating to RemoveMajorsooFromColleges (20130610155336)
Migrating to AddMajorsoooToColleges (20130610155625)
Migrating to AddDormurlsToColleges (20130613023113)
~/collegeanswerz >> heroku run rake db:seed
Running `rake db:seed` attached to terminal... up, run.6256
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
Connecting to database specified by DATABASE_URL
rake aborted!
PGError: ERROR: value too long for type character varying(255)
: UPDATE "colleges" SET "url" = 'university-of-pittsburgh', "public" = 'Public', "years" = '4-year', "category" = 'National University', "calendar" = 'Semester', "location" = 'Pittsburgh, PA', "setting" = 'Large City (250-500k)', "retention" = 90, "graduation4" = 57, "graduation6" = 79, "degrees" = 'Certificate, Bachelors, Masters, Doctoral', "rotc" = 'Air Force, Army, Navy', "sat_submit" = 89, "act_submit" = 41, "sat_math_25" = 600, "sat_math_75" = 690, "sat_reading_25" = 570, "sat_reading_75" = 690, "sat_writing_25" = 560, "sat_writing_75" = 660, "sat_composite_25" = 1130, "sat_composite_75" = 1320, "act_math_25" = 25, "act_math_75" = 30, "act_reading_25" = 25, "act_reading_75" = 31, "act_writing_25" = 7, "act_writing_75" = 9, "act_composite_25" = 25, "act_composite_75" = 30, "acceptance_rate" = 58, "enrolled" = 32, "gpa375" = 71, "gpa35" = 15, "gpa325" = 8, "gpa3" = 4, "gpa25" = 2, "high_school_tenth" = 54, "high_school_quarter" = 86, "high_school_half" = 99, "sat_math_700" = 25, "sat_math_600" = 53, "sat_math_500" = 21, "sat_math_400" = 1, "sat_math_300" = 0, "sat_reading_700" = 24, "sat_reading_600" = 42, "sat_reading_500" = 32, "sat_reading_400" = 2, "sat_reading_300" = 0, "sat_writing_700" = 14, "sat_writing_600" = 45, "sat_writing_500" = 37, "sat_writing_400" = 4, "sat_writing_300" = 0, "act_composite_30" = 33, "act_composite_24" = 58, "act_composite_18" = 8, "act_composite_12" = 1, "act_math_30" = 40, "act_math_24" = 46, "act_math_18" = 13, "act_math_12" = 1, "act_reading_30" = 0, "act_reading_24" = 0, "act_reading_18" = 0, "act_reading_12" = 0, "very_important" = 'Academic GPA|Rigor of secondary school record|Standardized Test Scores', "considered" = 'Application Essay|Character/Personal Qualities|Class Rank|Extracurricular Activities|First Generation College Student|Geographical Residence|Level of Applicant''s Interest|Racial/Ethnic Status|Recommendations|State Residency|Talent/Ability|Volunteer Work|Work Experience', "student_faculty" = '14 to 1', "class_20" = 42, "class_49" = 39, "class_50" = 18, "majors" = 'business/marketing: 15%|social sciences: 14%|health professions: 11%|english: 10%|engineering: 9%|psychology: 8%|biology: 7%|history: 5%', "law" = 3, "business" = 1, "medical" = 4, "other_grad" = 28, "us_news_ranking" = 58, "top_25_grad" = 'Physical Therapy (3)|Speech-Language Pathology (8)|Library and Information Studies (10)|Social Work (11)|Medicine (15)|Education (24)', "requirements" = 'http://www.asundergrad.pitt.edu/requirements/gened.html', "majors_offered_link" = 'http://www.pitt.edu/academics/undergraduate', "ap_credit" = 'http://www.oafa.pitt.edu/pdf/CreditAPIBExam.pdf', "enrollment" = 18427, "graduate_enrollment" = 10339, "in_state" = 68, "out_of_state" = 32, "male" = 49, "female" = 51, "ethnicity" = 'white: 77%|hispanic/latino: 2%|asian: 8%|black: 5%|2 or more races: 3%|non-resident aliens: 3%|other: 2%', "frats" = 12, "sororities" = 10, "on_campus" = 45, "freshman_on_campus" = 97, "in_state_tuition" = 16590, "out_of_state_tuition" = 26280, "room_and_board" = 9870, "with_need_got_aid" = 68, "got_need_fully_met" = 7, "percent_need_met" = 59, "scholarships" = 41, "loans" = 59, "cost_30" = 17326, "cost_48" = 19950, "cost_75" = 23636, "cost_110" = 26410, "cost_111" = 26985, "scholarships_link" = 'http://www.oafa.pitt.edu/universityschlrs.aspx', "map" = '<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=university+of+pittsburgh&aq=&sll=40.444261,-79.970448&sspn=0.142165,0.251656&ie=UTF8&hq=university+of+pittsburgh&t=m&ll=40.443486,-79.958245&spn=0.010798,0.021038&output=embed"></iframe><br /><small><a href="https://maps.google.com/maps?f=q&source=embed&hl=en&geocode=&q=university+of+pittsburgh&aq=&sll=40.431368,-79.9805&sspn=0.142165,0.251656&ie=UTF8&hq=university+of+pittsburgh&t=m&ll=40.443486,-79.958245&spn=0.010798,0.021038" style="color:#0000FF;text-align:left">View Larger Map</a></small>', "street_view" = '<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&source=embed&hl=en&geocode=&q=University+of+Pittsburgh,+4200+Fifth+Ave,+Pittsburgh,+PA&aq=0&oq=uni&sll=40.444261,-79.970448&sspn=0.142165,0.251656&ie=UTF8&hq=University+of+Pittsburgh,+4200+Fifth+Ave,+Pittsburgh,+PA&ll=40.443486,-79.958245&spn=0.010798,0.021038&t=m&layer=c&cbll=40.441775,-79.956671&panoid=BgWQKMiSI1fpwP7JUF16Vg&cbp=12,45.25,,0,-3.34&output=svembed"></iframe><br /><small><a href="https://maps.google.com/maps?f=q&source=embed&hl=en&geocode=&q=University+of+Pittsburgh,+4200+Fifth+Ave,+Pittsburgh,+PA&aq=0&oq=uni&sll=40.431368,-79.9805&sspn=0.142165,0.251656&ie=UTF8&hq=University+of+Pittsburgh,+4200+Fifth+Ave,+Pittsburgh,+PA&ll=40.443486,-79.958245&spn=0.010798,0.021038&t=m&layer=c&cbll=40.441775,-79.956671&panoid=BgWQKMiSI1fpwP7JUF16Vg&cbp=12,45.25,,0,-3.34" style="color:#0000FF;text-align:left">View Larger Map</a></small>', "housing" = '<iframe src="http://www.tour.pitt.edu/tour-categories/residence-halls" scrolling="no" height="820" width="900"></iframe>', "food" = '<div style="overflow: hidden; max-width: 1000px;"><iframe scrolling="no" src="http://www.pc.pitt.edu/dining/menus.php" style="margin-left: 0; height: 2000px; margin-top: -370px; margin-bottom: -375px; width: 750px;"></iframe></div>', "weather" = '<div style="overflow: hidden; max-width: 500px;"><iframe scrolling="no" src="http://www.weather.com/weather/wxclimatology/monthly/graph/USPA1290" style="margin-left: -40px; height: 1570px; margin-top: -490px; width: 500px;"></iframe></div>', "dorms" = 'Towers (fr.)|Sutherland (fr.)|Lothrop (fr.)|Nordenberg (fr.)|Holland (fr.)|Forbes (fr.; honors)|McCormick|Brackenridge|Amos|Bruce|Panther|Pennsylvania|Ruskin|Bouquet Gardens|Oakwood Apartments|Centre-Plaza Apartments|Forbes-Craig Apartments (honors)', "dorm_urls" = 'towers|sutherland|lothrop|nordenberg|holland|forbes|mccormick|brackenridge|amos|bruce|panther|pennsylvania|ruskin|bouquet-gardens|oakwood-apartments|centre-plaza-apartments|forbes-craig-apartments', "science_majors" = 'Actuarial Mathematics|Applied Mathematics|Bioinformatics|Biological Sciences|Chemistry|Computer Science|Ecology and Evolution|Environmental Geology|Environmental Studies|Geology|History and Philosophy of Science|Linguistics|Mathematics|Mathematics-Economics|Mathematics-Philosophy|Microbiology|Molecular Biology|Natural Sciences Area|Neuroscience|Physics|Physics and Astronomy|Scientific Computing|Statistics', "social_science_majors" = 'Economics|Economics–Statistics|History|Political Science|Politics-Philosophy|Psychology|Sociology|Urban Studies', "humanities_majors" = 'Africana Studies|Africana Studies–English|Anthropology|Chinese|Classics|English Literature|English Writing|Film Studies|French|German|History of Art & Architecture|Humanities Area|Italian|Italian Studies|Japanese|Liberal Studies|Music|Philosophy|Religious Studies|Russian|Slavic Studies|Spanish|Studio Arts|Theatre Arts', "business_majors" = 'Accounting|Finance|General Management|Global Management|Marketing', "engineering_majors" = 'Bioengineering|Chemical Engineering|Civil Engineering|Computer Engineering|Electrical Engineering|Engineering Physics|Industrial Engineering|Materials Science and Engineering|Mechanical Engineering', "professional_majors" = 'Administration of Justice|Applied Developmental Psychology|Architectural Studies|Athletic Training|Clinical Dietetics and Nutrition|Communication: Rhet & Comm|Communication Science|Dental Hygiene|Emergency Medicine|Health Information Management|Health Services|Health and Physical Activity|Information Science|Legal Studies|Media and Professional Communications|Nursing|Pharmacy|Public Service|Rehabilitation Science|Social Work', "updated_at" = '2013-06-22 14:26:19.324611' WHERE "colleges"."id" = 1
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1161:in `async_exec'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1161:in `exec_no_cache'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `block in exec_delete'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:670:in `exec_delete'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:96:in `update'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `update'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/persistence.rb:359:in `update'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/locking/optimistic.rb:68:in `update'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/attribute_methods/dirty.rb:74:in `update'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/timestamp.rb:71:in `update'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/callbacks.rb:272:in `block in update'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:403:in `_run__1124092128366785760__update__948523398122619999__callbacks'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `__run_callback'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in `_run_update_callbacks'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:in `run_callbacks'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/callbacks.rb:272:in `update'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/persistence.rb:348:in `create_or_update'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/callbacks.rb:264:in `block in create_or_update'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:403:in `_run__1124092128366785760__save__948523398122619999__callbacks'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `__run_callback'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:in `run_callbacks'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/callbacks.rb:264:in `create_or_update'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/persistence.rb:84:in `save'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/validations.rb:50:in `save'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/attribute_methods/dirty.rb:22:in `save'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:259:in `block (2 levels) in save'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:208:in `transaction'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:259:in `block in save'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:270:in `rollback_active_record_state!'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:258:in `save'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/persistence.rb:217:in `block in update_attributes'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:208:in `transaction'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/persistence.rb:215:in `update_attributes'
/app/db/seeds.rb:11:in `<top (required)>'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `block in load'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:520:in `load_seed'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:347:in `block (2 levels) in <top (required)>'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:143:in `invoke_task'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
Tasks: TOP => db:seed
(See full trace by running task with --trace)
~/collegeanswerz >>
Schema:
模式:
ActiveRecord::Schema.define(:version => 20130613023113) do
create_table "colleges", :force => true do |t|
t.string "public"
t.string "years"
t.string "category"
t.string "calendar"
t.string "location"
t.string "setting"
t.integer "retention"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "graduation4"
t.integer "graduation6"
t.string "degrees"
t.string "rotc"
t.integer "sat_submit"
t.integer "act_submit"
t.integer "sat_math_25"
t.integer "sat_math_75"
t.integer "sat_reading_25"
t.integer "sat_reading_75"
t.integer "sat_writing_25"
t.integer "sat_writing_75"
t.integer "sat_composite_25"
t.integer "sat_composite_75"
t.integer "act_math_25"
t.integer "act_math_75"
t.integer "act_reading_25"
t.integer "act_reading_75"
t.integer "act_writing_75"
t.integer "act_composite_25"
t.integer "act_composite_75"
t.integer "acceptance_rate"
t.integer "enrolled"
t.integer "gpa375"
t.integer "gpa35"
t.integer "gpa325"
t.integer "gpa3"
t.integer "gpa25"
t.integer "high_school_tenth"
t.integer "high_school_quarter"
t.integer "high_school_half"
t.integer "sat_math_700"
t.integer "sat_math_600"
t.integer "sat_math_500"
t.integer "sat_math_400"
t.integer "sat_math_300"
t.integer "sat_reading_700"
t.integer "sat_reading_600"
t.integer "sat_reading_500"
t.integer "sat_reading_400"
t.integer "sat_reading_300"
t.integer "sat_writing_700"
t.integer "sat_writing_600"
t.integer "sat_writing_500"
t.integer "sat_writing_400"
t.integer "sat_writing_300"
t.integer "act_composite_30"
t.integer "act_composite_24"
t.integer "act_composite_18"
t.integer "act_composite_12"
t.integer "act_math_30"
t.integer "act_math_24"
t.integer "act_math_18"
t.integer "act_math_12"
t.integer "act_reading_30"
t.integer "act_reading_24"
t.integer "act_reading_18"
t.integer "act_reading_12"
t.text "very_important"
t.text "important"
t.text "considered"
t.string "student_faculty"
t.integer "class_20"
t.integer "class_49"
t.integer "class_50"
t.text "majors"
t.integer "law"
t.integer "business"
t.integer "medical"
t.integer "other_grad"
t.integer "us_news_ranking"
t.text "top_25_grad"
t.integer "enrollment"
t.integer "graduate_enrollment"
t.integer "in_state"
t.integer "out_of_state"
t.integer "male"
t.integer "female"
t.text "ethnicity"
t.integer "frats"
t.integer "sororities"
t.integer "on_campus"
t.integer "freshman_on_campus"
t.integer "in_state_tuition"
t.integer "out_of_state_tuition"
t.integer "room_and_board"
t.integer "with_need_got_aid"
t.integer "got_need_fully_met"
t.integer "percent_need_met"
t.integer "scholarships"
t.integer "loans"
t.string "name"
t.string "url"
t.integer "act_writing_25"
t.integer "cost_30"
t.integer "cost_48"
t.integer "cost_75"
t.integer "cost_110"
t.integer "cost_111"
t.string "requirements"
t.string "ap_credit"
t.string "scholarships_link"
t.text "map"
t.text "street_view"
t.text "housing"
t.text "food"
t.text "weather"
t.text "dorms"
t.text "majors_offered_link"
t.text "science_majors"
t.text "social_science_majors"
t.text "humanities_majors"
t.text "business_majors"
t.text "engineering_majors"
t.text "professional_majors"
t.text "dorm_urls"
end
end
Updated Schema:
更新的模式:
ActiveRecord::Schema.define(:version => 20130613023113) do
create_table "colleges", :force => true do |t|
t.string "public"
t.string "years"
t.string "category"
t.string "calendar"
t.string "location"
t.string "setting"
t.integer "retention"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "graduation4"
t.integer "graduation6"
t.string "degrees"
t.string "rotc"
t.integer "sat_submit"
t.integer "act_submit"
t.integer "sat_math_25"
t.integer "sat_math_75"
t.integer "sat_reading_25"
t.integer "sat_reading_75"
t.integer "sat_writing_25"
t.integer "sat_writing_75"
t.integer "sat_composite_25"
t.integer "sat_composite_75"
t.integer "act_math_25"
t.integer "act_math_75"
t.integer "act_reading_25"
t.integer "act_reading_75"
t.integer "act_writing_75"
t.integer "act_composite_25"
t.integer "act_composite_75"
t.integer "acceptance_rate"
t.integer "enrolled"
t.integer "gpa375"
t.integer "gpa35"
t.integer "gpa325"
t.integer "gpa3"
t.integer "gpa25"
t.integer "high_school_tenth"
t.integer "high_school_quarter"
t.integer "high_school_half"
t.integer "sat_math_700"
t.integer "sat_math_600"
t.integer "sat_math_500"
t.integer "sat_math_400"
t.integer "sat_math_300"
t.integer "sat_reading_700"
t.integer "sat_reading_600"
t.integer "sat_reading_500"
t.integer "sat_reading_400"
t.integer "sat_reading_300"
t.integer "sat_writing_700"
t.integer "sat_writing_600"
t.integer "sat_writing_500"
t.integer "sat_writing_400"
t.integer "sat_writing_300"
t.integer "act_composite_30"
t.integer "act_composite_24"
t.integer "act_composite_18"
t.integer "act_composite_12"
t.integer "act_math_30"
t.integer "act_math_24"
t.integer "act_math_18"
t.integer "act_math_12"
t.integer "act_reading_30"
t.integer "act_reading_24"
t.integer "act_reading_18"
t.integer "act_reading_12"
t.text "very_important"
t.text "important"
t.text "considered"
t.string "student_faculty"
t.integer "class_20"
t.integer "class_49"
t.integer "class_50"
t.text "majors"
t.integer "law"
t.integer "business"
t.integer "medical"
t.integer "other_grad"
t.integer "us_news_ranking"
t.text "top_25_grad"
t.integer "enrollment"
t.integer "graduate_enrollment"
t.integer "in_state"
t.integer "out_of_state"
t.integer "male"
t.integer "female"
t.text "ethnicity"
t.integer "frats"
t.integer "sororities"
t.integer "on_campus"
t.integer "freshman_on_campus"
t.integer "in_state_tuition"
t.integer "out_of_state_tuition"
t.integer "room_and_board"
t.integer "with_need_got_aid"
t.integer "got_need_fully_met"
t.integer "percent_need_met"
t.integer "scholarships"
t.integer "loans"
t.string "name"
t.string "url"
t.integer "act_writing_25"
t.integer "cost_30"
t.integer "cost_48"
t.integer "cost_75"
t.integer "cost_110"
t.integer "cost_111"
t.text "requirements"
t.text "majors_offered"
t.text "ap_credit"
t.text "scholarships_link"
t.text "map"
t.text "street_view"
t.text "housing"
t.text "food"
t.text "weather"
t.text "dorms"
t.text "majors_offered_link"
t.text "science_majors"
t.text "social_science_majors"
t.text "humanities_majors"
t.text "business_majors"
t.text "engineering_majors"
t.text "professional_majors"
t.text "dorm_urls"
end
end
2 个解决方案
#1
1
Do you have PG admin? You could try running this in a SQL prompt where you can format it line by line and (hopefully) see which line is erroring, or cut out sections to try.
你有PG管理员吗?您可以尝试在SQL提示符中运行它,您可以逐行格式化它,(希望如此)查看哪一行出错,或者删除要尝试的部分。
You can also check that the columns marked as text
in the schema aren't limited to 255 characters.
您还可以检查模式中标记为文本的列是否不限于255个字符。
Did you change any from string to text in a migrate? If so the limit may not have actually changed unless you specifically entered a new limit in the migrate.
您是否在迁移过程中从字符串更改为文本?如果是这样,除非您在迁移中特别地输入了一个新的限制,否则这个限制可能不会真正改变。
#2
1
'Application Essay|Character/Personal Qualities|Class Rank|Extracurricular Activities|First Generation College Student|Geographical Residence|Level of Applicant''s Interest|Racial/Ethnic Status|Recommendations|State Residency|Talent/Ability|Volunteer Work|Work Experience'
“申请论文|性格/个人素质|班级排名|课外活动|第一代大学生|地理居住地|申请人兴趣水平|种族/民族身份|推荐|州居留权|人才/能力|0志愿者工作|1工作经历”
This string is 270 characters!
这个字符串是270个字符!
#1
1
Do you have PG admin? You could try running this in a SQL prompt where you can format it line by line and (hopefully) see which line is erroring, or cut out sections to try.
你有PG管理员吗?您可以尝试在SQL提示符中运行它,您可以逐行格式化它,(希望如此)查看哪一行出错,或者删除要尝试的部分。
You can also check that the columns marked as text
in the schema aren't limited to 255 characters.
您还可以检查模式中标记为文本的列是否不限于255个字符。
Did you change any from string to text in a migrate? If so the limit may not have actually changed unless you specifically entered a new limit in the migrate.
您是否在迁移过程中从字符串更改为文本?如果是这样,除非您在迁移中特别地输入了一个新的限制,否则这个限制可能不会真正改变。
#2
1
'Application Essay|Character/Personal Qualities|Class Rank|Extracurricular Activities|First Generation College Student|Geographical Residence|Level of Applicant''s Interest|Racial/Ethnic Status|Recommendations|State Residency|Talent/Ability|Volunteer Work|Work Experience'
“申请论文|性格/个人素质|班级排名|课外活动|第一代大学生|地理居住地|申请人兴趣水平|种族/民族身份|推荐|州居留权|人才/能力|0志愿者工作|1工作经历”
This string is 270 characters!
这个字符串是270个字符!