Ruby on Rails Tuesday, November 1, 2011

On Tue, Nov 1, 2011 at 1:15 AM, MaT 2. <lists@ruby-forum.com> wrote:
> Alex Mercer wrote in post #1029306:
>> 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
> 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)
>
> Exception `EOFError' at /usr/lib/ruby/1.8/net/protocol.rb:135 - end of
> file reached
> Exception `Zlib::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:in `inflate'
>        /usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:100:in `fetch_spec'
>        /usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:72:in `fetch'
>        /usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:71:in `map'
>        /usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:71:in `fetch'
>        /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:in
> `find_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:in
> `execute'
>        /usr/lib/ruby/1.8/rubygems/commands/install_command.rb:115:in
> `each'
>        /usr/lib/ruby/1.8/rubygems/commands/install_command.rb:115:in
> `execute'
>        /usr/lib/ruby/1.8/rubygems/command.rb:257:in `invoke'
>        /usr/lib/ruby/1.8/rubygems/command_manager.rb:132:in
> `process_args'
>        /usr/lib/ruby/1.8/rubygems/command_manager.rb:102:in `run'
>        /usr/lib/ruby/1.8/rubygems/gem_runner.rb:58:in `run'
>        /usr/bin/gem:21

It looks like your rubygems source is corrupted.
Assuming you really need to use ubuntu packages, try purging the
package and re install it.

However, if you can use something like RVM[1] or rbenv[2] to install
and manage ruby.


Hope this helps.

Cheers.

[1]https://rvm.beginrescueend.com/rvm
[2]https://github.com/sstephenson/rbenv

--
Leonardo Mateo.
There's no place like ~

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment