Got CompatibilityError while installing pods objective C [duplicate] - objective-c

I've been trying to use cocoapods and install them into my project but its giving me this error while trying to install it in the project location. its kinda confusing ?
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/command.rb:127: warning: Insecure world writable dir /usr/local in PATH, mode 040777
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.37.2/lib/cocoapods-core/standard_error.rb:88:in `message': incompatible character encodings: ASCII-8BIT and UTF-8 (Encoding::CompatibilityError)
from /Library/Ruby/Gems/2.0.0/gems/claide-0.8.1/lib/claide/command.rb:367:in `handle_exception'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.8.1/lib/claide/command.rb:315:in `rescue in run'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.8.1/lib/claide/command.rb:303:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/command.rb:46:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/bin/pod:44:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'

replace this character " ‘ " with this " ' " in your podfile and try to install again.
it's happen to me when I copy pod line from somewhere else (like Evernote), some text editors automatically change this character. Usually it's like this :
pod 'AFNetworking', '~> 2.0'
but when I take from other editor, it could be like this :
pod ‘AFNetworking‘, ‘~> 2.0‘

Follow this steps:
1.open terminal.
2.pod setup // it's take some time to download podfiles
3.pod list //(optional)to see the list of pod
4.cd Desktop//(your project path)
5.cd CoacPods (your project name)
6.vim podfile
7.pod install

Check this out chmod go-w /opt/local/bin at a shell prompt (depending on permissions you may need to sudo to do that).

Related

Running into issues installing gitlab-shell

I am trying to install Gitlab CE from source and following this installation guide.
When I attempt to install the gitlab-shell using the command provided.
sudo -u git -H bundle exec rake gitlab:shell:install REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production SKIP_STORAGE_VALIDATION=true
I received the following stack trace error.
WARNING: This version of GitLab depends on gitlab-shell 4.1.1, but you're running Unknown. Please update gitlab-shell.
rake aborted!
Gitlab::TaskFailedError: Gitlab::TaskFailedError
/home/git/gitlab/lib/tasks/gitlab/task_helpers.rb:87:in `run_command!'
/home/git/gitlab/lib/tasks/gitlab/task_helpers.rb:164:in `clone_repo'
/home/git/gitlab/lib/tasks/gitlab/task_helpers.rb:157:in `checkout_or_clone_tag'
/home/git/gitlab/lib/tasks/gitlab/shell.rake:16:in `block (3 levels) in <top (required)>'
/usr/local/bin/bundle:22:in `load'
/usr/local/bin/bundle:22:in `<main>'
Tasks: TOP => gitlab:shell:install
What config file should I be modifying to fix my issue? Do I need to modify the Redis URL even though I am using the default configuration? By the way, this install is on an Ubuntu 16.04 server.
This might be caused by using a version of git that is too old.
To debug: append the --trace option to bundle exec to get more info on where this error is coming from and inspect the source.

Cocoa Pods 'No such file or Directory' Error

I have an IOS project that uses cocoapods. After switching computers and updating the OS on the new computer I am getting the following error when I try running "pod update"
Robbys-iMac-454:ios-v2 robbykmyers$ pod update
Update all pods
Analyzing dependencies
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:422:in `open': No such file or directory - /Users/robbykmyers/.cocoapods/repos (Errno::ENOENT)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:422:in `foreach'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:422:in `children'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:63:in `all'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface/error_report.rb:130:in `repo_information'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface/error_report.rb:34:in `report'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:58:in `report_error'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:300:in `handle_exception'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:274:in `rescue in run'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:264:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:45:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/bin/pod:43:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'
Does anyone know how to solve this?
Delete the folder ~/.cocoapods/ with rm -rf ~/.cocoapods
Enter pod setup command in Terminal.
This process will take time as this command clones the CocoaPods Specs repository into ~/.cocoapods/ on your computer.
It sometimes occurs when using a wrong apostrophe character in a Podfile or in a Podspec
Those apostrophes are default when using standard TextEdit app on OS X. I prefer Sublime Text to avoid such errors
https://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/
rm -fr ~/Library/Caches/CocoaPods && \
gem update --system && \
gem update && \
gem cleanup && \
pod setup

Installing/Running Thin Webserver on Rails 3

Having an issue running the "Thin" web server. It looks like installation was successful but when I run "thin start" It appears as though Thin starts to initialize but then cannot find some resources it needs.
Below, is the audit trail from my terminal session. Can someone offer a hand with this? According to the Thin docs, installation was done correctly. Thanks
Rails 3.2.12
ruby 1.9.3
root#pgateway:/var/www/testapp# gem install thin
Fetching: eventmachine-1.0.0.gem (100%)
Building native extensions. This could take a while...
Fetching: daemons-1.1.9.gem (100%)
Fetching: thin-1.5.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed eventmachine-1.0.0
Successfully installed daemons-1.1.9
Successfully installed thin-1.5.0
3 gems installed
root#pgateway:/var/www/testapp# thin start
>> Using rack adapter
>> Thin web server (v1.5.0 codename Knife)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop
/usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/backends /tcp_server.rb:16:in `connect': cannot load such file -- thin/connection (LoadError)
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/backends/base.rb:55:in `block in start'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `call'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/backends/base.rb:63:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/server.rb:159:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/controllers/controller.rb:86:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/runner.rb:187:in `run_command'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/runner.rb:152:in `run!'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/bin/thin:6:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p385/bin/thin:19:in `load'
from /usr/local/rvm/gems/ruby-1.9.3-p385/bin/thin:19:in `<main>'
from /usr/local/rvm/gems/ruby-1.9.3-p385/bin/ruby_noexec_wrapper:14:in `eval'
from /usr/local/rvm/gems/ruby-1.9.3-p385/bin/ruby_noexec_wrapper:14:in `<main>'
You seem to install thin separate from rails
Add it to your gemfile and you should be fine
If you want to use a gem, it must be in your Gemfile. You can solve your problem as follows:
Add the following line to your Gemfile: gem 'thin'
Update your current app's environment: bundle install
Then start server
Try to execute the following command:
cd to/your/rails/app
echo 'gem "thin"' >> Gemfile
thin start
this content from https://github.com/macournoyer/thin/issues/115

Siriproxy Server Error

I am trying to run Siriproxy on a fresh Raspberry Pi.
I have followed this tutorial step by step: http://www.hometoys.com/emagazine.php?art_id=2090
Everything looked to install 100%. But on the last step I tried to run 'rvmsudo siriproxy server' I get this error below.
siri#raspberrypi:~/SiriProxy$ rvmsudo siriproxy server
/home/siri/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych.rb:297:in `initialize': No such file or directory - /root/.siriproxy/config.ym l (Errno::ENOENT)
from /home/siri/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych.rb:297:in `open'
from /home/siri/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych.rb:297:in `load_file'
from /home/siri/.rvm/gems/ruby-1.9.3-p385#SiriProxy/gems/siriproxy-0.3.3/lib/siriproxy/command_line.rb:143:in `parse_options'
from /home/siri/.rvm/gems/ruby-1.9.3-p385#SiriProxy/gems/siriproxy-0.3.3/lib/siriproxy/command_line.rb:33:in `initialize'
from /home/siri/.rvm/gems/ruby-1.9.3-p385#SiriProxy/gems/siriproxy-0.3.3/bin/siriproxy:6:in `new'
from /home/siri/.rvm/gems/ruby-1.9.3-p385#SiriProxy/gems/siriproxy-0.3.3/bin/siriproxy:6:in `<top (required)>'
from /home/siri/.rvm/gems/ruby-1.9.3-p385#SiriProxy/bin/siriproxy:23:in `load'
from /home/siri/.rvm/gems/ruby-1.9.3-p385#SiriProxy/bin/siriproxy:23:in `<main>'
It seems like when you ran the sections involving cp ~/SiriProxy/config.example.yml ~/.siriproxy/config.yml you created these directories in your user directory, not in the root directory where it is looking. The ~/ symbol is shorthand for a home directory. Try learning how basic linux navigation works and matching up where your config.yml files should be stored-- e.g., root vs user directories.

Thin LoadError: no such file to load thin_parser

I have installed thin and try to do thin start, which end up with this error
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- C:/Ruby192/lib/ruby/gems/1.9.1/gems/thin-1.2.8-x86-mingw32/lib/1.9/thin_parser (LoadError)
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thin-1.2.8-x86-mingw32/lib/thin.rb:48:in `rescue in <top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thin-1.2.8-x86-mingw32/lib/thin.rb:43:in `<top (required)>'
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thin-1.2.8-x86-mingw32/bin/thin:5:in `<top (required)>'
from C:/Ruby192/bin/thin:19:in `load'
from C:/Ruby192/bin/thin:19:in `<main>'
Can someone help me out please, thanks in advance
the output denotes a directory called 1.9 i.e.
<ruby_install_dir>/lib/ruby/gems/1.9.1/gems/thin-1.2.8-x86-mingw32/lib/1.9/
Note: My thin version is 1.2.10. In the following i will use the path as it appears on my system.
For some reason the thin gem doesn't come with this directory. But a file called thin_parser.so resides in the parent directory <ruby_install_dir>/lib/ruby/gems/1.9.1/gems/thin-1.2.10/lib/
So my first solution was to create a directory 1.9 and copy the file thin_parser.so to it.
Now thin start works for me.
Alternatively you can edit the file <ruby_install_dir>/lib/ruby/gems/1.9.1/gems/thin-1.2.10/lib/thin.rb and change
if Thin.win?
# Select proper binary under Windows
major_ruby_version = RUBY_VERSION[/^(\d+\.\d+)/]
require "#{Thin::ROOT}/#{major_ruby_version}/thin_parser"
else
require "#{Thin::ROOT}/thin_parser"
end
to
if Thin.win?
# Select proper binary under Windows
major_ruby_version = RUBY_VERSION[/^(\d+\.\d+)/]
require "#{Thin::ROOT}/thin_parser"
else
require "#{Thin::ROOT}/thin_parser"
end
or even simpler
require "#{Thin::ROOT}/thin_parser"
I'm not sure what workaround is the better one, since i don't know what else files thin expects in the not existing directory. I don't know either where the Thin.win? fork becomes important.
I decided in favor of the first solution. But both ways fixed the Problem for me.
Best regards,
Tim
I ran into this same error when running rake db:migrate (I suspect thin start would have given me the same error.)
I'm running on Amazon Linux (rpm based, so similar to CentOS and Redhat). I had previously installed thin as root (gem install thin). Although it may be irrelevant to your situation, just for completeness, I had also installed eventmachine using:
gem install eventmachine --platform=ruby
Here is the error I got:
% rake db:migrate
rake aborted!
LoadError: cannot load such file -- thin_parser
/home/rails/.gem/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
etc. etc.
Based on the above information, I ran rake under strace and discovered that it was looking for thin_parser.so in the wrong place. I was able to fix the problem by installing this symbolic link (I did this as root since I installed thin as root). Obviously, adjust the path to where your version of thin is installed:
cd /usr/local/share/gems1.9/gems/thin-1.6.3/lib
ln -s ../ext/thin_parser/thin_parser.so .
Poof! That fixed it for me.