Неопределенный метод 'strip' при развертывании приложения Sinatra с использованием capistrano - PullRequest
0 голосов
/ 15 апреля 2011

Я получаю странную ошибку при запуске cap deploy: setup:

cap deploy:setup  
Using ActiveModel validations.  
Validations included SimpleRecord::Base  
New Aws::SdbInterface using per_thread-connection mode  
New Aws::S3Interface using per_thread-connection mode  
/Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/capistrano-2.5.21/lib/capistrano/command.rb:24:in `initialize': undefined method `strip' for Sinatra::Application:Class (NoMethodError)  
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/capistrano-2.5.21/lib/capistrano/command.rb:109:in `new'  
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/capistrano-2.5.21/lib/capistrano/command.rb:109:in `else'  
from /Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/capistrano-2.5.21/lib/capistrano/configuration/actions/invocation.rb:144:in `block in run'  
    from /Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/capistrano-2.5.21/lib/capistrano/command.rb:101:in `initialize'  
    from /Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/capistrano-2.5.21/lib/capistrano/configuration/actions/invocation.rb:144:in `new'  
    from /Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/capistrano-2.5.21/lib/capistrano/configuration/actions/invocation.rb:144:in `run'  
    from Capfile:9:in `load'  
    from /Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/capistrano-2.5.21/lib/capistrano/configuration/loading.rb:93:in `instance_eval'  
    from /Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/capistrano-2.5.21/lib/capistrano/configuration/loading.rb:93:in `load'  
    from /Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/capistrano-2.5.21/lib/capistrano/configuration/loading.rb:172:in `load_from_file'  
    from /Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/capistrano-2.5.21/lib/capistrano/configuration/loading.rb:89:in `load'  
    from /Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/capistrano-2.5.21/lib/capistrano/configuration/loading.rb:86:in `block in load'  
    from /Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/capistrano-2.5.21/lib/capistrano/configuration/loading.rb:86:in `each'  
    from /Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/capistrano-2.5.21/lib/capistrano/configuration/loading.rb:86:in `load'  
    from /Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/capistrano-2.5.21/lib/capistrano/cli/execute.rb:65:in `block in load_recipes'  
    from /Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/capistrano-2.5.21/lib/capistrano/cli/execute.rb:65:in `each'  
    from /Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/capistrano-2.5.21/lib/capistrano/cli/execute.rb:65:in `load_recipes'  
    from /Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/capistrano-2.5.21/lib/capistrano/cli/execute.rb:31:in `execute!'  
    from /Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/capistrano-2.5.21/lib/capistrano/cli/execute.rb:14:in `execute'  
    from /Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/gems/capistrano-2.5.21/bin/cap:4:in `<top (required)>'  
    from /Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/bin/cap:19:in `load'  
    from /Users/myusername/.rvm/gems/ruby-1.9.2-p136@sinatra/bin/cap:19:in `<main>'  

Есть идеи, как решить эту проблему?

1 Ответ

0 голосов
/ 18 апреля 2011

Оказывается, MyApp.rb на самом деле не определил класс MyApp. Я добавил это: класс MyApp

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...