2012-09-20 2 views
5

これは私の初めてのラバー使用またはAmazon EC2への配備です。私はこれに従いますRailscast。私は全面的に探偵して、誰もこの問題を抱えているようだ。ここで私が実行したときに私のコンソールログですcap rubber:create_stagingRubberを使用してjRoRアプリケーションを配備し、NoMethodErrorを取得しようとしています:nilのための未定義メソッド `authorize_port_range ':NilClass

[email protected]:~/develops/grouper$ cap rubber:create_staging 
    triggering load callbacks 
    * executing `rubber:init' 
    * executing `rubber:create_staging' 
Hostname to use for staging instance [production]: 
Roles to use for staging instance [apache,app,collectd,common,db:primary=true,elasticsearch,examples,graphite_server,graphite_web,graylog_elasticsearch,graylog_mongodb,graylog_server,graylog_web,haproxy,mongodb,monit,passenger,postgresql,postgresql_master,web,web_tools]: 
    * executing `rubber:create' 
Excon nonblock is not supported by your OpenSSL::SSL::SSLSocket 
Excon nonblock is not supported by your OpenSSL::SSL::SSLSocket 
    * Creating new security group: grouper_production_default 
    * Creating new rule: {"source_group_name"=>"grouper_production_default", "source_group_account"=>"<account id redacted>"} 
[DEPRECATION] authorize_group_and_owner is deprecated, use authorize_port_range with :group option instead 
    * Creating new rule: {"protocol"=>"tcp", "from_port"=>"22", "to_port"=>"22", "source_ips"=>["0.0.0.0/0"]} 
NoMethodError: undefined method `authorize_port_range' for nil:NilClass 
    add_security_group_rule at /home/user529789/.rvm/gems/[email protected]/gems/rubber-2.1.0/lib/rubber/cloud/fog.rb:182 
        send at org/jruby/RubyKernel.java:2088 
      method_missing at /home/user529789/.rvm/gems/[email protected]/gems/rubber-2.1.0/lib/rubber/thread_safe_proxy.rb:13 
    sync_security_groups at /home/user529789/.rvm/gems/[email protected]/gems/rubber-2.1.0/lib/rubber/recipes/rubber/security_groups.rb:221 
        each at org/jruby/RubyArray.java:1615 
    sync_security_groups at /home/user529789/.rvm/gems/[email protected]/gems/rubber-2.1.0/lib/rubber/recipes/rubber/security_groups.rb:220 
        each at org/jruby/RubyArray.java:1615 
    sync_security_groups at /home/user529789/.rvm/gems/[email protected]/gems/rubber-2.1.0/lib/rubber/recipes/rubber/security_groups.rb:214 
        each at org/jruby/RubyArray.java:1615 
    sync_security_groups at /home/user529789/.rvm/gems/[email protected]/gems/rubber-2.1.0/lib/rubber/recipes/rubber/security_groups.rb:208 
    setup_security_groups at /home/user529789/.rvm/gems/[email protected]/gems/rubber-2.1.0/lib/rubber/recipes/rubber/security_groups.rb:51 
      create_instance at /home/user529789/.rvm/gems/[email protected]/gems/rubber-2.1.0/lib/rubber/recipes/rubber/instances.rb:255 
      create_instance at /home/user529789/.rvm/gems/[email protected]/gems/rubber-2.1.0/lib/rubber/recipes/rubber/instances.rb:254 
     create_instances at /home/user529789/.rvm/gems/[email protected]/gems/rubber-2.1.0/lib/rubber/recipes/rubber/instances.rb:217 
        call at org/jruby/RubyProc.java:270 
        call at org/jruby/RubyProc.java:224 

答えて

0

私の推測でその範囲を探していると、スタックトレースを使用すると、特にJRubyのはあるかもしれない、範囲は1つのポートから同一のポートとルビーにある与えているということですポート範囲が誤っていると解釈します。

あなたはIRB

(22..22).to_a上のJRubyのバージョンで実行してみて、あなたが得るもの表示される場合があります。 mriでは[22]が得られますが、jrubyには実装上のバグがあるかもしれません。

私はここにあると思い障害発生時に実行中のコードは: https://github.com/rubber/rubber/blob/v2.1.0/lib/rubber/cloud/fog.rb#L182

EDIT

さらに数分探した後、その明確なゴムは霧の宝石に引数を渡し、私は」という範囲が解決するかもしれないが、霧がそれを使用している方法は、範囲を期待していることは確かです。 21〜23または22〜23の範囲のようなものを試して、それがエラーを過ぎてしまうかどうかを確認することができます。また、ノートとして、あなたが使用しているゴムのバージョンはかなりマスターバージョンの後ろにある。私はこれが望ましいかどうかを指定するための参照を持っていないが、あなたはそれに気づくべきである。がんばろう。

0
私のために働いた回避策がすべてでこの効果の わからない「偽」に「真」からセキュリティグループに関連するすべてのオプションを rubber.yml

に移動し、設定することです

しかし、それは通過するようです。

関連する問題