After failing to manage installing properly the Jekyll gem (website dev), the problem started out with pod install returning the infamous message described also in other questions on this site (when running pod install I get The `master` repo requires CocoaPods 0.32.1, try updating but still in 0.31 and others)
[!] The `master` repo requires CocoaPods 0.32.1 -
Update CocoaPods, or checkout the appropriate tag in the repo.
/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>'
Running pod ver returns 0.29.0 even though I successfully installed 0.32.1.
I noticed that the above message points to the 0.29.0 install directory, which does not match the current installation directory (/usr/local/lib/ruby/gems/2.1.0/gems)
I've run through all possible gem commands iterations but still can't come out on top of it (cleanup, uninstall, install, etc).
gem check returns the following:
xcodeproj-0.16.1.gem has 5 problems
ext/xcodeproj/Makefile:
Extra file
ext/xcodeproj/extconf.h:
Extra file
ext/xcodeproj/mkmf.log:
Extra file
ext/xcodeproj/xcodeproj_ext.bundle:
Extra file
ext/xcodeproj/xcodeproj_ext.o:
Extra file
Don't know if it relates.
Removing the /Library/Ruby/Gems/2.0.0/gems/ directory returns errors on any pod command.
Short of reinstalling the whole operating system(!)--which, tested on a fresh volume, proved solving the issue--can't figure this one out.
Any pointer?
It sounds like you may be using RVM and installing gems into a gemset. If that is the case, then it is possible for you to have multiple versions of the same gem installed on your system simultaneously.
If you want to update the system-wide gem, use sudo, e.g. sudo gem install cocoapods. If you want to update the RVM, exclude sudo, e.g. gem install cocoapods.
Also be sure that if you are using an RVM, you are not running pod install as root, either.
Related
I've Googled this quite a bit, and haven't found anything useful to my situation.
$ docker-compose up abc
produces the following in the logs:
/usr/lib/ruby/vendor_ruby/bundler/spec_set.rb:92:in `block in materialize': Could not find concurrent-ruby-1.0.5 in any of the sources (Bundler::GemNotFound)
from /usr/lib/ruby/vendor_ruby/bundler/spec_set.rb:85:in `map!'
from /usr/lib/ruby/vendor_ruby/bundler/spec_set.rb:85:in `materialize'
from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:132:in `specs'
from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:177:in `specs_for'
from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:166:in `requested_specs'
from /usr/lib/ruby/vendor_ruby/bundler/environment.rb:18:in `requested_specs'
from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:13:in `setup'
from /usr/lib/ruby/vendor_ruby/bundler.rb:121:in `setup'
from /usr/lib/ruby/vendor_ruby/bundler/setup.rb:17:in `<top (required)>'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
The relevant bit from my docker-compose.yml file:
command: bundle exec rails server
concurrent-ruby is most definitely installed, exactly where it needs to be. I've run bundle install inside Docker so many times, and I've tried adding gem install concurrent-ruby -v 1.0.5 to my docker-compose command, and it installs just fine, and then still complains that it can't find the gem. I tried adding bundle install directly to my docker-compose command, and that fails because of some known issue involving docker-compose and git (I'm using two internal gems). [ EDIT: https://github.com/docker/compose/issues/2856#issuecomment-236625662 ]
Everything worked fine until I upgraded some Ruby gems, but I'm not sure why or how to fix it.
I had an issue similar to this outside of Docker.
I deleted the Gemfile.lock and ran bundle.
Issue went away.
Your mileage may vary.
I had this same error with docker-compose. Apparently, it was installing the gem, after running docker-compose run backend bundle install the Gemfile.lock file was updated correctly. Still, it would continue displaying this error either for this gem or others.
Turns out that in some cases just running bundle install with docker is not enough. As specified in the documentation here: https://docs.docker.com/compose/rails/ sometimes after running bundle install you need to rebuild the images. This fixed my problem:
docker-compose run backend bundle install
docker-compose build
tl;dr: Set GEM_HOME = BUNDLE_PATH
Since you're using docker, I also assume you are maybe changing the value of BUNDLE_PATH so you can cache the gems? If so, you'll also want to set the GEM_HOME variable to this value.
I can't exactly explain why. My theory is that.. something.. is incorrectly using the value of GEM_HOME when it should be using BUNDLE_PATH, and thus the gems you installed from your rails project's Gemfile are not there.
It's common to cache your bundle with docker. If you're doing that, and you updated some gems you'll bump into this problem.
Delete volume and docker-compose up again.
docker volume ls
Then:
docker volume rm <vol name>
Nothing will make it work unless you reinstall the metasploit-framework. I have been facing the issue for 1 week. I have personally tried and its running now.
$ pkg upgrade && pkg install git && pkg install curl && pkg install
wget && pkg install nmap && curl -LO
raw.githubusercontent.com/Hax4us/Metasploit_termux/master/metasploit.sh
&& chmod 777 metasploit.sh && ./metasploit.sh
I have installed ruby 2.2.5 / gem 2.3.0 in CygWin but I am getting installation errors in using gem install.
As suggested in some places, I also tried gem update --system but even that did not help.
How to correct this issue?
I have attached the output of the commands I ran:
$ gem install napa --backtrace
ERROR: While executing gem ... (TypeError)
no implicit conversion of nil into String
/usr/local/share/ruby/site_ruby/rubygems/installer.rb:168:in `check_executable_overwrite'
/usr/local/share/ruby/site_ruby/rubygems/installer.rb:409:in `block in generate_bin'
/usr/local/share/ruby/site_ruby/rubygems/installer.rb:396:in `each'
/usr/local/share/ruby/site_ruby/rubygems/installer.rb:396:in `generate_bin'
/usr/local/share/ruby/site_ruby/rubygems/installer.rb:236:in `install'
/usr/local/share/ruby/site_ruby/rubygems/request_set.rb:156:in `block in install'
/usr/local/share/ruby/site_ruby/rubygems/request_set.rb:140:in `each'
/usr/local/share/ruby/site_ruby/rubygems/request_set.rb:140:in `install'
/usr/local/share/ruby/site_ruby/rubygems/commands/install_command.rb:249:in `install_gem'
/usr/local/share/ruby/site_ruby/rubygems/commands/install_command.rb:291:in `block in install_gems'
/usr/local/share/ruby/site_ruby/rubygems/commands/install_command.rb:287:in `each'
/usr/local/share/ruby/site_ruby/rubygems/commands/install_command.rb:287:in `install_gems'
/usr/local/share/ruby/site_ruby/rubygems/commands/install_command.rb:202:in `execute'
/usr/local/share/ruby/site_ruby/rubygems/command.rb:307:in `invoke_with_build_args'
/usr/local/share/ruby/site_ruby/rubygems/command_manager.rb:167:in `process_args'
/usr/local/share/ruby/site_ruby/rubygems/command_manager.rb:137:in `run'
/usr/local/share/ruby/site_ruby/rubygems/gem_runner.rb:54:in `run'
/usr/bin/gem:21:in `<main>'
$ gem update --system
Updating rubygems-update
ERROR: While executing gem ... (TypeError)
no implicit conversion of nil into String
Skip to the bottom for the short answer and not join me on my journey.
So I've been working on this today because for the life of me, what worked last year to get it working did not work this year. All the steps are attempted while using admin permissions. I had done some questionable commands from other threads that required me to downgrade gem to something 6 years ago, don't do that I could not figure out how to revert so I deleted my Cygwin install and started fresh and clean for this. Windows 10 is my operating system.
I used cygwin's installer to install the current version of ruby, gem and sass. (I'm positive as time goes on these will numbers will become out of date).
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-cygwin]
ruby-devel 2.3.3-1
gem 2.6.11
Sass 3.4.21 selective steve
Side note I tend to use 'Category' under the View drop down and select the devel category. I also let cygwin select dependencies for me automatically.
At this point I am having the same error. Looking at the log provided by the output I decided to try out some of the commands smashed in there like 'gcc' which was absent. Loading up the cygwin installer again, installed gcc version 5.4.0 (Package called gcc-core: GNU Compiler Collection (C, OpenMP))
Attempting to run 'gem install compass' again, another error, it cant find 'make'. Warm up the installer again and locate 'make: The GNU Version of the 'make' utility (4.2.1-2)
Running the compass install command again and checking the log: 'libffi' doesnt look like its there. In our cygwin installer says under the libs category I have libffi6 v2.2.1-2 already. I'm going to give libffi-devel a shot because I'm desperate to get compass installed.
This worked! Navigate to your directory and run the command 'compass watch' I'm pretty excited. Running 'compass -v' in the command line shows us the version 1.0.3
Short answer:
Useing the Cygwin installer to install the following Packages
ruby: interpreted object oriented scripting language
ruby-devel: interpreted object oriented scripting language
ruby-gems: Ruby Module management system
ruby-sass: Ruby css compiler extension
make: The GNU version of the make utility
gcc-core: GNU Compiler Collection(c, OpenMP)
libffi-devel: Portable foreign function interface libary
Then run cygwin as a administrator and input the command 'gem install compass'.
I have ruby 2.0.0p247 [x64-mingw32] with Gem 2.2.2 installed on Windows 8. I have a persistent problem gem that is making it virtually unusable. Whenever I try to install a new gem, I invariably get:
ERROR: While executing gem ... Invalid spec cache file in C:/Users/...
In the past, I've been able to run gem update or gem update --system and that would clear up the problem for one, single gem install. Subsequent install would fail with the same error. Now even gem update fails with that error message.
I've tried deleting the users/.../.gem directory. When I do that, gem update recreates that directory and promptly fails with the same error message.
I re-installed ruby 1.9.8 with gems several times to try to cure the problem, then upgraded to ruby 2.0.0. Throughout all re-installs and upgrades, the problem persisted.
I'm at my wits end here. Can anyone help me resolve this issue?
Here's the backtrace on the edit"
L:\xampp\htdocs\frameworks\yii2\framework>gem update --backtrace
Updating installed gems
ERROR: While executing gem ... (Gem::Exception)
Invalid spec cache file in C:/Users/Larry/.gem/specs/rubygems.org%443/specs.4.8
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/source.rb:187:in `rescue in load_specs'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/source.rb:179:in `load_specs'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/spec_fetcher.rb:266:in `tuples_for'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/spec_fetcher.rb:228:in `block in available_specs'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/source_list.rb:97:in `each'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/source_list.rb:97:in `each_source'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/spec_fetcher.rb:222:in `available_specs'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/spec_fetcher.rb:102:in `search_for_dependency'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/commands/update_command.rb:113:in `fetch_remote_gems'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/commands/update_command.rb:135:in `highest_remote_version'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/commands/update_command.rb:264:in `block in which_to_update'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/commands/update_command.rb:260:in `each'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/commands/update_command.rb:260:in `which_to_update'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/commands/update_command.rb:96:in `execute'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/command.rb:305:in `invoke_with_build_args'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/command_manager.rb:167:in `process_args'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/command_manager.rb:137:in `run'
C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/gem_runner.rb:54:in `run'
C:/Ruby200-x64/bin/gem:21:in `<main>'
I had the same problem, but was able to fix it this way:
Delete the folder in users/%user%/.gem/ and rerun the command gem sources --update
Hope this helps.
I'm attempting to build local Ruby documentation as suggested here:
https://github.com/toy/doc
However when I use the default Rakefile I get the following:
[Documentation]$ rake build
configuring and updating: 100.0%
rake aborted!
undefined method `available?' for Gem:Module
/Users/snowcrash/.rvm/gems/ruby-2.0.0-p195/gems/sdoc-0.2.20/lib/sdoc/json_backend.rb:9:in `<top (required)>'
Any suggestions?
I don't know much about ruby (and even less about the gem ecosystem built up around it), but I believe a possible workaround for this issue is to find what gems the project requires and manually install them. In the case of this particular project, it looks like you need the gem "fspath".
At the project root, type
gem install fspath
and try re-running rake.
I honestly don't know the actual root cause of the issue, other than that presumably, your version of the 'gem' program is probably > v2, while some other program (rake?) expects it to be older and still support the "available?" method.
If installing "fspath" doesn't fix the issue, you could try downgrading your version of gem by doing
gem install -v [some version of gem older than v2]
Check gem install --help for more info on this.
This is just for future visitor who has the same issue.
As ekremkaraca said, you can just solve this by downgrading rubygems.
rvm install --force rubygems 1.4.2
I'm having trouble understanding the following error with Ruby's Rake.
C:\>gem install rake
Successfully installed rake-0.8.7
1 gem installed
Installing ri documentation for rake-0.8.7...
Installing RDoc documentation for rake-0.8.7...
C:\>rake
C:/Ruby192/lib/ruby/1.9.1/rubygems.rb:340:in `bin_path': can't find executable r
ake for rake-0.8.7 (Gem::Exception)
from C:/Ruby192/bin/rake:19:in `<main>'
Running Ruby 1.9.2 for Windows.
Edit: Installing from source yields:
C:\Documents and Settings\XPherior\Desktop\rake-0.8.7\rake-0.8.7>ruby install.rb
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load --
ftools (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require'
from install.rb:3:in `<main>'
The second error, where you have installed into C:\Documenets And Settings\ is occurring because you cannot install ruby into a folder with a space in the path. It should be installed into c:\Ruby\ c:\Ruby#.#.#\ if you want the version # in the path, or something along those lines.
for the first error: there is a bug in the rubyinstaller.org version of ruby 1.9.2, which is causing this by running "gem install rake".
you can read about the error you're getting, here: http://redmine.ruby-lang.org/issues/show/3677
there are a couple of ways to fix this error:
re-install ruby v1.9.2 and don't run "gem install rake". rake v0.8.7 is built into the ruby v1.9.2 installation, so you don't need to re-install it.
if you do want to manually install it, you can delete the ruby.gempspec file from your ruby installation. this file is located at (rubyinstalldir)\lib\ruby\gems\1.9.1\specifications
either of these options will fix the problem for you.
i'm not sure which is "better" off-hand... it may be necessary to delete the gemspec file and reinstall rake, to support updates and new versions in the future. i'm not sure, though. we'll find out once rake is updated and we need to install a new version. or, perhaps, the issue will be fixed in the ruby installation by then, and we'll just need to update our ruby install.
I've run into your both errors.
For the first one. Try the solution post at here http://betterlogic.com/roger/2010/11/ruby-1-9-2-rake-woe/.
And for the second error, it's causes by a library update by the ruby 1.9. From the Programming Ruby 1.9, "ftools have been removed (and replaced by fileutils)." I'm not pretty sure but at least that's an explanation.