I've set up Rubinius on my mac to give it a shot and see how it behaves with Puma, but I'm having some trouble with installing gems, more specifically the Bundler gem. I keep getting this error:
ERROR: Error installing bundler: invalid gem: package is corrupt, exception while verifying: invalid byte sequence in US-ASCII (ArgumentError) in /Users/rolandjitsu/.gem/rbx/2.1.0/cache/bundler-1.5.3.gem
Does anyone know what is happening? Because I tried finding the reason why it behaves this way, but I could not figure it out why.
EDIT: If I remove the cache folder and try a gem install bundler I get the following:
Fetching: bundler-1.5.3.gem (100%)
ERROR: Error installing bundler: invalid gem: package is corrupt, exception while verifying: invalid byte sequence in US-ASCII (ArgumentError) in /Users/rolandjitsu/.gem/rbx/2.1.0/cache/bundler-1.5.3.gem
Problem is because Ruby's cache directory gets out of sync with the actual gem repository.
Remove cache folder. You can visit this following stack answer here # An error occurred while installing libv8 (3.11.8.13), and Bundler cannot continue
I ran the following command to fix that problem:
bundle update && bundle install
cheers
Related
I have been trying and trying and I can't get past this error. I have Ruby version 1.8.7 and Gem version 2.1.11 and I am trying to install open project and I keep coming up with this error
Installing json (1.8.1)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/json-1.8.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/json-1.8.1/ext/json/ext/generator/gem_make.out
Any help will be appreciated...
Best,
Mike
An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that gem install json -v '1.8.1' succeeds before bundling.
==> Something went wrong :(
==> Installation aborted.
Running sudo gem install json worked for me. Note: running gem install json did not work.
I am currently trying to install the jekyll gem, but it is failing with the error below. Can anybody help me in finding the cause? Please note that i am a ruby/gem noob. Until now i have just used gem install and was always happy with it. Thanks a lot!
sudo gem install jekyll
Building native extensions. This could take a while...
/mboehm.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/ext/builder.rb:54: warning: Insecure world writable dir /Volumes/Macintosh HD/Users/mboehm in PATH, mode 040777
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
/mboehm.rvm/rubies/ruby-2.0.0-p0/bin/ruby extconf.rb
/mboehm.rvm/rubies/ruby-2.0.0-p0/bin/ruby: invalid option -H (-h will show valid options) (RuntimeError)
Gem files will remain installed in /mboehm.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/**fast-stemmer-1.0.2** for inspection.
Results logged to /mboehm.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/fast-stemmer-1.0.2/ext/gem_make.out
Hey I fixed this with renaming my volume from "Macintosh HD" to a name without space (for me: "HDD")
It was never a problem until ruby 2.0.0
After run bundle install I get this error:
Gem::Package::FormatError: no metadata found in /Users/jeanosorio/.rvm/gems/ruby-1.9.3-p286/cache/libv8-3.11.8.13-x86_64-darwin-12.gem
An error occurred while installing libv8 (3.11.8.13), and Bundler cannot continue.
Make sure that `gem install libv8 -v '3.11.8.13'` succeeds before bundling.
I try with
gem install libv8 -v '3.11.8.13'
But I get
ERROR: Error installing libv8:
invalid gem format for /Users/jeanosorio/.rvm/gems/ruby-1.9.3-p286/cache/libv8-3.11.8.13-x86_64-darwin-12.gem
What is the problem here. Please some help.
The Gem::Package::FormatError: no metadata found in ... error message indicates that the content of Ruby's cache directory gets out of sync with the actual gem repository.
The error can be fixed by removing either the offending file or the complete cache folder, and running bundle install again.
First try removing the offending file:
rm ~/.rvm/gems/ruby-1.9.3-p286/cache/libv8-3.11.8.13-x86_64-darwin-12.gem
bundle install
That should fix the problem. If it doesn't, remove the complete cache folder:
rm -rf ~/.rvm/gems/ruby-1.9.3-p286/cache/
bundle install
Ref:
Rails: Fixing Bundle “No Metadata Found” issues
Bundler issue : No metadata found
SO answer to RubyGems issue on OSX
Additionally, it might be worth updating rubygems version with gem update --system as mentioned in this answer
I created a new RoR application, but whenever I run bundle install (which installs RSpec along other gems) I get the following error:
Gem::Package::FormatError: no metadata found in /Users/petarpetrovic/.rvm/gems/ruby-1.9.3-p194/cache/selenium-webdriver-2.22.0.gem
An error occured while installing selenium-webdriver (2.22.0), and Bundler cannot continue.
Make sure that gem install selenium-webdriver -v '2.22.0' succeeds before bundling.
When I run gem install selenium-webdriver -v '2.22.0', I get the following error message:
ERROR: Error installing selenium-webdriver:
invalid gem format for /Users/petarpetrovic/.rvm/gems/ruby-1.9.3-p194/cache/selenium-webdriver-2.22.0.gem
I tried manually removing the gem from cache folder and then rerun bundle install but I still get the same error messages.
Any ideas how to fix this?
Update gems
gem update --system
gem update
Check Gemfile in your rails application. Should content: gem "selenium-webdriver", "~> 2.22.0"
Run bundle install again.
I don't quite understand the above solution although it might work for someone. I ran into the same error but with different gem. I got problem with nokogiri and got this error message:
Gem::Package::FormatError: no metadata found in /home/myname/.rvm/gems/ruby-1.9.3-p194/cache/nokogiri-1.5.5.gem
I went to /home/myname/.rvm/gems/ruby-1.9.3-p194/cache/ and removed the file nokogiri-1.5.5.gem and I was able to run bundle again. I think there is something messed up with the .gem file.
Remove the cached copy of the gem and then try installing it again
rm -rf /Users/petarpetrovic/.rvm/gems/ruby-1.9.3-p194/cache/selenium-webdriver-2.22.0.gem
gem install selenium-webdriver -v '2.22.0'
I receive the following error when running a new compass project in OSX 10.7.3.
Invalid gemspec in [/Library/Ruby/Gems/1.8/specifications/multipart-post-1.1.5.gemspec]: invalid date format in specification: "2012-02-13 00:00:00.000000000Z"
I have tried running sudo gem update --system to cure the problem but I get the same error when doing so.
Try this
gem install rubygems-update
update_rubygems
You may also find this helpful esp. the answer of GaborKomaromi
Invalid date format specification in gemspec