Jump to content

The ultimate community for Ruby on Rails developers.


Photo

Rails 3.2.18 and error on rake notes


  • Please log in to reply
2 replies to this topic

#1 Giacomo

Giacomo

    Signalman

  • Members
  • 15 posts
  • LocationBologna

Posted 30 June 2014 - 02:44 PM

Hello,

I'm running rails 3.2.18 and I'm getting this error while running 'rake notes'

man-10-21-80-20:$ rake notes
rake aborted!
ArgumentError: invalid byte sequence in UTF-8
/Users/.../.rvm/gems/ruby-2.1.0@project/gems/railties-3.2.18/lib/rails/source_annotation_extractor.rb:87:in `=~'

I don't have any idea on how to fix it.

Someone can explain me how to fix?

 

Thanks


--

G.


#2 Ohm

Ohm

    Driver

  • Moderators
  • 480 posts
  • LocationCopenhagen

Posted 30 June 2014 - 05:32 PM

UTF-8 is default from Ruby 2.0, but I don't know about how Rails and Rake handle it. It would seem that you have some file, perhaps one with a TODO or FIXME, that uses UTF-8 characters and does not have a UTF-8 header.

 

Try adding 

# encoding: utf-8

to the top of the files that it's broken in.


Blog: http://ohm.sh | Twitter: @madsohm | Work: Lokalebasen.dk


#3 Giacomo

Giacomo

    Signalman

  • Members
  • 15 posts
  • LocationBologna

Posted 01 July 2014 - 07:12 AM

Thank you Ohm.

 

Unfortunately the full trace stack doesn't mention a file in my project.

ArgumentError: invalid byte sequence in UTF-8
/Users/giacomo/.rvm/gems/ruby-2.1.0@myproject/gems/railties-3.2.18/lib/rails/source_annotation_extractor.rb:87:in `=~'
/Users/giacomo/.rvm/gems/ruby-2.1.0@myproject/gems/railties-3.2.18/lib/rails/source_annotation_extractor.rb:87:in `block in extract_annotations_from'
/Users/giacomo/.rvm/gems/ruby-2.1.0@myproject/gems/railties-3.2.18/lib/rails/source_annotation_extractor.rb:85:in `each'
/Users/giacomo/.rvm/gems/ruby-2.1.0@myproject/gems/railties-3.2.18/lib/rails/source_annotation_extractor.rb:85:in `inject'
/Users/giacomo/.rvm/gems/ruby-2.1.0@myproject/gems/railties-3.2.18/lib/rails/source_annotation_extractor.rb:85:in `extract_annotations_from'
/Users/giacomo/.rvm/gems/ruby-2.1.0@myproject/gems/railties-3.2.18/lib/rails/source_annotation_extractor.rb:67:in `block in find_in'
/Users/giacomo/.rvm/gems/ruby-2.1.0@myproject/gems/railties-3.2.18/lib/rails/source_annotation_extractor.rb:61:in `glob'
/Users/giacomo/.rvm/gems/ruby-2.1.0@myproject/gems/railties-3.2.18/lib/rails/source_annotation_extractor.rb:61:in `find_in'
/Users/giacomo/.rvm/gems/ruby-2.1.0@myproject/gems/railties-3.2.18/lib/rails/source_annotation_extractor.rb:65:in `block in find_in'
/Users/giacomo/.rvm/gems/ruby-2.1.0@myproject/gems/railties-3.2.18/lib/rails/source_annotation_extractor.rb:61:in `glob'
/Users/giacomo/.rvm/gems/ruby-2.1.0@myproject/gems/railties-3.2.18/lib/rails/source_annotation_extractor.rb:61:in `find_in'
/Users/giacomo/.rvm/gems/ruby-2.1.0@myproject/gems/railties-3.2.18/lib/rails/source_annotation_extractor.rb:51:in `block in find'
/Users/giacomo/.rvm/gems/ruby-2.1.0@myproject/gems/railties-3.2.18/lib/rails/source_annotation_extractor.rb:51:in `each'
/Users/giacomo/.rvm/gems/ruby-2.1.0@myproject/gems/railties-3.2.18/lib/rails/source_annotation_extractor.rb:51:in `inject'
/Users/giacomo/.rvm/gems/ruby-2.1.0@myproject/gems/railties-3.2.18/lib/rails/source_annotation_extractor.rb:51:in `find'
/Users/giacomo/.rvm/gems/ruby-2.1.0@myproject/gems/railties-3.2.18/lib/rails/source_annotation_extractor.rb:39:in `enumerate'
/Users/giacomo/.rvm/gems/ruby-2.1.0@myproject/gems/railties-3.2.18/lib/rails/tasks/annotations.rake:5:in `block in <top (required)>'
/Users/giacomo/.rvm/gems/ruby-2.1.0@myproject/bin/ruby_executable_hooks:15:in `eval'
/Users/giacomo/.rvm/gems/ruby-2.1.0@myproject/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => notes


--

G.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users