2013-04-28 30 views
0

我對Rails很陌生,並且正試圖通過橡膠來實現我的應用程序設置。我能夠在沒有問題的情況下獲得測試應用程序,但在實際嘗試硫化我的構建應用程序時遇到了某種錯誤。試圖尋找高和低無濟於事。任何人都知道我需要做什麼來擺脫這個問題?非常感激。Rails上的NoMethodError使用橡膠進行硫化

localhost:thiswins markhayden$ rubber vulcanize complete_passenger_nginx_mysql 
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/rubber-2.2.4/lib/rubber/commands/vulcanize.rb:53:in `block in <class:Vulcanize>': undefined method `-' for "complete_passenger_nginx_mysql":String (NoMethodError) 
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/clamp-0.6.0/lib/clamp/attribute/declaration.rb:33:in `instance_exec' 
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/clamp-0.6.0/lib/clamp/attribute/declaration.rb:33:in `block in define_writer_for' 
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/clamp-0.6.0/lib/clamp/parameter/parsing.rb:13:in `block (2 levels) in parse_parameters' 
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/clamp-0.6.0/lib/clamp/parameter/parsing.rb:12:in `each' 
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/clamp-0.6.0/lib/clamp/parameter/parsing.rb:12:in `block in parse_parameters' 
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/clamp-0.6.0/lib/clamp/parameter/parsing.rb:10:in `each' 
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/clamp-0.6.0/lib/clamp/parameter/parsing.rb:10:in `parse_parameters' 
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/clamp-0.6.0/lib/clamp/command.rb:55:in `parse' 
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/clamp-0.6.0/lib/clamp/command.rb:68:in `run' 
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/clamp-0.6.0/lib/clamp/subcommand/execution.rb:11:in `execute' 
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/clamp-0.6.0/lib/clamp/command.rb:69:in `run' 
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/clamp-0.6.0/lib/clamp/command.rb:127:in `run' 
from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rubber-2.2.4/bin/rubber:17:in `<top (required)>' 
from /usr/local/rvm/gems/ruby-1.9.3-p392/bin/rubber:19:in `load' 
from /usr/local/rvm/gems/ruby-1.9.3-p392/bin/rubber:19:in `<main>' 
from /usr/local/rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval' 
from /usr/local/rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `<main>' 

回答

1

我們與此相同的問題:

rubber vulcanize complete_passenger_postgresql 

這似乎是因爲它試圖減去一個數組是在53號線橡膠/命令/ vulcanize.rb寶石錯誤字符串是非法的。我把它改爲(如須藤):

invalid = (arg.kind_of?(String) ? [arg] : arg) - VulcanizeThor.valid_templates 

這使設置但是我不知道如果硫化確實比它應該有,因爲我也是新來的橡膠。這是一個非常激烈的措施,所以首先要在非生產環境中嘗試它,請小心!

+0

你是一個拯救生命的人。非常感謝,非常感謝。 – 2013-04-30 15:02:27