I am using OS X El Capitan, Version 10.11.4 using VMWare
I am able to install the gem by using sudo gem install cocoa pods
I want to use Firebase in my project and followed the guideline mentioned on official website.
On pod install, I am getting the below error
pod install --verbose
Preparing
Setting up CocoaPods master repo
Cloning spec repo `master` from `https://github.com/CocoaPods/Specs.git` (branch `master`)
$ /usr/bin/git clone https://github.com/CocoaPods/Specs.git master
Cloning into 'master'...
error: RPC failed; curl 56 SSLRead() return error -9806
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master`.
(/usr/bin/git clone https://github.com/CocoaPods/Specs.git master
Cloning into 'master'...
error: RPC failed; curl 56 SSLRead() return error -9806
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
)
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/sources_manager.rb:35:in `rescue in find_or_create_source_with_url'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/sources_manager.rb:38: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/installer.rb:114:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command/install.rb:37: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 `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
What i have tried so far
Went to ~/.cocoapods/repos and executed the below command
git clone https://github.com/CocoaPods/Specs.git master
And got error
Cloning into 'master'...
remote: Counting objects: 798955, done.
remote: Compressing objects: 100% (26/26), done.
~/.cocoapods/repos 9% (73183/798955), 14.57 MiB | 113.00 KiB/s
After above line it hangs for ever, With no network activity on Activity monitor
Further, I increased the buffer size by executing
git config --global http.postBuffer 157286400
It is a connection problem.
To solve this issue, you have to go to VM settings to Bridge the physical connection.
VMware Player-->Removable Devices-->Network Adapter-->settings
You will find Network connection and check both
Bridged: Connected directly to the physical network
Replicate physical network connection state(if you are using a laptop).
Check following link for detail:
https://pubs.vmware.com/workstation-9/index.jsp?topic=%2Fcom.vmware.ws.using.doc%2FGUID-826323AD-D014-475D-8909-DFA73B5A3A57.html
It takes some time for Cloning into 'master'... You should wait for few minutes to complete it.
I'm not sure about this particular error, but I solved similar error in either:
downloading the needed library through Windows operating system, then copy the library
to maciOS on the VMware. (download still takes a very long time though, about a day)
upgrading my RAM and get 12GB of ram and using ssd hard. This makes it very easy to
develop using VMWare
Related
So I'm running the new Apple M1 Pro chipset, and the original M1 chip on another machine, and when I attempt to create new RSpec tests in ruby I get the following error.
Function not implemented - Failed to initialize inotify (Errno::ENOSYS)
the full stack dump looks like this
/var/lib/gems/2.7.0/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:69:in `initialize': Function not implemented - Failed to initialize inotify (Errno::ENOSYS)
from /var/lib/gems/2.7.0/gems/listen-3.1.5/lib/listen/adapter/linux.rb:31:in `new'
from /var/lib/gems/2.7.0/gems/listen-3.1.5/lib/listen/adapter/linux.rb:31:in `_configure'
from /var/lib/gems/2.7.0/gems/listen-3.1.5/lib/listen/adapter/base.rb:45:in `block in configure'
from /var/lib/gems/2.7.0/gems/listen-3.1.5/lib/listen/adapter/base.rb:40:in `each'
from /var/lib/gems/2.7.0/gems/listen-3.1.5/lib/listen/adapter/base.rb:40:in `configure'
from /var/lib/gems/2.7.0/gems/listen-3.1.5/lib/listen/adapter/base.rb:63:in `start'
from /usr/lib/ruby/2.7.0/forwardable.rb:235:in `start'
from /var/lib/gems/2.7.0/gems/listen-3.1.5/lib/listen/listener.rb:68:in `block in <class:Listener>'
from /var/lib/gems/2.7.0/gems/listen-3.1.5/lib/listen/fsm.rb:121:in `instance_eval'
from /var/lib/gems/2.7.0/gems/listen-3.1.5/lib/listen/fsm.rb:121:in `call'
from /var/lib/gems/2.7.0/gems/listen-3.1.5/lib/listen/fsm.rb:91:in `transition_with_callbacks!'
from /var/lib/gems/2.7.0/gems/listen-3.1.5/lib/listen/fsm.rb:57:in `transition'
from /var/lib/gems/2.7.0/gems/listen-3.1.5/lib/listen/listener.rb:91:in `start'
from /var/lib/gems/2.7.0/gems/spring-watcher-listen-2.0.1/lib/spring/watcher/listen.rb:27:in `start'
from /var/lib/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:80:in `start_watcher'
from /var/lib/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:89:in `preload'
from /var/lib/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:157:in `serve'
from /var/lib/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:145:in `block in run'
from /var/lib/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:139:in `loop'
from /var/lib/gems/2.7.0/gems/spring-2.1.1/lib/spring/application.rb:139:in `run'
from /var/lib/gems/2.7.0/gems/spring-2.1.1/lib/spring/application/boot.rb:19:in `<top (required)>'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
from -e:1:in `<main>'
rails is running from a docker container, and I have tried following the solution that is listed below but not such luck. I'm fairly new to ruby and rails so any help would be greatly appreciated!
https://github.com/evilmartians/terraforming-rails/issues/34
Update:
To fix this issue I used the solution from #mahatmanich listed here
https://stackoverflow.com/questions/31857365/rails-generate-commands-hang-when-trying-to-create-a-model'
Essentially, we need to delete the bin directory and then re-create it using
rake app:update:bin
Since rails 5 some 'rake' commands are encapsulated within the 'rails' command. However when one deletes 'bin/' directory one is also removeing the 'rails' command itself, thus one needs to go back to 'rake' for the reset since 'rails' is not available any longer but 'rake' still is.
Problem
The error message is complaining that the inotify dependency of the underlying system failed to be invoked (initialized). The dependency is likely not present in the system, where the system here was reported to be a docker container.
To provide the inotify API, you can specify an OS/architecture that is compatible with the Apple M1 chip.
Failure Repro:
Using a simple script to invoke the inotify API with Ruby:
file_watcher.rb
notifier = INotify::Notifier.new
notifier.watch('./test/', :create) { |event|
puts "#{event.name} created in ./test/ directory!"
}
FileUtils.rm_f('./test/new_file.txt')
File.new('./test/new_file.txt', 'w')
notifier.process
Without the --platform specified (which defaults to linux/amd64):
% docker run --rm -it -v "$(pwd):/test" ruby:2.7.2 bash -c "gem install rb-inotify && ls test/ && ruby -r rb-inotify -r fileutils test/file_watcher.rb"
Output
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Fetching rb-inotify-0.10.1.gem
Fetching ffi-1.15.5.gem
Building native extensions. This could take a while...
Successfully installed ffi-1.15.5
Successfully installed rb-inotify-0.10.1
2 gems installed
Dockerfile file_watcher.rb
Traceback (most recent call last):
2: from test/file_watcher.rb:1:in `<main>'
1: from test/file_watcher.rb:1:in `new'
/usr/local/bundle/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:69:in `initialize': Function not implemented - Failed to initialize inotify (Errno::ENOSYS)
Solution:
To provide the inotify API, you can specify an OS/architecture that is compatible with the Apple M1 chip.
Solution Demo:
Use the same file_watcher.rb script above, and provide and OS/architecture that will satisfy the inotify dependency.
With the --platform specified (a compatible arch of linux/arm64/v8):
% docker run --rm -it --platform linux/arm64/v8 -v "$(pwd):/test" ruby:2.7.2 bash -c "gem install rb-inotify && ls test/ && ruby -r rb-inotify -r fileutils test/file_watcher.rb"
Output
Fetching rb-inotify-0.10.1.gem
Fetching ffi-1.15.5.gem
Building native extensions. This could take a while...
Successfully installed ffi-1.15.5
Successfully installed rb-inotify-0.10.1
2 gems installed
Dockerfile file_watcher.rb new_file.txt
new_file.txt created in ./test/ directory!
You can provide the platform flag in a Dockerfile or docker-compose file, as well as with the docker run CLI as demonstrate above.
References:
https://github.com/docker/for-mac/issues/6174#issuecomment-1048928733
https://github.com/docker/for-mac/issues/5321#issuecomment-823637003
I'm running 4.2.6, on ruby 2.1.8p440 on MacOS 10.12 Sierra, Bundler version 1.12.0.rc
I get this when I try to 'bundle install'
jay-gischers-macbook-pro-110:ilarp gischer$ bundle install
Fetching gem metadata from http://rubygems.org/Retrying fetcher due
to error (2/4): Bundler::HTTPError Could not reach host index.rubygems.org.
Check your network connection and try again.
Retrying fetcher due to error (3/4): Errno::EMFILE Too many open files # rb_sysopen -
/Users/gischer/.bundle/cache/compact_index/rubygems.org.80.9e8aca59a0c3a407fba89eb64623162d/info/selenium-webdriver
Retrying fetcher due to error (4/4): Errno::EMFILE Too many open files # rb_sysopen -
/Users/gischer/.bundle/cache/compact_index/rubygems.org.80.9e8aca59a0c3a407fba89eb64623162d/info/sqlite3/Users/gischer/.rbenv/versions/2.1.8/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.rc/lib/bundler/friendly_errors.rb:74:in `request_issue_report_for': cannot load such file -- bundler/env (LoadError)
from /Users/gischer/.rbenv/versions/2.1.8/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.rc/lib/bundler/friendly_errors.rb:40:in `log_error'
from /Users/gischer/.rbenv/versions/2.1.8/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.rc/lib/bundler/friendly_errors.rb:100:in `rescue in with_friendly_errors'
from /Users/gischer/.rbenv/versions/2.1.8/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.rc/lib/bundler/friendly_errors.rb:98:in `with_friendly_errors'
from /Users/gischer/.rbenv/versions/2.1.8/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.rc/exe/bundle:19:in `<top (required)>'
from /Users/gischer/.rbenv/versions/2.1.8/bin/bundle:23:in `load'
from /Users/gischer/.rbenv/versions/2.1.8/bin/bundle:23:in `<main>'
I have seen this before and increased my limit with, for instance, ulimit -n 8196
This has worked in the past, it is not working now:
jay-gischers-macbook-pro-110:ilarp gischer$ sudo ulimit -n 8196
Password:
jay-gischers-macbook-pro-110:ilarp gischer$ bundle install
Fetching gem metadata from http://rubygems.org/Retrying fetcher due to error (2/4):Bundler::HTTPError Could not reach host index.rubygems.org. Check your network connection and try again.
Retrying fetcher due to error (3/4): Errno::EMFILE Too many open files # rb_sysopen - /Users/gischer/.bundle/cache/compact_index/rubygems.org.80.9e8aca59a0c3a407fba89eb64623162d/info/rspec-rails
Retrying fetcher due to error (4/4): Errno::EMFILE Too many open files # rb_sysopen - /Users/gischer/.bundle/cache/compact_index/rubygems.org.80.9e8aca59a0c3a407fba89eb64623162d/info/sprockets
Rebooting my system hasn't helped. Closing down all my applications except for Terminal hasn't helped either. I ran a virus scan, too, using ClamXav, but it didn't find anything. Very little has changed about my rails server, which wasn't running when I tried to run this in any case. I found a vague suggestion from a few months ago Suggestions? Workarounds?
Changing this line:
source "http://rubygems.org"
to be
source "https://rubygems.org"
fixed the problem. I'm not entirely sure why that is. Maybe the real problem was access, and all those EMFILE messages were the result of some error cascade?
I have two Macs both up to date with OS X and Xcode. On one, I can install cocoapods and the pods specified in my project's podfile. The other fails:
pod install --verbose Preparing
Updating local specs repositories
Creating shallow clone of spec repo master from
https://github.com/CocoaPods/Specs.git $ /opt/local/bin/git clone
https://github.com/CocoaPods/Specs.git master --depth=1 Cloning into
'master'... error: error:1006706B:elliptic curve
routines:ec_GFp_simple_oct2point:point is not on curve while accessing
https://github.com/CocoaPods/Specs.git/info/refs?service=git-upload-pack
fatal: HTTP request failed [!] Unable to add a source with url
https://github.com/CocoaPods/Specs.git named master. You can try
adding it manually in ~/.cocoapods/repos or via pod repo add.
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/sources_manager.rb:48:in
rescue in find_or_create_source_with_url'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/sources_manager.rb:53:in
find_or_create_source_with_url'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:616:in block in sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:615:inmap'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:615:in sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:211:inupdate_repositories'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:129:in
block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/user_interface.rb:59:in
section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:128:in
resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:104:in
install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:71:in
run_install_with_update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:101:in
run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:312:in
run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command.rb:48:in
run' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/bin/pod:44:in
<top (required)>' /usr/bin/pod:23:inload' /usr/bin/pod:23:in
`'
I've completely uninstalled and reinstalled cocoapods and tried everything else remotely relevant on SO. To me it smells like an encryption/decryption issue or https/ssl issue.
On the machine having trouble, I did have a pre-beta Xcode installed, but I've since deleted it and made sure it's command line tools are set correctly.
Anyone have suggestion on how to remedy this or diagnosis it further?
I resorted to taking drastic action. I uninstalled Xcode (app, libraries, preferences), uninstalled cocoapods, and uninstalled MacPorts (I could have had an old port getting in the mix). Reinstalled Xcode and cocoapods and now it works.
I'm trying to use the command pod install and always have that :
$ pod setup
OR
$ sudo pod setup
Setting up CocoaPods master repo
[!] Pod::Executable clone 'https://github.com/CocoaPods/Specs.git' master
Cloning into 'master'...
fatal: unable to access 'https://github.com/CocoaPods/Specs.git/': Failed connect to github.com:443; Operation timed out
/Library/Ruby/Gems/2.0.0/gems/claide-0.4.0/lib/claide/command.rb:217:in `rescue in run': undefined method `verbose?' for nil:NilClass (NoMethodError)
from /Library/Ruby/Gems/2.0.0/gems/claide-0.4.0/lib/claide/command.rb:210:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/command.rb:51:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/bin/pod:24:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'
I have no idea what this is about. Can someone help me? This is the first time I try to do anything with CocoaPods on OS X Mavericks.
Thanks!
First please check your network, you can use curl or git clone to check it directly under terminal
If you have another problem you can try gem uninstall claide and then install it
Or you can try ruby 1.9
cocoapods 0.29 and claide 0.4.0 works fine under my ruby 1.9 env
you can use rvm to work with different ruby env
I got the same issue while using a virtual machine. I started getting the error after switching connection to Bridged. The problem was that the machine had no MAC address generated.
Solution: Go to Network Adapter settings -> Advanced -> press
Generate MAC Address
I am new to sproutcore, and have installed the sproutcore properly as explained in the tutorial, including from rvm, to ruby 1.9.2 to all the gems dependencies. But whenever, i am issuing any sproutcore command, it throws me this error.
sproutcore server fatal: Not a git repository (or any of the parent directories): .git fatal: Not a git repository (or any of the parent directories): .git fatal: Not a git repository (or any of the parent directories): .git fatal: Not a git repository (or any of the parent directories): .git /home/love/.rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.1.3/lib/bundler/rubygems_integration.rb:223:in `block in replace_bin_path': can't find executable sproutcore (Gem::Exception)
from /home/love/.rvm/gems/gems/sproutcore-1.8.2/bin/sproutcore:16:in `<top (required)>'
from /home/love/.rvm/gems/ruby-1.9.2-p320/bin/sproutcore:19:in `load'
from /home/love/.rvm/gems/ruby-1.9.2-p320/bin/sproutcore:19:in `<main>'
Hope, if some one can solve, Thanks in advance.
There was an issue with the 1.8.2 gem that was fixed and pushed up as 1.8.2.1
Just run gem update sproutcore to get the latest version.
Check the blog update for more details: http://blog.sproutcore.com/sproutcore-1-8-2-released/