"fog openstack" authentification error - ruby

Trying to connect locally deployed openstack (pike) with fog.
Firstly, curl connection works well with the command:
https://hastebin.com/fihojuqize.scala
With this in mind, i've created fog credentials file: https://hastebin.com/hexanixucu.scala and run
fog openstack
Compute[:openstack].servers
This leads to an error like (full text here)
:status => 302
:status_line => "HTTP/1.1 302 Found\r\n"
from /var/lib/gems/2.3.0/gems/excon-0.60.0/lib/excon/middlewares/expects.rb:7:in `response_call'
from /var/lib/gems/2.3.0/gems/excon-0.60.0/lib/excon/middlewares/response_parser.rb:9:in `response_call'
from /var/lib/gems/2.3.0/gems/excon-0.60.0/lib/excon/connection.rb:414:in `response'
from /var/lib/gems/2.3.0/gems/excon-0.60.0/lib/excon/connection.rb:263:in `request'
from /var/lib/gems/2.3.0/gems/fog-core-1.45.0/lib/fog/core/connection.rb:81:in `request'
from /var/lib/gems/2.3.0/gems/fog-openstack-0.1.23/lib/fog/openstack.rb:610:in `get_version'
from /var/lib/gems/2.3.0/gems/fog-openstack-0.1.23/lib/fog/openstack.rb:583:in `get_supported_microversion'
from /var/lib/gems/2.3.0/gems/fog-openstack-0.1.23/lib/fog/openstack/core.rb:122:in `set_microversion'
from /var/lib/gems/2.3.0/gems/fog-openstack-0.1.23/lib/fog/openstack/core.rb:212:in `authenticate'
from /var/lib/gems/2.3.0/gems/fog-openstack-0.1.23/lib/fog/compute/openstack.rb:397:in `initialize'
from /var/lib/gems/2.3.0/gems/fog-core-1.45.0/lib/fog/core/service.rb:115:in `new'
from /var/lib/gems/2.3.0/gems/fog-core-1.45.0/lib/fog/core/service.rb:115:in `new'
from /var/lib/gems/2.3.0/gems/fog-core-1.45.0/lib/fog/core/services_mixin.rb:16:in `new'
from /var/lib/gems/2.3.0/gems/fog-core-1.45.0/lib/fog/compute.rb:54:in `new'
from /var/lib/gems/2.3.0/gems/fog-core-1.45.0/lib/fog/core/services_mixin.rb:4:in `[]'
from (irb):1:in `<top (required)>'
from /var/lib/gems/2.3.0/gems/fog-1.42.0/bin/fog:76:in `block in <top (required)>'
from /var/lib/gems/2.3.0/gems/fog-1.42.0/bin/fog:76:in `catch'
from /var/lib/gems/2.3.0/gems/fog-1.42.0/bin/fog:76:in `<top (required)>'
from /usr/local/bin/fog:23:in `load'
from /usr/local/bin/fog:23:in `<main>'
First request to "/identity/v3/auth/tokens" was complete, but overall result is bad..
Worth to be mentioned - i've cntlm proxy configured.

Export your openrc file which contains authentication information like this
​export OS_USERNAME=admin
​export OS_PASSWORD=ADMIN_PASS
​export OS_TENANT_NAME=admin
​export OS_AUTH_URL=http://controller:35357/v3.0

Related

Cannot determine timezone from nil (ArgumentError)

I want to use Smashing (a sinitra-based dashboard-making tool) on a Windows machine. When lanching the the default project using smashing start I get the following error :
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/et-orbi-1.1.2/lib/et-orbi.rb:309:in `initialize': Cannot determine timezone from nil (ArgumentError)
(secs:1531385616.656456,utc~:"2018-07-12 08:53:36.6564559936523438",ltz~:nil)
(etz:nil,tnz:"Paris, Madrid (heure d\x92\xE9t\xE9)",tzid:"constant",rv:"2.3.3",rp:"i386-mingw32",win:true,rorv:nil,astz:nil,eov:"1.1.2",eotnz:"???",eotnfz:"???",eotlzn:"???",
debian:nil,centos:nil,osx:nil)
Try setting `ENV['TZ'] = 'Continent/City'` in your script (see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/et-orbi-1.1.2/lib/et-orbi.rb:21:in `new'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/et-orbi-1.1.2/lib/et-orbi.rb:21:in `now'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/et-orbi-1.1.2/lib/et-orbi.rb:259:in `now'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rufus-scheduler-3.4.2/lib/rufus/scheduler.rb:543:in `start'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rufus-scheduler-3.4.2/lib/rufus/scheduler.rb:89:in `initialize'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/smashing-1.1.0/lib/dashing/app.rb:11:in `new'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/smashing-1.1.0/lib/dashing/app.rb:11:in `<top (required)>'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/smashing-1.1.0/lib/dashing.rb:3:in `require'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/smashing-1.1.0/lib/dashing.rb:3:in `<top (required)>'
from config.ru:1:in `require'
from config.ru:1:in `block in <main>'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rack-2.0.5/lib/rack/builder.rb:55:in `instance_eval'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rack-2.0.5/lib/rack/builder.rb:55:in `initialize'
from config.ru:1:in `new'
from config.ru:1:in `<main>'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thin-1.7.2/lib/rack/adapter/loader.rb:33:in `eval'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thin-1.7.2/lib/rack/adapter/loader.rb:33:in `load'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thin-1.7.2/lib/thin/controllers/controller.rb:182:in `load_rackup_config'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thin-1.7.2/lib/thin/controllers/controller.rb:72:in `start'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thin-1.7.2/lib/thin/runner.rb:203:in `run_command'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thin-1.7.2/lib/thin/runner.rb:159:in `run!'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thin-1.7.2/bin/thin:6:in `<top (required)>'
from C:/RailsInstaller/Ruby2.3.3/bin/thin:22:in `load'
from C:/RailsInstaller/Ruby2.3.3/bin/thin:22:in `<main>'
After looking online, I found out that this issue is probably due to Windows, and I tried adding gem 'tzinfo-data' in my Gemfile, but that didn't change anything. Do you know how I could fix that ?
ENV['TZ'] = 'Europe/Paris' at the very beginning of config.ru (before the require) worked

Neoid error when starting Rails server

Having looked into it, and as a relative newbie to graph databases, I've decided that Neoid may be the best way to benefit from Neo4j at this stage. I've come across a problem straight after installing it, on starting up the server. I've installed the gem, added the 01_neo4j.rb file as stated on the github page, added the relevant columns to the models and get the following error:
=> Booting WEBrick
=> Rails 4.0.2 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/open-uri.rb:35:in `initialize': No such file or directory - /dev/null (Errno::ENOENT)
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/open-uri.rb:35:in `open'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/open-uri.rb:35:in `open'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/logger.rb:599:in `create_logfile'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/logger.rb:594:in `open_logfile'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/logger.rb:549:in `initialize'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/logger.rb:314:in `new'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/logger.rb:314:in `initialize'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/neoid-0.1.2/lib/neoid.rb:73:in `new'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/neoid-0.1.2/lib/neoid.rb:73:in `logger'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/neoid-0.1.2/lib/neoid.rb:52:in `initialize_all'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/neoid-0.1.2/lib/neoid/railtie.rb:7:in `block (2 levels) in <class:Railtie>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:36:in `call'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:44:in `each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/application/finisher.rb:62:in `block in <module:Finisher>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:180:in `each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
from C:/Sites/Knock4/config/environment.rb:5:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from C:/Sites/Knock4/config.ru:3:in `block in <main>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from C:/Sites/Knock4/config.ru:in `new'
from C:/Sites/Knock4/config.ru:in `<main>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/commands/server.rb:48:in `app'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/commands/server.rb:75:in `start'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/commands.rb:76:in `block in <top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/commands.rb:71:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
If anyone has any idea what the problem might be here, I would appreciate it. I'm using Rails 4.0.2 (as you can probably see), so not sure if this is an issue.
The error reference shows the following code:
def open(name, *rest, &block) # :doc:
if name.respond_to?(:open)
name.open(*rest, &block)
elsif name.respond_to?(:to_str) &&
%r{\A[A-Za-z][A-Za-z0-9+\-\.]*://} =~ name &&
(uri = URI.parse(name)).respond_to?(:open)
uri.open(*rest, &block)
else
open_uri_original_open(name, *rest, &block)
end
end
With
open_uri_original_open(name, *rest, &block)
being line 35. I have no idea what this means though!
This is caused, on windows, by neoid 0.1.2 which assumes you are on unix and so the standard logger redirects to dev/null. So you must define
ENV['NEOID_LOG'] ||= 'true'
ENV['NEOID_LOG_FILE'] ||= 'log/neoid.log'
and the log will be in the log folders.

Timeout::Error for selenium while loading heavy page

I'm facing a Timeout::Error issue while loading heavy web page. I observed that even if I added an implicit wait call #driver.manage.timeouts.implicit_wait = 300, a timeout error is thrown before 300 seconds - it's thrown in around 60-70 seconds.
Error thrown is -
Timeout::Error
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/protocol.rb:146:in `rescue in rbuf_fill'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/protocol.rb:140:in `rbuf_fill'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/protocol.rb:122:in `readuntil'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/protocol.rb:132:in `readline'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:2562:in `read_status_line'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:2551:in `read_new'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:1319:in `block in transport_request'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:1316:in `catch'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:1316:in `transport_request'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:1293:in `request'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:1286:in `block in request'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:745:in `start'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:1284:in `request'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/http/default.rb:82:in `response_for'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/http/default.rb:38:in `request'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/bridge.rb:598:in `raw_execute'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/bridge.rb:576:in `execute'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/remote/bridge.rb:99:in `get'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/common/navigation.rb:14:in `to'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/selenium/webdriver/common/driver.rb:108:in `get'
backlot.rb:17:in `test_backlot'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/minitest/unit.rb:949:in `run'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/test/unit/testcase.rb:17:in `run'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/minitest/unit.rb:787:in `block in _run_suite'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/minitest/unit.rb:780:in `map'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/minitest/unit.rb:780:in `_run_suite'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/test/unit.rb:565:in `block in _run_suites'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/test/unit.rb:563:in `each'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/test/unit.rb:563:in `_run_suites'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/minitest/unit.rb:746:in `_run_anything'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/minitest/unit.rb:909:in `run_tests'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/minitest/unit.rb:896:in `block in _run'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/minitest/unit.rb:895:in `each'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/minitest/unit.rb:895:in `_run'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/minitest/unit.rb:884:in `run'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/test/unit.rb:21:in `run'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/test/unit.rb:326:in `block (2 levels) in autorun'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/test/unit.rb:27:in `run_once'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/test/unit.rb:325:in `block in autorun'
try using gem fakeweb
FakeWeb is a helper for faking web requests in Ruby. It works at a global level, without modifying code or writing extensive stubs.
In GEMFILE write
gem 'fakeweb', :require => false
require 'fakeweb'
use above statement in your file
Hope this would work..
I believe the original issue isn't with Selenium and your question is answered here:
'rescue in rbuf_fill': Timeout::Error (Timeout::Error)

Fog creating spot request fails

Here's the paramters I'm passing to connection.spot_requests.create().
{:price=>"1", :image_id=>"ami-63be790a", :groups=>["mcsl-web", "default"], :flavor_id=>"m1.xlarge", :key_name=>"mcsl", :availability_zone=>"us-east-1a", :block_device_mapping=>[{"DeviceName"=>"/dev/sda1", "Ebs.VolumeSize"=>"8", "Ebs.DeleteOnTermination"=>"true"}]}
Here's the error:
/Users/wedtm/.rvm/gems/ruby-1.9.2-p180#global/gems/fog-0.11.0/lib/fog/compute/parsers/aws/spot_instance_requests.rb:37:in `[]=': can't convert String into Integer (Excon::Errors::SocketError)
from /Users/wedtm/.rvm/gems/ruby-1.9.2-p180#global/gems/fog-0.11.0/lib/fog/compute/parsers/aws/spot_instance_requests.rb:37:in `end_element'
from /Users/wedtm/.rvm/gems/ruby-1.9.2-p180#global/gems/nokogiri-1.5.0/lib/nokogiri/xml/sax/document.rb:127:in `end_element_namespace'
from /Users/wedtm/.rvm/gems/ruby-1.9.2-p180#global/gems/nokogiri-1.5.0/lib/nokogiri/xml/sax/push_parser.rb:47:in `native_write'
from /Users/wedtm/.rvm/gems/ruby-1.9.2-p180#global/gems/nokogiri-1.5.0/lib/nokogiri/xml/sax/push_parser.rb:47:in `write'
from /Users/wedtm/.rvm/gems/ruby-1.9.2-p180#global/gems/fog-0.11.0/lib/fog/core/connection.rb:16:in `block in request'
from /Users/wedtm/.rvm/gems/ruby-1.9.2-p180/gems/excon-0.6.6/lib/excon/response.rb:46:in `parse'
from /Users/wedtm/.rvm/gems/ruby-1.9.2-p180/gems/excon-0.6.6/lib/excon/connection.rb:174:in `request'
from /Users/wedtm/.rvm/gems/ruby-1.9.2-p180#global/gems/fog-0.11.0/lib/fog/core/connection.rb:20:in `request'
from /Users/wedtm/.rvm/gems/ruby-1.9.2-p180#global/gems/fog-0.11.0/lib/fog/compute/aws.rb:280:in `request'
from /Users/wedtm/.rvm/gems/ruby-1.9.2-p180#global/gems/fog-0.11.0/lib/fog/compute/requests/aws/request_spot_instances.rb:77:in `request_spot_instances'
from /Users/wedtm/.rvm/gems/ruby-1.9.2-p180#global/gems/fog-0.11.0/lib/fog/compute/models/aws/spot_request.rb:76:in `save'
from /Users/wedtm/.rvm/gems/ruby-1.9.2-p180#global/gems/fog-0.11.0/lib/fog/core/collection.rb:50:in `create'
from /Users/wedtm/.rvm/gems/ruby-1.9.2-p180/gems/knife-ec2-0.5.6/lib/chef/knife/ec2_server_create.rb:259:in `run'
from /Users/wedtm/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.4/lib/chef/knife.rb:391:in `run_with_pretty_exceptions'
from /Users/wedtm/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.4/lib/chef/knife.rb:166:in `run'
from /Users/wedtm/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.4/lib/chef/application/knife.rb:128:in `run'
from /Users/wedtm/.rvm/gems/ruby-1.9.2-p180/gems/chef-0.10.4/bin/knife:25:in `<top (required)>'
from /Users/wedtm/.rvm/gems/ruby-1.9.2-p180/bin/knife:19:in `load'
from /Users/wedtm/.rvm/gems/ruby-1.9.2-p180/bin/knife:19:in `<main>'
This is a bug in fog. I just ran into it myself and wrote a quick patch. You can find my patch at https://github.com/geemus/fog/pull/553

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/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>'
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.

Resources