Bundler 1.0.21& Ruby 1.9.3 - " $ bundle config" | - >返回" UTF-8中无效的字节序列(ArgumentError)"

时间:2012-02-12 07:23:34

标签: ruby macos utf-8 rake bundler

我对这些东西都很陌生,所以我可能犯了一些简单的(和/或可怕的灾难性)错误。在下文中,我描述了我遇到的问题网络,但我得到的印象是“bundle config”错误是根源。这是我一直面临的问题:

我一直试图用Wagn的有趣安排建立一个个人维基。我一直在尝试install version 1.8 according to the instructions,但是我已经在第三步“配置”上工作了一个多星期,它指示我运行这个捆绑命令:

$ bundle exec rake wagn:install 

我正在运行OS X 10.6.8,MySQL Ver 14.14 Distrib 5.5.20,Ruby 1.9.3,Rails 2.3.11,Bundler 1.0.21和Rake 0.9.2.2(认为一切都是相关的)。

最初,我收到了这个错误:

rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)

我(希望)通过制作repairs suggested by Matthew Mceachen来克服。

我现在已经被以下错误所困扰,当我尝试运行上面引用的“bundle exec rake”命令(用户名替换为'ME')时返回错误:

xxxxxxxxxxxxxxxx:wagn xxxxxxxxx$ bundle exec rake wagn:install
/Users/ME/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/settings.rb:11:in `[]': undefined method `[]' for false:FalseClass (NoMethodError)
    from /Users/ME/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler.rb:261:in `configure_gem_home_and_path'
    from /Users/ME/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler.rb:82:in `configure'
    from /Users/ME/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler.rb:136:in `definition'
    from /Users/ME/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler.rb:126:in `load'
    from /Users/ME/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler.rb:110:in `setup'
    from /Users/ME/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/cli.rb:340:in `exec'
    from /Users/ME/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/vendor/thor/task.rb:22:in `run'
    from /Users/ME/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
    from /Users/ME/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/vendor/thor.rb:263:in `dispatch'
    from /Users/ME/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/vendor/thor/base.rb:386:in `start'
    from /Users/ME/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/bin/bundle:13:in `<top (required)>'
    from /Users/ME/.rvm/gems/ruby-1.9.3-p0/bin/bundle:19:in `load'
    from /Users/ME/.rvm/gems/ruby-1.9.3-p0/bin/bundle:19:in `<main>'

我尝试针对bundler配置检查这一点,但在使用“$ bundle config”时收到以下错误:

XXXXXXXXXXXXX:wagn XXXXXXXXX$ bundle config
Settings are listed in order of priority. The top value will be used.

    /Users/ME/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/settings.rb:27:in `block in all': invalid byte sequence in UTF-8 (ArgumentError)
        from /Users/ME/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/settings.rb:27:in `select'
        from /Users/ME/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/settings.rb:27:in `all'
        from /Users/ME/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/cli.rb:375:in `config'
        from /Users/ME/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/vendor/thor/task.rb:22:in `run'
        from /Users/ME/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
        from /Users/ME/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/vendor/thor.rb:263:in `dispatch'
        from /Users/ME/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/vendor/thor/base.rb:386:in `start'
        from /Users/ME/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/bin/bundle:13:in `<top (required)>'
        from /Users/ME/.rvm/gems/ruby-1.9.3-p0/bin/bundle:19:in `load'
        from /Users/ME/.rvm/gems/ruby-1.9.3-p0/bin/bundle:19:in `<main>'

我发现有几个关于错误引用“无效字节序列”的讨论,它们似乎都没有以任何明确的方式适用于我的情况。最常见的响应似乎是检查和区域设置,并确保所有内容都分配给UTF-8,我做了。 $ locale现在返回:

LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=

我的宝石列表,好的衡量标准:

actionmailer (3.2.1, 2.3.11)
actionpack (3.2.1, 2.3.11)
activemodel (3.2.1)
activerecord (3.2.1, 2.3.11)
activeresource (3.2.1, 2.3.11)
activesupport (3.2.1, 2.3.11)
arel (3.0.0)
aws-s3 (0.6.2)
builder (3.0.0)
bundler (1.0.21 ruby)
erubis (2.7.0)
hike (1.2.1)
hoptoad_notifier (2.4.11)
htmlentities (4.2.4)
i18n (0.6.0)
image_science (1.2.1)
journey (1.0.1)
json (1.6.5, 1.4.6)
macaddr (1.0.0)
mail (2.4.1)
mime-types (1.17.2, 1.16)
multi_json (1.0.4)
mysql (2.8.1)
newrelic_rpm (3.3.1, 3.1.0)
polyglot (0.3.3)
rack (1.4.1, 1.1.3, 1.1.2)
rack-cache (1.1)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.1, 2.3.11)
railties (3.2.1)
rake (0.9.2.2, 0.9.2)
rdoc (3.12)
ruby-mysql (2.9.4)
RubyInline (3.8.6)
spork (0.9.0)
sprockets (2.1.2)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.31)
uuid (2.2.0)
xml-simple (1.1.1, 1.1.0)
ZenTest (4.6.2, 4.5.0)

您可能提供的任何见解都会非常有用。即使我似乎指向了完全错误的方向或任何其他方面,我也会感激地接受一些指向我的话。提前谢谢!

0 个答案:

没有答案