ruby / www.ruby-lang.org

Source of the https://www.ruby-lang.org website.
880 stars 605 forks source link

mina deploy not working #71

Closed stomar closed 11 years ago

stomar commented 11 years ago
[...]
jekyll --no-auto --no-server
       Configuration from /home/rubylang/www.ruby-lang.org/tmp/build-136471852716743/_config.yml
       Building site: /home/rubylang/www.ruby-lang.org/tmp/build-136471852716743 -> /home/rubylang/www.ruby-lang.org/tmp/build-136471852716743/_site
       YAML Exception reading index.md: invalid byte sequence in US-ASCII
[...]

Full log here: gist deleted

hsbt commented 11 years ago

Thanks for check it.

I probably fixed LANG variable. If you can't deploy again, please show me results of echo $LANG in your machine. this failure caused by jekyll with LANG=C

stomar commented 11 years ago

Cannot test because the deploy now fails already during cloning...

➜  www.ruby-lang.org git:(master) ✗ echo $LANG; mina deploy           
de_DE.UTF-8
-----> Loading rbenv
-----> Creating a temporary build path
-----> Fetching new git commits
-----> Using git branch 'master'
       Cloning into ....
       error: git checkout-index: unable to write file ja/man/archive/ruby-refm-1.9.0-dynamic.tar.gz
       error: git checkout-index: unable to write file ja/man/archive/ruby-refm-1.9.0-dynamic.zip
       fatal: cannot create directory at 'ja/news': No space left on device
       done.
...
hsbt commented 11 years ago

It seems disk full error. I deleted old files in neon.ruby-lang.org.

stomar commented 11 years ago

Retried again, still the same YAML exception.

hsbt commented 11 years ago

Thanks, I added debug code before jekyll running. Please show me to error log with master branch.

stomar commented 11 years ago
...
-----> Installing gem dependencies using Bundler
       Using fast-stemmer (1.0.2) 
       Using classifier (1.3.3) 
       Using directory_watcher (1.5.1) 
       Using kramdown (0.14.2) 
       Using liquid (2.5.0) 
       Using syntax (1.0.0) 
       Using maruku (0.6.1) 
       Using posix-spawn (0.3.6) 
       Using yajl-ruby (1.1.0) 
       Using pygments.rb (0.3.7) 
       Using jekyll (0.12.1) 
       Using nokogiri (1.5.9) 
       Using spidr (0.4.1) 
       Using bundler (1.3.4) 
       Your bundle is complete!
       Gems in the groups development and test were not installed.
       It was installed into ./vendor/bundle
       ja_JP.UTF-8
       jekyll --no-auto --no-server
       Configuration from /var/www/neon.ruby-lang.org/tmp/build-136473454829725/_config.yml
       Building site: /var/www/neon.ruby-lang.org/tmp/build-136473454829725 -> /var/www/neon.ruby-lang.org/tmp/build-136473454829725/_site
       YAML Exception reading index.md: invalid byte sequence in US-ASCII
...
stomar commented 11 years ago

Also setting LC_ALL did the trick, see 40dc7fac45c369c7afdbd22006e05500919d427e.

I still don't understand, since Jekyll previously worked without problem for the capistrano task. Different Ruby version or environment...?

hsbt commented 11 years ago

fmm, I can't see reproduction case... I added workaround of Encoding.default_external into jekyll. it works with LANG=C now. Please try mina deploy.

stomar commented 11 years ago

It works now. (It also worked for me with setting of LC_ALL and LANG.)

But I don't understand how/where you changed the encoding. Could you please clarify?

hsbt commented 11 years ago

@stomar Thank you so much for your report. I removed ja_JP.UTF-8, because vit-core team don't use ja_JP environment :smile:

jekyll can't read i18n text such as CJK language. It is caused by Encoding.default_external was US-ASCII when LANG=C. I added Encoding.default_external = Encoding::UTF_8 into line 31 of lib/jekyll/convertible.rb. It fixed exception of YAML.load with LANG=C.

stomar commented 11 years ago

I see, thanks.

postmodern commented 11 years ago

I was able to deploy once, but now I'm getting this error:

 !     ERROR: Deploy failed.
-----> Cleaning up build
       Unlinking current
       OK
       /home/rubylang/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/bundler-1.3.4/lib/bundler/rubygems_integration.rb:214:in `block in replace_gem': rake is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
       from /home/rubylang/.rbenv/versions/2.0.0-p0/bin/rake:22:in `
' ! Command failed. Failed with status 19
postmodern commented 11 years ago

Added rake to the Gemfile, seems to be working now.