Note that there are some explanatory texts on larger screens.

plurals
  1. POinvalid byte sequence in US-ASCII (Argument Error) when I run rake db:seed in Rails
    primarykey
    data
    text
    <p>When I run <code>rake db:seed</code> in my <code>Rails</code> app, I'm getting this error:</p> <blockquote> <p>invalid byte sequence in US-ASCII (Argument Error)</p> </blockquote> <p>I just added <code>science_majors</code> and down to my seed file, and now when I run <code>rake db:seed</code> it gives me this error:</p> <blockquote> <p>invalid byte sequence error</p> </blockquote> <p>Why is this, and how can I fix it?</p> <p>part of <strong>seeds.rb</strong></p> <pre><code>@college = College.find_or_create_by_name!('University of Pittsburgh') if @college.update_attributes( url: 'university-of-pittsburgh', public: 'Public', years: '4-year', category: 'National University', calendar: 'Semester', location: 'Pittsburgh, PA', setting: 'Large City (250-500k)', retention: '90', majors: 'business/marketing: 15%|social sciences: 14%|health professions: 11%|english: 10%|engineering: 9%|psychology: 8%|biology: 7%|history: 5%', scholarships_link: 'http://www.oafa.pitt.edu/universityschlrs.aspx', map: '&lt;iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&amp;amp;source=s_q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=university+of+pittsburgh&amp;amp;aq=&amp;amp;sll=40.444261,-79.970448&amp;amp;sspn=0.142165,0.251656&amp;amp;ie=UTF8&amp;amp;hq=university+of+pittsburgh&amp;amp;t=m&amp;amp;ll=40.443486,-79.958245&amp;amp;spn=0.010798,0.021038&amp;amp;output=embed"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;small&gt;&lt;a href="https://maps.google.com/maps?f=q&amp;amp;source=embed&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=university+of+pittsburgh&amp;amp;aq=&amp;amp;sll=40.431368,-79.9805&amp;amp;sspn=0.142165,0.251656&amp;amp;ie=UTF8&amp;amp;hq=university+of+pittsburgh&amp;amp;t=m&amp;amp;ll=40.443486,-79.958245&amp;amp;spn=0.010798,0.021038" style="color:#0000FF;text-align:left"&gt;View Larger Map&lt;/a&gt;&lt;/small&gt;', street_view: '&lt;iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&amp;amp;source=embed&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=University+of+Pittsburgh,+4200+Fifth+Ave,+Pittsburgh,+PA&amp;amp;aq=0&amp;amp;oq=uni&amp;amp;sll=40.444261,-79.970448&amp;amp;sspn=0.142165,0.251656&amp;amp;ie=UTF8&amp;amp;hq=University+of+Pittsburgh,+4200+Fifth+Ave,+Pittsburgh,+PA&amp;amp;ll=40.443486,-79.958245&amp;amp;spn=0.010798,0.021038&amp;amp;t=m&amp;amp;layer=c&amp;amp;cbll=40.441775,-79.956671&amp;amp;panoid=BgWQKMiSI1fpwP7JUF16Vg&amp;amp;cbp=12,45.25,,0,-3.34&amp;amp;output=svembed"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;small&gt;&lt;a href="https://maps.google.com/maps?f=q&amp;amp;source=embed&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=University+of+Pittsburgh,+4200+Fifth+Ave,+Pittsburgh,+PA&amp;amp;aq=0&amp;amp;oq=uni&amp;amp;sll=40.431368,-79.9805&amp;amp;sspn=0.142165,0.251656&amp;amp;ie=UTF8&amp;amp;hq=University+of+Pittsburgh,+4200+Fifth+Ave,+Pittsburgh,+PA&amp;amp;ll=40.443486,-79.958245&amp;amp;spn=0.010798,0.021038&amp;amp;t=m&amp;amp;layer=c&amp;amp;cbll=40.441775,-79.956671&amp;amp;panoid=BgWQKMiSI1fpwP7JUF16Vg&amp;amp;cbp=12,45.25,,0,-3.34" style="color:#0000FF;text-align:left"&gt;View Larger Map&lt;/a&gt;&lt;/small&gt;', housing: '&lt;iframe src="http://www.tour.pitt.edu/tour-categories/residence-halls" scrolling="no" height="820" width="900"&gt;&lt;/iframe&gt;', food: '&lt;div style="overflow: hidden; max-width: 1000px;"&gt;&lt;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;"&gt;&lt;/iframe&gt;&lt;/div&gt;', weather: '&lt;div style="overflow: hidden; max-width: 500px;"&gt;&lt;iframe scrolling="no" src="http://www.weather.com/weather/wxclimatology/monthly/graph/USPA1290" style="margin-left: -40px; height: 1570px; margin-top: -490px; width: 500px;"&gt;&lt;/iframe&gt;&lt;/div&gt;', 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)', 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 &amp; 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 &amp; 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*' ) else # handle validation errors end @college= College.find_or_create_by_name!('Harvard') if @college.update_attributes( url: 'harvard', public: 'Private', years: '4-year', category: 'National University', calendar: 'Semester', location: 'Cambridge, MA', setting: 'Small City (50-250k)', degrees: 'Bachelors, Masters, Doctoral', rotc: 'Air Force, Army, Navy', considered: 'Academic GPA|Alumni Relation|Application Essay|Character/Personal Qualities|Extracurricular Activities|First Generation College Student|Geographical Residence|Interview|Racial/Ethnic Status|Recommendations|Rigor of secondary school record|Standardized Test Scores|Talent/Ability|Volunteer Work|Work Experience', student_faculty: '7 to 1') else # handle validation errors end </code></pre> <p>I left out all the other colleges. I have 200 schools so far, but Pitt is the only one with comprehensive data so far. The rest just have basic data, like Harvard. I also left out some of the data for Pitt for the sake of brevity, but let me know if you'd like me to include the rest.</p> <p>Edit: I tried taking out the <code>*</code>'s in <code>science_majors</code> on down and then running <code>rake db:seed</code>, but that didn't change anything.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload