Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cocoapods install getting error [duplicate]

Tags:

ios7

cocoapods

Here is my Podfile:

platform :ios, ‘7.0’

pod 'ECSlidingViewController', '~> 2.0.0'

When I type pod install into the terminal, this is the error I get:

[!] Invalid `Podfile` file: /Users/Kyle/Desktop/Testing/Podfile:1: no .<digit> floating literal anymore; put 0 before dot
platform :ios, ‘7.0’
                    ^
/Users/Kyle/Desktop/Testing/Podfile:1: syntax error, unexpected tINTEGER, expecting '('
platform :ios, ‘7.0’
                     ^. Updating CocoaPods might fix the issue.

Everything in the Podfile seems correct. I have tried with " instead of ' with no effect. I have also removed the decimal (the dot) and moved it around. Am I missing something?

After trolling through the web, one user suggested that something might be wrong with my Ruby installation, but how can I check that? I have also verified that I installed all Ruby updates with this:

sudo gem update --system

Any help would be great, thanks!

like image 526
Kyle Begeman Avatar asked Jan 14 '14 08:01

Kyle Begeman


2 Answers

Had this same issue. It's difficult to notice, but if you're on a Mac and used TextEdit to edit the Podfile, the quote character was probably changed. Turn off 'Smart Quotes' in Preferences.

like image 179
timshim Avatar answered Nov 05 '22 18:11

timshim


I had the same issue the following worked for me. In replace curly quotes in Podfile's first line i.e

platform :ios, ‘7.0’ (Not working)
platform :ios, '7.0' (Working)

You are using curly quotes character, which is ‘=0x2018 & ’=0x2019. You should use straight quote which is '=0x27

TextEdit automatically converts normal quotes to smart quotes. You can disable smart quotes option from : System Preferences -> Keyboard -> uncheck 'Use smart quotes and dashes'

System preferences -> Keyboard

like image 25
Muhammad Nabeel Arif Avatar answered Nov 05 '22 20:11

Muhammad Nabeel Arif