Hey there and Merry Xmas,
I would like to add the DDMathParser to my Swift 3 project using the latest CocoaPods version. The problem is I only get DDMathParser 2.0.0 installed. What do I miss?
my podfile is:
platform :osx, '10.11'
target 'DDTest02' do
use_frameworks!
pod 'DDMathParser', :git => 'https://github.com/davedelong/DDMathParser.git'
When I try using:
pod 'DDMathParser', :git => 'https://github.com/davedelong/DDMathParser.git', :branch => 'swift-3.0'
It throws an error warning: Could not find remote branch swift-3.0 to clone.
fatal: Remote branch swift-3.0 not found in upstream origin
DDMathParser author here...
There is no swift-3.0 branch, so I'm not sure why you're trying that. Try specifying the 3.0.0 tag using:
pod 'DDMathParser', :git => 'https://github.com/davedelong/DDMathParser.git', :tag ⇒ '3.0.0'
Related
I am using Alamofire 4.5 on XCode 8
When I am working on Simulator alamofire is working fine and when I connect my device to xcode via Cable then again its working fine.
When I create Archive of that particular build and run Diawi url link on my device to install the application it gets installed but alamofire start giving error
I am not able to get the root cause of the problem
I have tried couple of thing but nothing worked for me , Can anybody help me on this.
My Pod File
# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'smartBrokerSuite' do
# pod “CryptoSwift”
pod ‘Google/Analytics’
pod ‘Alamofire', '~> 4.5'
pod 'CryptoSwift', :git => "https://github.com/krzyzanowskim/CryptoSwift", :branch => “swift3”
pod 'Charts'
pod 'DKImagePickerController'
pod 'IQKeyboardManagerSwift', '5.0.0'
end
target 'smartBrokerSuiteTests' do
end
target 'smartBrokerSuiteUITests' do
end
Thanks in advance .!
try cleaning Cmd + Shift + Alt + K
this will work
if the API method is GET then Do not put the http method in Alamofier.request() function
Alamofire.request(Url, parameters: args, encoding: URLEncoding.default)
.responseJSON { response in
switch response.result {
case .success(let JSON):
successCallback((), JSON as AnyObject)
case .failure(let error):
print(error)
}
}
hope it helps.
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target 'smartBrokerSuite' do
# pod “CryptoSwift”
pod ‘Google/Analytics’
pod ‘Alamofire', '~> 4.5'
pod 'CryptoSwift', :git =>
"https://github.com/krzyzanowskim/CryptoSwift", :branch => “swift3”
pod 'Charts'
pod 'DKImagePickerController'
pod 'IQKeyboardManagerSwift', '5.0.0'
end
How do I use SwiftyJSON with Swift3? I've installed the pod.
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git', :branch => 'swift3'
But it throws a lot of errors using Xcode 8 GM.
Can someone help me install it properly?
Update: as Marcus notes, SwiftyJSON now supports Swift 3. In order to get bug fixes, I recommend not pinning yourself to 3.0.0, but rather:
pod 'SwiftyJSON', '>= 3.0.0'
…or if you don’t want to accidentally pick up whatever API-breaking changes may arrive in 4.x:
pod 'SwiftyJSON', '~> 3.0'
[Old answer] There is an actively maintained fork that works:
pod 'SwiftyJSON', git: 'https://github.com/BaiduHiDeviOS/SwiftyJSON.git', branch: 'swift3'
Hopefully the project maintainers merge it. Until then, you can just use the fork.
SwiftyJSON now supports Swift 3.
pod 'SwiftyJSON', '3.0.0'
Please try this. I had a trouble for days. And this solve the issue for me.
pod 'SwiftyJSON', '3.1.4'
I have included the simple_captcha gem as instructed on their site:
gem 'simple_captcha', :git => 'git://github.com/galetahub/simple-captcha.git'
I have then run bundler to install it.
Finally when I go to run the following command I get an error:
rails generate simple_captcha
.rvm/gems/ruby-1.9.3-p327#eapi4/bundler/gems/simple-captcha-e99cc7e8bf6b/lib/simple_captcha/form_builder.rb:7:in `included': uninitialized constant Sprockets::Helpers (NameError)
I've searched on the web and can't find any other users with this problem.
Any help appreciated
They say in this pull request that the plugin doesn't support rails 4, You can download their branch and try it out.
Looking at the diff it shows your problem
- base.send(:include, Sprockets::Helpers::RailsHelper)
- base.send(:include, Sprockets::Helpers::IsolatedHelper)
+ base.send(:include, Sprockets::Rails::Helper)
https://github.com/galetahub/simple-captcha/pull/39/files
you could this as the previous version of simple_captcha is not supported on rails 3.
Azdaroth forked of simple_captcha
gem 'simple_captcha', :git => 'git://github.com/Azdaroth/simple-captcha.git', :branch => 'rails-4'
I'm just getting started with trying to move my infrastructure over to Chef, and I think I must be missing something obvious.
I'm using the chef-rvm cookbook to install RVM, and I'd like it to install Ruby 1.9.3p125 and set that as the default.
Here's my base server role:
name "base"
description "Basic configuration for all nodes"
run_list(
'recipe[git]',
'recipe[sudo]',
'recipe[ubuntu]',
'recipe[rvm]',
'recipe[postgresql::client]'
)
override_attributes(
:authorization => {
:sudo => {
:users => ["ubuntu"],
:passwordless => true
}
},
:rvm => {
:rubies => ["ruby-1.9.3-p125"],
:default_ruby => "ruby-1.9.3-p125",
:global_gems => ['bundler', 'rake']
}
)
This runs without any problems, but if I ssh into the server after it's finished, rvm doesn't list any installed rubies:
ubuntu#test.server:~$ rvm list
rvm rubies
# No rvm rubies installed yet. Try 'rvm help install'.
Is this even the correct way to specify that certain rubies be installed? If not, what is the correct way? If so, what am I doing wrong?
There's nothing wrong with your code. The problem lies in the fact that you never told Chef to install the Rubies that you defined in your role.
You have included recipe[rvm] in the role's run_list, which translates to recipe[rvm::default]. Looking into the cookbook's documentation, you find that this recipe:
Installs the RVM gem and initializes Chef to use the Lightweight Resources and Providers (LWRPs). Use this recipe explicitly if you only want access to the LWRPs provided.
What you want can be best achieved by substituting recipe[rvm] for recipe[rvm::system] in the run_list:
Installs the RVM codebase system-wide (that is, into /usr/local/rvm) and installs Rubies, global gems, and specific gems driven off attribute metadata. This recipe includes default and system _ install.
Use this recipe by itself if you want RVM system-wide with Rubies installed, etc.
I have a Puppet manifest that installs the Zurb Foundation gem:
class compass {
package { ["rubygems"]:
ensure => 'installed'
}
package { ['zurb-foundation']:
ensure => '3.0.6',
provider => 'gem',
require => Package['rubygems']
}
}
This causes the following error when running puppet apply:
err: /Stage[main]/Compass/Package[zurb-foundation]/ensure: change from absent to 3.0.6 failed: Could not update: Execution of '/usr/bin/gem install -v 3.0.6 --include-dependencies --no-rdoc --no-ri zurb-foundation' returned 1: INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Building native extensions. This could take a while...
ERROR: Error installing zurb-foundation:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:4:in `<main>'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/ffi-1.9.0 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/ffi-1.9.0/ext/ffi_c/gem_make.out
at /etc/puppet/manifests/classes/compass.pp:25
However, doing a gem list yields the following results:
# gem list
*** LOCAL GEMS ***
chunky_png (1.2.8)
compass (0.12.2)
fssm (0.2.10)
rake (10.1.0)
rb-fsevent (0.9.3)
sass (3.2.0.alpha.277)
zurb-foundation (3.0.6)
The error causes puppet apply to not complete properly, since a lot of items are skipped because of failed dependencies. What can I do?
I think that the problem is that you don't have the ruby dev kit installed for you ruby (that's what's used to build native extensions).
You'll want to add something like (it may be different depending on your version of ruby):
package { 'ruby-dev':
ensure => installed,
before => Package['zurb-foundation'],
}
This should allow the gem to be built properly and let your puppet run finish too.