1

Rails を新しくインストールしましたが、コンソールまたは任意の rake タスクを実行しようとすると、次のようなエラー メッセージが表示されます。

$ rails c
[/.rvm/gems/ruby-1.9.2-p320/specifications/json_pure-1.7.0.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/engineyard-1.4.29.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/launchy-2.0.5.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/engineyard-serverside-adapter-1.6.4.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/escape-0.0.4.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/highline-1.6.11.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/net-ssh-2.2.2.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/json_pure-1.7.0.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/engineyard-1.4.29.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/launchy-2.0.5.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/engineyard-serverside-adapter-1.6.4.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/escape-0.0.4.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/highline-1.6.11.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/net-ssh-2.2.2.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/json_pure-1.7.0.gemspec] isn't a Gem::Specification (NilClss instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/engineyard-1.4.29.gemspec] isn't a Gem::Specification (Nillass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/launchy-2.0.5.gemspec] isn't a Gem::Specification (NilClas instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/engineyard-serverside-adapter-1.6.4.gemspec] isn't a Gem::pecification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/escape-0.0.4.gemspec] isn't a Gem::Specification (NilClassinstead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/highline-1.6.11.gemspec] isn't a Gem::Specification (NilClss instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/net-ssh-2.2.2.gemspec] isn't a Gem::Specification (NilClas instead).
/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb/completion.rb:9:in `require': no such file to load --readline (LoadError)
        from /.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb/completion.rb:9:in `<top (required)>'
        from /.rvm/gems/ruby-1.9.2-p320/gems/railties-3.0.4/lib/rails/commands/console.rb:3:in `requie'
        from /.rvm/gems/ruby-1.9.2-p320/gems/railties-3.0.4/lib/rails/commands/console.rb:3:in `<top required)>'
        from /.rvm/gems/ruby-1.9.2-p320/gems/railties-3.0.4/lib/rails/commands.rb:20:in `require'
        from /.rvm/gems/ruby-1.9.2-p320/gems/railties-3.0.4/lib/rails/commands.rb:20:in `<top (requird)>'
        from script/rails:6:in `require'
        from script/rails:6:in `<main>'

これを引き起こしている可能性のあるアイデアはありますか?

ありがとう。

4

1 に答える 1

0

リードラインだと思います

/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb/completion.rb:9:in `require': no such file to load --readline (LoadError)

以下にいくつかのリソースを示します。

https://rvm.io//packages/readline/

Rails コンソール、RVM、および readline に関する問題

上記がうまくいかない場合は、私が行ったことを実行して、ここで解決策を使用できます。

Rails3 と readline の問題

これは、プロジェクトに rb-readline gem を含めることです。(これがハッキングと見なされるかどうかはわかりません)

https://github.com/luislavena/rb-readline

それが役立つことを願っています。コンソールを一度動作させるのにしばらく時間がかかり、時にはイライラする以上のものでした. 言うまでもなく、いくつかのUbuntuパッケージを更新した後、もう一度やり直さなければなりませんでした。

于 2012-06-02T02:26:44.233 に答える