Error during creating my own pod with ObjectiveC - ios

I'm creating pod by this great tutorial.
https://www.raywenderlich.com/99386/create-cocoapod-swift.
I use Objective C instead of Swift.
Error happened on this step:
pod repo push MyProj MyProj.podspec --verbose
Output:
Validating spec
MyProj (0.1.0) - Analyzing on iOS 9.0 platform.
Preparing
Cloning spec repo `******` from `https://github.com/******/PodSpecs.git`
$ /Applications/Xcode.app/Contents/Developer/usr/bin/git clone https://github.com/******/PodSpecs.git ******
Cloning into '******'...
warning: You appear to have cloned an empty repository.
-> MyProj (0.1.0)
- ERROR | [iOS] unknown: Encountered an unknown error (Unable to create a source with URL https://github.com/******/PodSpecs.git
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/sources_manager.rb:42:in `find_or_create_source_with_url'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:654:in `block in sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:653:in `map'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:653:in `sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:144:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/validator.rb:373:in `block in download_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/validator.rb:373:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/validator.rb:373:in `download_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/validator.rb:269:in `block in perform_extensive_analysis'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/validator.rb:263:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/validator.rb:263:in `perform_extensive_analysis'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/validator.rb:81:in `validate'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command/repo/push.rb:125:in `block in validate_podspec_files'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command/repo/push.rb:119:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command/repo/push.rb:119:in `validate_podspec_files'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command/repo/push.rb:64:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command.rb:50:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/bin/pod:55:in `'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `'
) during validation.
[!] The `MyProj.podspec` specification does not validate.
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command/repo/push.rb:130:in `block in validate_podspec_files'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command/repo/push.rb:119:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command/repo/push.rb:119:in `validate_podspec_files'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command/repo/push.rb:64:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command.rb:50:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/bin/pod:55:in `'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `'
My podspec file:
Pod::Spec.new do |s|
s.platform = :ios
s.ios.deployment_target = '9.0'
s.name = "MyProj"
s.summary = "MyProj lets a user create his own timer."
s.requires_arc = true
s.version = "0.1.0"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "*** ***" => "***#***.com" }
s.homepage = "https://github.com/******/MyProj"
s.source = { :git => "https://github.com/******/MyProj.git", :tag => "#{s.version}"}
s.framework = "UIKit"
s.dependency 'ReactiveCocoa', '~> 2.5.0'
s.source_files = "MyProj/**/*.{h,m}"
s.resources = "MyProj/**/*.{png,jpeg,jpg,storyboard,xib}"
end
I did all previous steps in tutorial.
Using latest version of cocoapods.
How can I fix this error?
I will be grateful for any help!

Related

fedena : rake aborted school not selected

I was installing fedena on ubuntu installed on wsl and the database creation and migration was successful but when run the command rake fedena:plugins:install_all to install the plugins. in the middle this error pops up that school Not Selected and here is the error trace.
School Not Selected
/root/fedena/vendor/plugins/acts_as_multi_school/lib/multischool/read.rb:46:in `with_school'
/root/fedena/vendor/plugins/acts_as_multi_school/lib/multischool/read.rb:22:in `find_with_school'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/activerecord-2.3.5/lib/active_record/base.rb:1954:in `find'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/activerecord-2.3.5/lib/active_record/base.rb:1954:in `find_or_create_by_config_key'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/activerecord-2.3.5/lib/active_record/base.rb:1940:in `send'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/activerecord-2.3.5/lib/active_record/base.rb:1940:in `method_missing_without_paginate'
/root/fedena/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:170:in `method_missing'
/root/fedena/app/models/configuration.rb:90:in `find_or_create_by_config_key'
/root/fedena/db/seeds.rb:26
/root/fedena/db/seeds.rb:2:in `each'
/root/fedena/db/seeds.rb:2
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `load_without_new_constant_marking'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `load'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `load'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rails-2.3.5/lib/tasks/databases.rake:215
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/root/fedena/lib/tasks/fedena_plugin_install.rake:31
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/local/rvm/gems/ruby-1.8.7-p374/gems/rake-0.8.7/bin/rake:31
/usr/local/rvm/gems/ruby-1.8.7-p374/bin/rake:19:in `load'
/usr/local/rvm/gems/ruby-1.8.7-p374/bin/rake:19
the code causing this error appears to be this code:
module MultiSchool
module Read
def self.extended (base)
eigen_class = class << base;self;end
["find","count","sum","exists?"].each do |method|
matches = method.match /([\w\d_]+)(\?|!|=)?$/
eigen_class.send :define_method, "#{matches[1]}_with_school#{matches[2]}" do |*args|
options = args.extract_options!
skip_multischool = options.delete :skip_multischool
args << options unless options.empty?
result = if skip_multischool || Thread.current[:skip_multischool].present?
send("#{matches[1]}_without_school#{matches[2]}",*args)
else
with_school do
send("#{matches[1]}_without_school#{matches[2]}",*args)
end
end
result
end
eigen_class.send :alias_method_chain, method, :school
end
end
def skip_multischool
Thread.current[:skip_multischool]=true
yield
ensure
Thread.current[:skip_multischool]=nil
end
private
def with_school
target_school = MultiSchool.current_school
if target_school.nil?
raise MultiSchool::Exceptions::SchoolNotSelected,"School Not Selected"
else
with_scope(:find => {:conditions => {:school_id => target_school.id}}) do
yield
end
end
end
end
end
looks the MultiSchool.current_school is returning nil which sets the variable target_school to nil so the above exception occurs of school not selected but I don't know where to from here?
Could you please help me out this issue.

Undefined method 'e=' for #<OpenSSL::PKey::RSA:0x00563aaff72138>

I'm trying to download file from Heroku's SFTP To Go using net/sftp gem but I always get undefined method `e=' for #.
Been searching online but can't find any related solutions. Here is my code:
task employer_email_import: :environment do
require 'net/sftp'
require 'uri'
sftptogo_url = ENV['SFTPTOGO_URL']
uri = URI.parse(sftptogo_url)
Net::SFTP.start(uri.host, uri.user, :password => uri.password) do |sftp|
sftp.download!("some_directory", "some_directory")
end
end
Error:
undefined method `e=' for #< OpenSSL::PKey::RSA:0x00563aaff72138>
Did you mean? e**********
"/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/net-ssh-3.2.0/lib/net/ssh/buffer.rb:255:in read_keyblob'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/net-ssh-3.2.0/lib/net/ssh/buffer.rb:239:inread_key'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/net-ssh-3.2.0/lib/net/ssh/known_hosts.rb:145:in block (2 levels) in keys_for'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/net-ssh-3.2.0/lib/net/ssh/known_hosts.rb:127:ineach_line'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/net-ssh-3.2.0/lib/net/ssh/known_hosts.rb:127:in block in keys_for'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/net-ssh-3.2.0/lib/net/ssh/known_hosts.rb:125:inopen'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/net-ssh-3.2.0/lib/net/ssh/known_hosts.rb:125:in keys_for'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/net-ssh-3.2.0/lib/net/ssh/known_hosts.rb:55:inblock in search_in'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/net-ssh-3.2.0/lib/net/ssh/known_hosts.rb:55:in map'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/net-ssh-3.2.0/lib/net/ssh/known_hosts.rb:55:insearch_in'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/net-ssh-3.2.0/lib/net/ssh/known_hosts.rb:49:in search_for'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/net-ssh-3.2.0/lib/net/ssh/transport/session.rb:96:inhost_keys'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/net-ssh-3.2.0/lib/net/ssh/transport/algorithms.rb:251:in prepare_preferred_algorithms!'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/net-ssh-3.2.0/lib/net/ssh/transport/algorithms.rb:124:ininitialize'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/net-ssh-3.2.0/lib/net/ssh/transport/session.rb:86:in new'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/net-ssh-3.2.0/lib/net/ssh/transport/session.rb:86:ininitialize'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/net-ssh-3.2.0/lib/net/ssh.rb:232:in new'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/net-ssh-3.2.0/lib/net/ssh.rb:232:instart'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/net-sftp-2.1.2/lib/net/sftp.rb:31:in start'", "/home/romz/Desktop/Romz/site/ROR/recoverysuite/lib/tasks/scheduler.rake:376:inblock (2 levels) in '", "/home/romz/Desktop/Romz/site/ROR/recoverysuite/lib/tasks/scheduler.rake:353:in each'", "/home/romz/Desktop/Romz/site/ROR/recoverysuite/lib/tasks/scheduler.rake:353:inblock in '", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-11.3.0/lib/rake/task.rb:248:in block in execute'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-11.3.0/lib/rake/task.rb:243:ineach'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-11.3.0/lib/rake/task.rb:243:in execute'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-11.3.0/lib/rake/task.rb:187:inblock in invoke_with_call_chain'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/2.4.0/monitor.rb:214:in mon_synchronize'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-11.3.0/lib/rake/task.rb:180:ininvoke_with_call_chain'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-11.3.0/lib/rake/task.rb:173:in invoke'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-11.3.0/lib/rake/application.rb:152:ininvoke_task'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-11.3.0/lib/rake/application.rb:108:in block (2 levels) in top_level'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-11.3.0/lib/rake/application.rb:108:ineach'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-11.3.0/lib/rake/application.rb:108:in block in top_level'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-11.3.0/lib/rake/application.rb:117:inrun_with_threads'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-11.3.0/lib/rake/application.rb:102:in top_level'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-11.3.0/lib/rake/application.rb:80:inblock in run'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-11.3.0/lib/rake/application.rb:178:in standard_exception_handling'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-11.3.0/lib/rake/application.rb:77:inrun'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rake-11.3.0/exe/rake:27:in <top (required)>'", "/home/romz/.rbenv/versions/2.4.0/bin/rake:23:inload'", "/home/romz/.rbenv/versions/2.4.0/bin/rake:23:in <top (required)>'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:74:inload'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:74:in kernel_load'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:28:inrun'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-2.0.1/lib/bundler/cli.rb:463:in exec'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:inrun'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in invoke_command'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor.rb:387:indispatch'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-2.0.1/lib/bundler/cli.rb:27:in dispatch'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:instart'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-2.0.1/lib/bundler/cli.rb:18:in start'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-2.0.1/exe/bundle:30:inblock in '", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-2.0.1/lib/bundler/friendly_errors.rb:124:in with_friendly_errors'", "/home/romz/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-2.0.1/exe/bundle:22:in'", "/home/romz/.rbenv/versions/2.4.0/bin/bundle:23:in load'", "/home/romz/.rbenv/versions/2.4.0/bin/bundle:23:in'"
RUBY_VERSION
=> "2.4.0"
OpenSSL::OPENSSL_VERSION
=> "OpenSSL 1.1.0g 2 Nov 2017"
OpenSSL::VERSION
=> "2.0.2"
rails --version
=> Rails 5.0.7.1
use:
gem 'net-sftp'
gem 'net-ssh', '~> 5.1.0'
gem 'openssl', '~> 2.0.0.beta.1'
this will solve your issue.

Why does Capybara think I have an invalid URI scheme format? Addressable::URI::InvalidURIError: Invalid scheme format: 127.0.0.1

When I try to run this one specific test, it gives this error. When I try to run all tests, it fails for another reason. How can I run this one test without this error? It's clearly a valid URL.
C:\Users\Chloe\workspace\catalyst_research>rspec ./spec/features/ctdbase_purchase_spec.rb:28
http://ctdbase.org/ # output of puts
1) CTD Purchase Unregistered user visits the CTD product page directly and makes purchase
Failure/Error: visit url
Addressable::URI::InvalidURIError:
Invalid scheme format: 127.0.0.1
# ./spec/support/ctdbase_support.rb:8:in `visit_ctd'
# ./spec/features/ctdbase_purchase_spec.rb:11:in `block (2 levels) in <top (required)>'
Here is the code
ctdbase_support.rb
def visit_ctd(path)
url = "#{CTD_URL}#{path.starts_with?('/') ? '' : '/'}#{path}"
puts url
visit url # line 8
end
ctdbase_purchase_spec.rb
before do
delete_downloads
visit_ctd '/' # line 11
Here is the full backtrace:
C:\Users\Chloe\workspace\catalyst_research>rspec -b ./spec/features/ctdbase_purchase_spec.rb:28
...
1) CTD Purchase Unregistered user visits the CTD product page directly and makes purchase
Failure/Error: visit "#{CTD_URL}#{path.starts_with?('/') ? '' : '/'}#{path}"
Addressable::URI::InvalidURIError:
Invalid scheme format: 127.0.0.1
# C:/ruby24/lib/ruby/gems/2.4.0/gems/addressable-2.5.2/lib/addressable/uri.rb:874:in `scheme='
# C:/ruby24/lib/ruby/gems/2.4.0/gems/addressable-2.5.2/lib/addressable/uri.rb:799:in `block in initialize'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/addressable-2.5.2/lib/addressable/uri.rb:2355:in `defer_validation'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/addressable-2.5.2/lib/addressable/uri.rb:796:in `initialize'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/addressable-2.5.2/lib/addressable/uri.rb:136:in `new'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/addressable-2.5.2/lib/addressable/uri.rb:136:in `parse'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/addressable-2.5.2/lib/addressable/template.rb:413:in `match'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/webmock-3.0.1/lib/webmock/request_pattern.rb:151:in `block in matches?'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/webmock-3.0.1/lib/webmock/request_pattern.rb:151:in `any?'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/webmock-3.0.1/lib/webmock/request_pattern.rb:151:in `matches?'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/webmock-3.0.1/lib/webmock/request_pattern.rb:33:in `matches?'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/webmock-3.0.1/lib/webmock/stub_registry.rb:58:in `block in request_stub_for'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/webmock-3.0.1/lib/webmock/stub_registry.rb:57:in `each'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/webmock-3.0.1/lib/webmock/stub_registry.rb:57:in `detect'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/webmock-3.0.1/lib/webmock/stub_registry.rb:57:in `request_stub_for'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/webmock-3.0.1/lib/webmock/stub_registry.rb:50:in `response_for_request'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/webmock-3.0.1/lib/webmock/http_lib_adapters/net_http.rb:79:in `request'
# C:/ruby24/lib/ruby/2.4.0/net/http.rb:1165:in `get'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/capybara-2.16.1/lib/capybara/server.rb:82:in `block in responsive?'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/webmock-3.0.1/lib/webmock/http_lib_adapters/net_http.rb:123:in `start_without_connect'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/webmock-3.0.1/lib/webmock/http_lib_adapters/net_http.rb:150:in `start'
# C:/ruby24/lib/ruby/2.4.0/net/http.rb:608:in `start'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/capybara-2.16.1/lib/capybara/server.rb:82:in `responsive?'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/capybara-2.16.1/lib/capybara/server.rb:98:in `boot'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/capybara-2.16.1/lib/capybara/session.rb:88:in `initialize'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/capybara-2.16.1/lib/capybara.rb:304:in `new'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/capybara-2.16.1/lib/capybara.rb:304:in `current_session'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/capybara-2.16.1/lib/capybara/dsl.rb:45:in `page'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/capybara-2.16.1/lib/capybara/dsl.rb:50:in `block (2 levels) in <module:DSL>'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-rails-3.7.2/lib/rspec/rails/example/feature_example_group.rb:29:in `visit'
# ./spec/support/ctdbase_support.rb:6:in `visit_ctd'
# ./spec/features/ctdbase_purchase_spec.rb:11:in `block (2 levels) in <top (required)>'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:447:in `instance_exec'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:447:in `instance_exec'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:350:in `run'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:509:in `block in run_owned_hooks_for'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:508:in `each'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:508:in `run_owned_hooks_for'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:595:in `block in run_example_hooks_for'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:594:in `reverse_each'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:594:in `run_example_hooks_for'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:464:in `run'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:494:in `run_before_example'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:253:in `block in run'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:466:in `block in run'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:606:in `block in run_around_example_hooks_for'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:342:in `call'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-rails-3.7.2/lib/rspec/rails/adapters.rb:127:in `block (2 levels) in <module:MinitestLifecycleAdapter>'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:447:in `instance_exec'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:447:in `instance_exec'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:375:in `execute_with'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:608:in `block (2 levels) in run_around_example_hooks_for'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:342:in `call'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:609:in `run_around_example_hooks_for'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:466:in `run'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:457:in `with_around_example_hooks'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:500:in `with_around_and_singleton_context_hooks'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:251:in `run'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:628:in `block in run_examples'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:624:in `map'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:624:in `run_examples'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:590:in `run'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:118:in `block (3 levels) in run_specs'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:118:in `map'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:118:in `block (2 levels) in run_specs'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/configuration.rb:1896:in `with_suite_hooks'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:113:in `block in run_specs'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/reporter.rb:79:in `report'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:112:in `run_specs'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:87:in `run'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:71:in `run'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:45:in `invoke'
# C:/ruby24/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/exe/rspec:4:in `<top (required)>'
# C:/ruby24/bin/rspec:23:in `load'
# C:/ruby24/bin/rspec:23:in `<main>'
Seems this project is using WebMock. This is the webmock.rb file
spec/config/webmock.rb
require 'webmock/rspec'
WebMock.allow_net_connect!
GOOGLE_STUB_WITHOUT_IP = {
"city" => "Mountain View",
"region" => "California",
"region_code" => "CA",
"country" => "US",
"country_name" => "United States",
"continent_code" => "NA",
"postal" => "94035",
"latitude" => 37.386,
"longitude" => -122.0838,
"timezone" => "America/Los_Angeles",
"utc_offset" => "-0700",
"country_calling_code" => "+1",
"currency" => "USD",
"languages" => "en-US,es-US,haw,fr",
"asn" => "AS15169",
"org" => "Google LLC"
}
uri_template =
Addressable::Template.new "https://ipapi.co/{ip_address}/json/"
WebMock.stub_request(:get, uri_template).to_return { |request|
{
# FIXME: This should dynamically return the ip address
# body: GOOGLE_STUB_WITHOUT_IP.merge('ip' => request.ip_address)
body: GOOGLE_STUB_WITHOUT_IP.merge('ip' => '8.8.8.8').to_json,
headers: { 'Content-Type' => 'application/json' }
}
}
You're running into a bug in the combination of WebMock and Addressable - https://github.com/bblimke/webmock/issues/489 and https://github.com/bblimke/webmock/pull/739. The problem is that WebMock ends up creating variations of URLs to compare to templates, and ends up doing something like 127.0.0.1:<some_port>/__identify when Capybara starts the app. The proper solution is for WebMock to fix the URLs it's sending to Addressable, but you may be able to workaround it temporarily by setting Capybara.server_host='localhost' which will cause the URL variation to end up as localhost:<some_port>/__identify and Addressable will see localhost as a possible scheme (which could be valid). It's a hack, but it may hold you over until WebMock gets fixed. Another option would be to stop using URL templates with WebMock and use regex instead.

fastlane [!] Malformed version number string fastlane 2.39.2

I'm newbe in Fastlane and for now I managed to login my AppleID and iTunesConnect so far, but still when I'm executing fastlane provision or any other lane I created in Fastlane file, i receive long message with 1 red line:
[!] Malformed version number string fastlane 2.39.2 (ArgumentError)
the full message looks like that:
[15:46:41]: -------------------------------------------------
[15:46:41]: --- Step: Verifying required fastlane version ---
[15:46:41]: -------------------------------------------------
Looking for related GitHub issues on fastlane/fastlane...
Found no similar issues. To create a new issue, please visit:
https://github.com/fastlane/fastlane/issues/new
Run `fastlane env` to append the fastlane environment to your issue
/Users/yoni/.fastlane/bin/bundle/lib/ruby/site_ruby/2.2.0/rubygems/version.rb:207:in `initialize': [!] Malformed version number string fastlane 2.39.2 (ArgumentError)
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/site_ruby/2.2.0/rubygems/version.rb:199:in `new'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/site_ruby/2.2.0/rubygems/version.rb:199:in `new'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/fastlane/lib/fastlane/actions/fastlane_version.rb:10:in `run'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/fastlane/lib/fastlane/runner.rb:252:in `block (2 levels) in execute_action'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/fastlane/lib/fastlane/runner.rb:230:in `block in execute_action'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/fastlane/lib/fastlane/runner.rb:226:in `chdir'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/fastlane/lib/fastlane/runner.rb:226:in `execute_action'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/fastlane/lib/fastlane/runner.rb:148:in `trigger_action_by_name'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/fastlane/lib/fastlane/fast_file.rb:146:in `method_missing'
from Fastfile:3:in `parsing_binding'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/fastlane/lib/fastlane/fast_file.rb:54:in `eval'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/fastlane/lib/fastlane/fast_file.rb:54:in `block in parse'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/fastlane/lib/fastlane/fast_file.rb:43:in `chdir'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/fastlane/lib/fastlane/fast_file.rb:43:in `parse'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/fastlane/lib/fastlane/fast_file.rb:33:in `initialize'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/fastlane/lib/fastlane/lane_manager.rb:12:in `new'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/fastlane/lib/fastlane/lane_manager.rb:12:in `cruise_lane'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/fastlane/lib/fastlane/command_line_handler.rb:30:in `handle'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/fastlane/lib/fastlane/commands_generator.rb:104:in `block (2 levels) in run'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.4/lib/commander/command.rb:178:in `call'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.4/lib/commander/command.rb:178:in `call'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.4/lib/commander/command.rb:153:in `run'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.4/lib/commander/runner.rb:476:in `run_active_command'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:39:in `run!'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.4/lib/commander/delegates.rb:15:in `run!'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/fastlane/lib/fastlane/commands_generator.rb:303:in `run'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/fastlane/lib/fastlane/commands_generator.rb:42:in `start'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/fastlane/lib/fastlane/cli_tools_distributor.rb:66:in `take_off'
from /Users/yoni/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.39.2/bin/fastlane:20:in `<top (required)>'
from /Users/yoni/.fastlane/bin/bundle/bin/fastlane:22:in `load'
from /Users/yoni/.fastlane/bin/bundle/bin/fastlane:22:in `<main>'
Any ideas what's the problem ?
Edit: thanks for repliers, I add my Fastfile:
# This is the minimum version number required.
# Update this, if you use features of a newer version
fastlane_version "fastlane 2.39.2"
default_platform :ios
platform :ios do
# 1
desc "Creating a code signing certificate and provisioning profile"
# 2
lane :provision do
# 3
produce(
app_name: 'mZone Poker',
language: 'English',
app_version: '1.0',
sku: '123abc'
)
# 4
cert
# 5
sigh(force: true) #other: sigh(adhoc: true) \ sigh(development: true)
end
desc "Create ipa"
lane :build do
increment_build_number
gym
end
error do |lane, exception|
# This block is called if there was an error running a lane.
end
end
As KrauseFx answered, I wrote fastlane_version "fastlane 2.39.2" instead of fastlane_version "2.39.2"

rake aborted! LoadError: cannot load such file -- httparty

I'm have the following in my seed.rb file:
require 'httparty'
require 'nokogiri'
require 'awesome_print'
BASE_URL = "http://www.legacy.com/funeral-homes/"
URL_PATH = "directory/"
def get_states(key, value)
arry = []
i = 1
while i <= value do
response = HTTParty.get(BASE_URL + URL_PATH + "#{key}" + "?page=#{i}")
page = Nokogiri::HTML(response.body)
rows = (page.css("div.fhlistitem").select {
|e| !e.content.squeeze(" ").strip.empty? }).map {
|e| [e.css('div.fhname a').first['href'],
e.content.squeeze("").strip.split("\r\n").compact ]
}
rows.each do |row|
row[1].delete(" ")
hash = {
"name" => row[1][0].strip,
"address" => row[1][1].strip,
"phone" => row[1][4].nil? ? "" : row[1][4].strip,
"email" => row[1][5].nil? ? "" : row[1][5].strip,
"license" => row[1][6],
"url" => row[0]
}
arry << hash
end
i += 1
end
arry
end
fhs = get_states("alaska", 4)
fhs.each do |fh|
FuneralHome.create(
name: fh["name"],
address: fh["address"],
phone: fh["phone"],
email: fh["email"],
license: fh["license"],
url: fh["url"],
)
end
When I run rake db:seed I get the following error:
WARN: Unresolved specs during Gem::Specification.reset:
mini_portile (~> 0.6.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
rake aborted!
Don't know how to build task 'db:seet'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/task_manager.rb:62:in `[]'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:149:in `invoke_task'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `each'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:78:in `block in run'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.3.2/bin/rake:33:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'
I'm not sure how to interpret the error. I'm requiring 'httparty' in the file. How can I run a HTTParty GET request in my seed.rb file? Or is the a better alternative?
Don't know how to build task 'db:seet'
Maybe this is a problem: try to use "rake db:seed" instead of "rake db:seet"

Resources