turingschool / curriculum

Turing's main repository of tutorials and projects
385 stars 501 forks source link

Unable to run `rake generate` locally #343

Closed kytrinyx closed 11 years ago

kytrinyx commented 11 years ago

I now get the following error:

Building site: source -> public
/path/to/curriculum/plugins/backtick_code_block.rb:14:in `gsub': incompatible character encodings: ASCII-8BIT and UTF-8 (Encoding::CompatibilityError)
    from /path/to/curriculum/plugins/backtick_code_block.rb:14:in `render_code_block'
    from /path/to/curriculum/plugins/octopress_filters.rb:12:in `pre_filter'
steveklabnik commented 11 years ago

Uuuuugh. So now it's doing it the reverse way?

steveklabnik commented 11 years ago

I am now seeing this too. wtf heroku.

jcasimir commented 11 years ago
/path/to/curriculum/plugins/backtick_code_block.rb:14

This method is honestly some of the scariest code I've ever seen. I'm surprised it took this long to become a big pain in the ass.

steveklabnik commented 11 years ago

Yeah. It's standard Octopress stuff, so.....

burtlo commented 11 years ago

Removing the force_encoding to 'ASCII-8BIT' brings the ability back to rake preview and rake generate. All the post content that is currently being processed is UTF-8.

http://stackoverflow.com/questions/4867883/convert-non-ascii-chars-from-ascii-8bit-to-utf-8

I guess I am not sure about Issue #328.

steveklabnik commented 11 years ago

Right, then it fails to compile on heroku.

burtlo commented 11 years ago

I'm feeling what some refer to as the 'rub'

steveklabnik commented 11 years ago

Yes. :/

burtlo commented 11 years ago

Well for a hack I could add an environment variable that is only set on HEROKU which would perform the forced encoding.

kytrinyx commented 11 years ago

I'm now able to rake generate locally, and rake ship.

(Presumably @burtlo added the environment variable on Heroku).