incompatible character encodings: UTF-8 and ASCII-8BIT #1374

Closed
dnagir opened this Issue May 28, 2011 · 6 comments

Comments

Projects
None yet
6 participants
Contributor

dnagir commented May 28, 2011

When installing gem install rails --pre I am getting the error when generating RDoc:

ERROR:  While generating documentation for activesupport-3.1.0.rc1
... MESSAGE:   incompatible character encodings: UTF-8 and ASCII-8BIT
... RDOC args: --op /home/dima/.rvm/gems/ruby-1.9.2-p180@rc1/doc/activesupport-3.1.0.rc1/rdoc lib --title activesupport-3.1.0.rc1 Documentation --quiet

Full log is at https://gist.github.com/996813

Contributor

dmathieu commented May 28, 2011

This seems to be a rdoc issue, not rails.

Contributor

dnagir commented May 28, 2011

Possibly, but I could install rails 3.0.7 without any errors. It might be that some file in Rails is UTF-8 encoded which might cause the issue.

foeken commented May 29, 2011

I got this when migrating from to ruby 1.9.2, it seems to be an issue with Temfile not being binary by default. Maybe a gem is using this? (Mine was soap4r)

Contributor

dnagir commented May 29, 2011

I don't think there is something to do with gems used because (as I showed in the full log) I was installing Rails in to the empty gemset.

smaboshe commented Jun 3, 2011

Had the same experience as @dnagir running:
gem install rails -v ">=3.1.0rc"
to an empty Ruby 1.9.2 gemset.

Re-running the command installs the Rails 3.1 RC successfully but I think this is not a good "fix".

halfdan commented Jul 20, 2011

This is happening here aswell on a fresh Rails 3.1.0.rc4 application:

$ rake routes --trace
** Invoke routes (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute routes
rake aborted!
incompatible character encodings: UTF-8 and ASCII-8BIT
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0.rc4/lib/rails/tasks/routes.rake:15:in `inspect'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0.rc4/lib/rails/tasks/routes.rake:15:in `inspect'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0.rc4/lib/rails/tasks/routes.rake:15:in `block (2 levels) in <top (required)>'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0.rc4/lib/rails/tasks/routes.rake:11:in `collect'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0.rc4/lib/rails/tasks/routes.rake:11:in `block in <top (required)>'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/ilyas/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:90:in `block (2 levels) in top_level'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:90:in `block in top_level'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:62:in `block in run'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `load'
/home/ilyas/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `<main>'
Tasks: TOP => routes

Setting encoding in environment.rb doesn't fix the issue and setting RUBYOPT will break sprockets (beta10).

@ghost ghost assigned fxn Jul 23, 2011

@fxn fxn closed this in 50203b3 Jul 23, 2011

vishnuatrai pushed a commit to castlerock/rails that referenced this issue Jul 23, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment