开发者

Undefined method 'strip' when deploying Sinatra Application using capistrano

I'm getting a strange error when running 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/myusernam开发者_如何学Ce/.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>'  

Any ideas on how to troubleshoot this?


It turns out the MyApp.rb did not actually define class MyApp. I added this: class MyApp < Sinatra::Base that error is now cleared.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜