一直想提高自己的英文阅读水平。 最近正好有点时间,所以想找一些英文文章来翻译,看到我们 ruby-china guides http://guides.ruby-china.org/ 上面有很多翻译任务,就有点心痒痒的。想问如何能进行翻译,是不是直接点#我要翻译#就可以了,翻译后的文章需要审查吗?
@Juanito 我在执行 rake generate_guides_CN 时报错
/home/zhu/.rvm/rubies/ruby-1.8.7-p358/bin/ruby rails_guides.rb
warning: Insecure world writable dir /usr/maven/bin in PATH, mode 040777
/home/zhu/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- redcarpet (LoadError)
from /home/zhu/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from rails_guides.rb:28
rake aborted!
是不是需要先执行 bundle install
@Juanito 我在执行 can deploy:setup 时报错
``* executing
deploy:setup'
triggering before callbacks for `deploy:setup'
local:generate_guides'
delete all the outfiles./config/deploy.rb:20: warning: Insecure world writable dir /usr/maven/bin in PATH, mode 040777
generate the lastest guides/home/zhu/.rvm/rubies/ruby-1.8.7-p358/bin/ruby rails_guides.rb
warning: Insecure world writable dir /usr/maven/bin in PATH, mode 040777
/home/zhu/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
gem_original_require': ./rails_guides/body_converter.rb:75: syntax error, unexpected ':', expecting kEND (SyntaxError)
rndr = MarkdownRender.new with_toc_data: true
^
./rails_guides/body_converter.rb:76: syntax error, unexpected ':', expecting kEND
md = Redcarpet::Markdown.new rndr, table: true
^
from /home/zhu/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in require'
from ./rails_guides/generator.rb:11
from /home/zhu/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
gem_original_require'
from /home/zhu/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in require'
from rails_guides.rb:52
rake aborted!
``
这是由于我少安装了什么 gems 包吗?我的环境 $ ruby -v ruby 1.8.7 (2012-02-08 patchlevel 358) [i686-linux]
$ gem list /home/zhu/.rvm/rubies/ruby-1.8.7-p358/bin/gem:4: warning: Insecure world writable dir /usr/maven/bin in PATH, mode 040777
*** LOCAL GEMS ***
actionmailer (2.3.14) actionpack (3.2.3, 2.3.14) activemodel (3.2.3) activerecord (2.3.14) activeresource (2.3.14) activesupport (3.2.3, 2.3.14) builder (3.0.0) bundler (1.1.3) capistrano (2.11.2) coderay (1.0.6) edavis10-object_daddy (0.4.3) erubis (2.7.0) fastercsv (1.5.4) highline (1.6.11) hike (1.2.1) i18n (0.6.0, 0.4.2) journey (1.0.3) json (1.6.6) metaclass (0.0.1) mocha (0.10.5) multi_json (1.2.0) mysql (2.8.1) mysql2 (0.3.11) net-ldap (0.3.1) net-scp (1.0.4) net-sftp (2.0.5) net-ssh (2.3.0) net-ssh-gateway (1.1.0) nokogiri (1.5.3, 1.5.2) object-daddy (1.0.1) object_daddy (0.4.3) pg (0.13.2) rack (1.4.1, 1.1.3) rack-cache (1.2) rack-test (0.6.1) rails (2.3.14) rake (0.9.2.2) rdoc (3.12) redcarpet (2.1.1) RedCloth (4.2.9) rmagick (2.13.1) ruby-openid (2.1.8) shoulda (2.10.3) sprockets (2.1.2) sqlite3 (1.3.5) tilt (1.3.3) tzinfo (0.3.33) w3c_validators (1.2)
can deploy:setup
是部署到服务器的。你不用执行这个。
好好看看 github 的 readme. 看明白后再动手 (如果你不知道怎么做的话...)
ok。另外执行 rake generate_guides_CN 之前是否需要先安装 bundler,并执行 bundle install。如果是,最好在首页说明下。