2013-06-22 2 views
3

Я пытаюсь развернуть приложение для рельсов с героем. Я побежал heroku run rake db:migrate, и это сработало нормально. Затем я попытался запустить heroku run rake db:seed и получил эту ошибку: value too long for type character varying(255).Как узнать, какой атрибут дает мне эту ошибку: слишком длинное значение для символа типа, меняющегося (255)

Я просмотрел свой код, и я уверен, что все строковые атрибуты составляют менее 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&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=university+of+pittsburgh&amp;aq=&amp;sll=40.444261,-79.970448&amp;sspn=0.142165,0.251656&amp;ie=UTF8&amp;hq=university+of+pittsburgh&amp;t=m&amp;ll=40.443486,-79.958245&amp;spn=0.010798,0.021038&amp;output=embed"></iframe><br /><small><a href="https://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=university+of+pittsburgh&amp;aq=&amp;sll=40.431368,-79.9805&amp;sspn=0.142165,0.251656&amp;ie=UTF8&amp;hq=university+of+pittsburgh&amp;t=m&amp;ll=40.443486,-79.958245&amp;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&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=University+of+Pittsburgh,+4200+Fifth+Ave,+Pittsburgh,+PA&amp;aq=0&amp;oq=uni&amp;sll=40.444261,-79.970448&amp;sspn=0.142165,0.251656&amp;ie=UTF8&amp;hq=University+of+Pittsburgh,+4200+Fifth+Ave,+Pittsburgh,+PA&amp;ll=40.443486,-79.958245&amp;spn=0.010798,0.021038&amp;t=m&amp;layer=c&amp;cbll=40.441775,-79.956671&amp;panoid=BgWQKMiSI1fpwP7JUF16Vg&amp;cbp=12,45.25,,0,-3.34&amp;output=svembed"></iframe><br /><small><a href="https://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=University+of+Pittsburgh,+4200+Fifth+Ave,+Pittsburgh,+PA&amp;aq=0&amp;oq=uni&amp;sll=40.431368,-79.9805&amp;sspn=0.142165,0.251656&amp;ie=UTF8&amp;hq=University+of+Pittsburgh,+4200+Fifth+Ave,+Pittsburgh,+PA&amp;ll=40.443486,-79.958245&amp;spn=0.010798,0.021038&amp;t=m&amp;layer=c&amp;cbll=40.441775,-79.956671&amp;panoid=BgWQKMiSI1fpwP7JUF16Vg&amp;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 >> 

Схема:

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 

Обновлено Схема:

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 
+0

Это больше похоже на таблицу, чем на схему базы данных. Я надеюсь, что ваш следующий «переход» нормализует структуру до 3NF. – wildplasser

+0

Я новичок в рельсах, и я не слишком хорошо знаком с моими опциями. идея заключается в том, что на моем веб-сайте есть страница для каждого колледжа, и я хочу сохранить свой код DRY, имея один вид колледжа и изменяя представление, основанное на атрибуте @ college.attribute. woud это будет проще с электронной таблицей? если да, то как я могу использовать электронную таблицу? –

ответ

1

У вас есть администратор PG? Вы можете попробовать запустить это в приглашении SQL, где вы можете форматировать его по строкам и (надеюсь) увидеть, какая строка является ошибкой, или вырезать разделы, чтобы попробовать.

Вы также можете проверить, что столбцы, помеченные как text в схеме, не ограничены 255 символами.

Вы изменили какой-либо из строки на текст при переносе? Если это ограничение, возможно, не изменилось, если только вы не ввели новый предел при переносе.

+0

Я не загружал администратор PG, поэтому, если он не приходит стандартно, у меня его нет. Я не сделал ничего, чтобы ограничить столбцы помечены текстом. Означает ли это, что они не ограничены 255 символами? Если нет, как это проверить? Да. Некоторые вещи были ранее строки, но я изменил их на текст. Я изменил схему и миграции. После изменения миграции я также запускал «heroku run rake db: migrate». Это моя проблема? Что я могу сделать с этим? –

+1

1. Вы не должны изменять схему, файл схемы создается для вас. Удалите файл, а затем: 2. Вам нужно сделать «rake db: migrate: redo VERSION = xxx», где xxx - номер миграции измененного файла, это приведет к «down» и «up», изменению миграции ничего не делает, если вы повторно запустите его с помощью:: redo' (который также будет регенерировать ваш файл схемы, который затем должен точно отражать базу данных). – Matt

+0

Я попробовал, и он все еще не работал:/ –

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'

Эта строка 270 символов!

+1

Это не строка (я не думаю). см. мою схему как изменение моего вопроса. –