Jekyll Installation Fails - ruby-on-rails

I'm trying to install Jekyll on my mac, it was not happening at all so I tried to reinstall my rvm 1.9.3. But I am getting following error now. It will be great if some one can help me to fix this.
...
e.rb, skipping
Installing ri documentation for parslet-1.5.0
unable to convert U+00E5 from UTF-8 to US-ASCII for test/test_child.rb, skipping
Installing ri documentation for posix-spawn-0.3.8
unable to convert U+2014 from UTF-8 to US-ASCII for lib/pygments/popen.rb, skipping
unable to convert U+00F8 from UTF-8 to US-ASCII for test/test_pygments.rb, skipping
unable to convert "\xC5" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for vendor/pygments-main/AUTHORS, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for vendor/pygments-main/CHANGES, skipping
unable to convert U+2219 from UTF-8 to US-ASCII for vendor/pygments- main/tests/examplefiles/coq_RelationClasses, skipping
unable to convert "\xE9" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for vendor/pygments-main/tests/examplefiles/example.cpp, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for vendor/pygments-main/tests/examplefiles/fucked_up.rb, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for vendor/pygments-main/tests/examplefiles/py3_test.txt, skipping
RDoc::Parser::Ruby failure around line 1 of
vendor/pygments-main/tests/examplefiles/ruby_func_def.rb
Before reporting this, could you check that the file you're documenting
has proper syntax:
/Users/mauliks/.rvm/rubies/ruby-1.9.3-p484/bin/ruby -c vendor/pygments- main/tests/examplefiles/ruby_func_def.rb
RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.
The internal error was:
(NoMethodError) undefined method `name' for # <RDoc::RubyToken::TkLPAREN:0x007fa58bfdcf68>
ERROR: While executing gem ... (NoMethodError)
undefined method `name' for #<RDoc::RubyToken::TkLPAREN:0x007fa58bfdcf68>
Thanks in advance.

Finally I fixed that,
gem install rdoc --pre

Related

rspec test failures with present to non-English symbols

I'm comparing multiple files containing russian characters, and that's a result of getting. I replaced the symbols and the tests were properly
My environments: Rails 5.0.0.1 and ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
Files use utf-8 encoding.
Failure/Error: Feror::AppGenerator.start args, { destination_root: spec_path }
Encoding::CompatibilityError:
incompatible character encodings: ASCII-8BIT and UTF-8

ArgumentError (invalid byte sequence in US-ASCII): in ruby upgrade 1.9.3

I am using ruby 1.9.3 and rails 3.0.3 in my application.while uploading any files i am getting following error in production
ArgumentError (invalid byte sequence in US-ASCII):
config/initializers/rake_multipart.rb:35:in =~'
config/initializers/rake_multipart.rb:35:inblock in parse_multipart'
config/initializers/rake_multipart.rb:30:in loop'
config/initializers/rake_multipart.rb:30:inparse_multipart'
If you are on macOS or Linux, you can start Middleman this way to force it to use UTF-8:
LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8 middleman
Not sure about Windows, though.

UTF8 error in shapado installation

Hi I did the installation until “rake bootstrap RAILS_ENV=development” line. After that I get this error
WARNING: Sinatra 1.2.x has reached its EOL. Please upgrade. rake aborted! (eval):1: invalid multibyte char (UTF-8) (eval):1: invalid multibyte char (UTF-8) (eval):1: syntax error, unexpected end-of-input /[a-zA-Z][a-zA-Z0-9_-�-�]{0,24}/
^
/home/canercak/.bundler/ruby/2.0.0/mongoidext-ea4337c5aebe/lib/mongoidext.rb:8:in '
/home/canercak/dev/shapado/config/application.rb:16:in‘ /home/canercak/dev/shapado/Rakefile:4:in `’ (See full trace by running task with —trace)
I have ubuntu 13 runnig in US-EN settings. I used magic_encoding to add “# –– encoding : utf-8 ––” on top of every file but still get the error.
Any help would be greatly appreciated
I've sorted it out by changing rvm version to 1.9ç.3 and reinstalling the app

output_safety.rb:34 warning: regexp match /.../n against to UTF-8 string

When starting up my WEBrick server, I get next warning when calling the home page:
c:/Program Files/jruby-1.6.7/lib/ruby/gems/1.8/gems/activesupport-
3.2.2.rc1/lib/active_support/core_ext/string/output_safety.rb:34
warning: regexp match /.../n against to UTF-8 string
Can someone tell me why I'm getting this warning?
+
I'm running JRuby in 1.9 mode, but here I'm getting an error from a gem in 1.8 folder. Why is that? Shouldn't the gems from the 1.9 folder be used?
this issue is discussed here github.com/rails/rails/issues/3927

Gem update: unable to convert "\xE7" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII

just ran gem update on a light use server machine that hadn't been updated in a while... and am getting loads of 'unable to convert "\x??" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for..." errors. Included is an except from console. anyone know what's going on?
$ sudo gem update
Installing ri documentation for railties-3.0.4...
Installing ri documentation for minitest-2.0.2...
Installing ri documentation for net-ssh-2.1.0...
unable to convert "\xE7" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/net/ssh/authentication/pageant.rb, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/net/ssh/buffered_io.rb, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/net/ssh/service/forward.rb, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for THANKS.rdoc, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for CHANGELOG.rdoc, skipping
Installing ri documentation for rails-3.0.4...
file 'lib' not found
Installing ri documentation for rails3-generators-0.17.4...
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README.rdoc, skipping
Installing ri documentation for rdoc-3.5.3...
unable to convert U+201D from UTF-8 to US-ASCII for lib/rdoc/text.rb, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for History.txt, skipping
Installing ri documentation for rspec-core-2.5.1...
unable to convert "\xC2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/rspec/core/subject.rb, skipping
Installing ri documentation for rspec-expectations-2.5.0...
unable to convert "\xC2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/rspec/matchers.rb, skipping
Installing ri documentation for rspec-mocks-2.5.0...
Installing ri documentation for rspec-2.5.0...
Installing ri documentation for rspec-rails-2.5.0...
I have had a similar issue on my Mac OS X using iTerm2 instead of the default OS X Terminal.app.
The LC_CTYPE is not set properly by iTerm2, once I have added export LC_CTYPE="utf-8" to ~/.bash_profile the gem installation goes smoothly.
note: of course you can add the export to any of the other profile files
The combination of Daniel and werm's answers worked for me, once I also unset LC_ALL. I ended up with this:
export LC_CTYPE=en_US.UTF-8
export LANG=en_US.UTF-8
unset LC_ALL
Try running locale in your SSH terminal. This problem just started popping up for me. When I do locale I get this:
LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=
The only fix I know of is to type LANG=en_US.UTF-8 every time I login through SSH.
I was getting this same issue w/ installing another gem and didn't know how to get around it even after adding export LC_CTYPE="utf-8" to my ~/.bash_profile. It wasn't until I ran sudo gem update after that was able to install the gem.
Note that I wanted to contribute this to the original accepted answer, however not enough points yet. :( Nonetheless I hope this helps someone else.

Resources