i have problem with rubygems version 1.8.7 on ubuntu 10.04 server LTS
64bit.this rubygems i also try both installation automatic using apt-get
package manager and using manually installation but the problem also
same.
the problem occur when i try to install any gems installation
package.i try many solution to solve the problem like remove and install
back rubygems.i also format computer then install back ruby and rubygems
but still cannot solve this problem.so i hope any rubygem expert can
help me solved this kind of problem.below are the following error that
appear after i execute gem install command.
sudo gem install any-package
ERROR: While executing gem … (Zlib::DataError)
incorrect header check.
Try to install dev lib for zlib:
$ sudo apt-get -y install zlib zlib-devel
thank for answer…
i already try this command but nothing is working…
below is addition information of my problem when i try to install rail
using --debug command.i hope any expert can help me to solve this
problem…
your help is very appreciated.thank you very much.
oneadmin@oneadmin:/var/lib/gems/1.8$ sudo gem install rails --debug
Exception NameError' at /usr/lib/ruby/1.8/rubygems/command_manager.rb:161 - uninitialized constant Gem::Commands::InstallCommand ExceptionGem::LoadError’ at /usr/lib/ruby/1.8/rubygems.rb:827 - Could
not find RubyGem test-unit (>= 0)
Exception `Gem::LoadError’ at /usr/lib/ruby/1.8/rubygems.rb:827 - Could
not find RubyGem sources (> 0.0.1)
Exception EOFError' at /usr/lib/ruby/1.8/net/protocol.rb:135 - end of file reached ExceptionZlib::DataError’ at /usr/lib/ruby/1.8/rubygems.rb:599 -
incorrect header check
ERROR: While executing gem … (Zlib::DataError)
incorrect header check
/usr/lib/ruby/1.8/rubygems.rb:599:in inflate' /usr/lib/ruby/1.8/rubygems.rb:599:ininflate’
/usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:100:in fetch_spec' /usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:72:infetch’
/usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:71:in map' /usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:71:infetch’
/usr/lib/ruby/1.8/rubygems/dependency_installer.rb:99:in find_gems_with_sources' /usr/lib/ruby/1.8/rubygems/dependency_installer.rb:192:infind_spec_by_name_and_version’
/usr/lib/ruby/1.8/rubygems/dependency_installer.rb:213:in install' /usr/lib/ruby/1.8/rubygems/commands/install_command.rb:118:inexecute’
/usr/lib/ruby/1.8/rubygems/commands/install_command.rb:115:in each' /usr/lib/ruby/1.8/rubygems/commands/install_command.rb:115:inexecute’
/usr/lib/ruby/1.8/rubygems/command.rb:257:in invoke' /usr/lib/ruby/1.8/rubygems/command_manager.rb:132:inprocess_args’
/usr/lib/ruby/1.8/rubygems/command_manager.rb:102:in run' /usr/lib/ruby/1.8/rubygems/gem_runner.rb:58:inrun’
/usr/bin/gem:21
for the first command it can be execute correctly
after i change sudo gem install rubygems -v=“1.4.2” to
sudo gem install rubygems -v 1.4.2 but for second command i got problem
to run. the error as below:
sudo update_rubygems
sudo: update_rubygems: command not found
and all other command display same error as before.
Exception NameError' at /usr/lib/ruby/1.8/rubygems/command_manager.rb:161 - uninitialize d constant Gem::Commands::InstallCommand Exception Gem::LoadError’ at /usr/lib/ruby/1.8/rubygems.rb:827 - Could
not find RubyGem
test-unit (>= 0)
Exception `Gem::LoadError’ at /usr/lib/ruby/1.8/rubygems.rb:827 - Could
not find RubyGem
sources (> 0.0.1)
for the first command it can be execute correctly
after i change sudo gem install rubygems -v=“1.4.2” to
sudo gem install rubygems -v 1.4.2 but for second command i got problem
to run. the error as below:
sudo update_rubygems
sudo: update_rubygems: command not found
and all other command display same error as before.
If you installed rubygems it would seem impossible for the command
update_rubygems not to be found. Perhaps it is not installed.
Perhaps someone is familiar with Ubuntu’s ruby packages and can guide
you with what it is that isn’t working right. Generally, the
distribution packages lag too far behind and seem to be an obstruction
which is one of the reasons why things like rvm have become popular.
I suppose the way to install it would be…
sudo apt-get install rubygems
On my ubuntu 10.04 LTS (but not using any Ubuntu ruby packages
whatsoever because I use the enterprise ruby packages)
If rubygems package is installed, you should be able to easily run ‘sudo
update rubygems’
Craig
–
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
If you installed rubygems it would seem impossible for the command
update_rubygems not to be found. Perhaps it is not installed.
Perhaps someone is familiar with Ubuntu’s ruby packages and can guide
you with what it is that isn’t working right. Generally, the
distribution packages lag too far behind and seem to be an obstruction
which is one of the reasons why things like rvm have become popular.
I strongly suggest that for rails on Ubuntu you use the method from http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/
as an earlier poster already suggested. You are in for a great deal
of pain trying to do it using the ubuntu repositories.
If you installed rubygems it would seem impossible for the command
update_rubygems not to be found. Perhaps it is not installed.
Perhaps someone is familiar with Ubuntu’s ruby packages and can guide
you with what it is that isn’t working right. Generally, the
distribution packages lag too far behind and seem to be an obstruction
which is one of the reasons why things like rvm have become popular.
I strongly suggest that for rails on Ubuntu you use the method from http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/
as an earlier poster already suggested. You are in for a great deal
of pain trying to do it using the ubuntu repositories.
If you installed rubygems it would seem impossible for the command
update_rubygems not to be found. Perhaps it is not installed.
Perhaps someone is familiar with Ubuntu’s ruby packages and can guide
you with what it is that isn’t working right. Generally, the
distribution packages lag too far behind and seem to be an obstruction
which is one of the reasons why things like rvm have become popular.
I suppose the way to install it would be…
sudo apt-get install rubygems
On my ubuntu 10.04 LTS (but not using any Ubuntu ruby packages
whatsoever because I use the enterprise ruby packages)
If rubygems package is installed, you should be able to easily run ‘sudo
update rubygems’
Craig
–
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
i think i already install rubygem below is my command to verify that
rubygem is install in my system.i also try to use apt-get install
rubygem but the system show that my rubygem is already new version.below
all the output:-
root@oneadmin:~# apt-get install rubygems
Reading package lists… Done
Building dependency tree
Reading state information… Done
rubygems is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
which installs all gems in my user directory - no sudo needed. BUT
bundler does not obey this setting and ask for sudo password and
installs them into the system.
I think the easiest way to get rubygems and bundle working “locally”
is setting something like
and there is no problem to install sinatra and thin. from that thread
I conclude you do not have the right version of rubygems installed try
to install the version from 11.10