ArgumentError: invalid byte sequence in US-ASCII#35
ArgumentError: invalid byte sequence in US-ASCII#35ram-ai-kumar wants to merge 1 commit intorails:masterfrom
Conversation
|
Instead of changing André's (@indirect's) name, could you instead add this to the top of the gemspec and see if it fixes it (if that doesn't work, see if adding it to your Gemfile fixes it): LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"I know I wouldn't want my name misspelled in the gemspec if avoidable ;-) |
|
Greetings Steve, On 22-Nov-2011, at 3:07 AM, Steve Schwartz wrote:
I totally agree. I googled for this error and found the same solution.
Regards, Ram Dream it. Discuss it. Watch it. +91-95-606-DELHI (+91-95606-33544) This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only by intended recipients. Unauthorized access to this e-mail (or attachments) and disclosure or copying of its contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately by e-mail/phone & delete it from their system without making any copies or disclosing it to a third person. |
|
Did you have to export these to your environment, or would it work to add them just to the gemspec? It'd be nice if installing this gem didn't rely on having a specific lang setting already in the environment. |
|
If you're running ruby web servers with LANG set to ASCII, won't that just mask the problem until you run into it later with UTF-8 input from the web? On Nov 21, 2011, at 12:25 PM, Steve Schwartz wrote:
|
|
@indirect, typically I would agree, but nothing says that the site running on your web server takes any input from the web. If there were no legitimate reasons to have LANG set to ASCII, I would assume it wouldn't be an option (even though I can't really think of any). |
|
Many (older?) Linuxes just default to ASCII, because they assume that you will not deal with any files or text that is in any other encoding. So no, I don't really think there is a legitimate reason for your web server to have LANG set to ASCII anymore. :) On Nov 21, 2011, at 12:33 PM, Steve Schwartz wrote:
|
|
Eh, fair enough. At least we have this ticket now with a documented solution if anyone else comes across it in the googles. @ramonrails, I think we're going to close this one down, but thanks for reporting it :-) |
|
Crashes deploy in capistrano Ruby 1.9.3p0. Looks like archlinux doesn't set the LC_ALL var. Fix: |
|
@nofxx, you should be able to fix the problem by updating the server you're deploying to. Then you don't have to set the variables every time in your cap task. |
|
@JangoSteve, that'll work if you add it to somwhere on /etc/profiles (for all users) I imagine, otherwise the vars are persisted in per session basis. |
|
Thank u guys, this solution helps me a lot... |
|
Is there any way to make the gem itself alter its environment to have these variables set as it gets installed? A gem installation ideally shouldn't require the end user to make environmental alterations before installing it. |
|
@pjlegato agreed, see my first comment. If anyone having the problem wants to submit a patch, I'd be happy to take a look. |
|
Sorry to post in a closed issue, but for anyone else having issues with set :bundle_cmd, "LANG='en_US.UTF-8' LC_ALL='en_US.UTF-8' bundle" |
|
@ndbroadbent Much obliged! I was having this issue with capistrano, and your snippet fixed it. |
|
@ndbroadbent Thanks man, you saved my day! |
set :default_environment, {
'LANG' => 'en_US.UTF-8'
}Credit: http://ruckus.tumblr.com/post/18613786601/bundler-install-error-argumenterror-invalid-byte |
|
Very pleased to find this issue. Was entirely unaware of the |
|
@JangoSteve Thanks |
Accented characters in the name are causing this error.