[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

rubygems configuration

David Askew

7/30/2006 2:50:00 PM


I used darwin ports to install ruby, rubygems, and apparently a few
dependencies.


Whenever I run the following to continue in my quest for a working
ruby/rails/mysql playground ... i get the following .... what may I
have missed?

razor:~ dhaskew$ sudo gem install rails
Attempting local installation of 'rails'
Local gem file not found: rails*.gem
Attempting remote installation of 'rails'
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:204:in
`report_activate_error': Could not find RubyGem sources (> 0.0.0)
(Gem::LoadError)
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:141:in
`activate'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:37:in
`require_gem_with_options'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:31:in
`require_gem'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/
remote_installer.rb:425:in `sources'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/
remote_installer.rb:435:in `source_index_hash'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/
remote_installer.rb:399:in `install'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/
gem_commands.rb:195:in `execute'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/
gem_commands.rb:153:in `execute'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/command.rb:
49:in `invoke'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/
cmd_manager.rb:94:in `process_args'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/
cmd_manager.rb:67:in `run'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/
gem_runner.rb:13:in `run'
from /opt/local/bin/gem:17

4 Answers

Chad Fowler

7/30/2006 3:06:00 PM

0

On 7/30/06, David Askew <dhaskew@earthlink.net> wrote:
>
> I used darwin ports to install ruby, rubygems, and apparently a few
> dependencies.
>
>
> Whenever I run the following to continue in my quest for a working
> ruby/rails/mysql playground ... i get the following .... what may I
> have missed?
>
> razor:~ dhaskew$ sudo gem install rails
> Attempting local installation of 'rails'
> Local gem file not found: rails*.gem
> Attempting remote installation of 'rails'
> /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:204:in
> `report_activate_error': Could not find RubyGem sources (> 0.0.0)
> (Gem::LoadError)

Hi. It looks to me like something went wrong with the darwin ports
RubyGems install. You might want to remove and reinstall that. If
you type "gem list", you should see a gem called "sources", which
tells RubyGems where to download gems from. It's a part of the
RubyGems system, so it's not optional and should always be installed
along with the RubyGems framework.

--
Chad Fowler
http://chad...
http://pragmaticprogrammer.com/tit... (Rails Recipes)
http://pragmaticprogrammer.com/tit... (My Job Went to India,
and All I Got Was This Lousy Book)
http://rubyc...
http://ruby...
http://rubygems.rub... (over four million gems served!)

David Askew

7/30/2006 3:57:00 PM

0

>
> Hi. It looks to me like something went wrong with the darwin ports
> RubyGems install. You might want to remove and reinstall that. If
> you type "gem list", you should see a gem called "sources", which
> tells RubyGems where to download gems from. It's a part of the
> RubyGems system, so it's not optional and should always be installed
> along with the RubyGems framework.
>

razor:~ dhaskew$ sudo port -v uninstall rb-rubygems
---> Deactivating rb-rubygems 0.8.11_0
---> Uninstalling rb-rubygems 0.8.11_0
---> Uninstall is removing rb-rubygems from the port registry.
razor:~ dhaskew$ sudo port -v install rb-rubygems
---> Unpacking tgz archive for rb-rubygems 0.8.11_0
---> Extracting rb-rubygems-0.8.11_0.i386.tgz
/
/+COMMENT
/+CONTENTS
/+DESC
/+PORTFILE
/+STATE
/opt/
/opt/local/
/opt/local/bin/
/opt/local/bin/gem
/opt/local/bin/gem_mirror
/opt/local/bin/gem_server
/opt/local/bin/gemwhich
/opt/local/bin/generate_yaml_index.rb
/opt/local/bin/update_rubygems
/opt/local/lib/
/opt/local/lib/ruby/
/opt/local/lib/ruby/gems/
/opt/local/lib/ruby/gems/cache/
/opt/local/lib/ruby/gems/cache/sources-0.0.1.gem
/opt/local/lib/ruby/gems/gems/
/opt/local/lib/ruby/gems/gems/sources-0.0.1/
/opt/local/lib/ruby/gems/gems/sources-0.0.1/lib/
/opt/local/lib/ruby/gems/gems/sources-0.0.1/lib/sources.rb
/opt/local/lib/ruby/gems/specifications/
/opt/local/lib/ruby/gems/specifications/sources-0.0.1.gemspec
/opt/local/lib/ruby/vendor_ruby/
/opt/local/lib/ruby/vendor_ruby/1.8/
/opt/local/lib/ruby/vendor_ruby/1.8/gemconfigure.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/builder.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/cmd_manager.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/command.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/config_file.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/dependency_list.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/deployment.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/doc_manager.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/format.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/gem_commands.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/gem_openssl.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/gem_runner.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/installer.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/loadpath_manager.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/old_format.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/open-uri.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/package.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/remote_installer.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/rubygems_version.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/security.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/specification.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/timer.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/user_interaction.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/validator.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/version.rb
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb
/opt/local/lib/ruby/vendor_ruby/1.8/ubygems.rb
/opt/local/share/
/opt/local/share/doc/
/opt/local/share/doc/rb-rubygems/
/opt/local/share/doc/rb-rubygems/doc/
/opt/local/share/doc/rb-rubygems/doc/doc.css
/opt/local/share/doc/rb-rubygems/doc/makedoc.rb
/opt/local/share/doc/rb-rubygems/examples/
/opt/local/share/doc/rb-rubygems/examples/application/
/opt/local/share/doc/rb-rubygems/examples/application/an-app.gemspec
/opt/local/share/doc/rb-rubygems/examples/application/bin/
/opt/local/share/doc/rb-rubygems/examples/application/bin/myapp
/opt/local/share/doc/rb-rubygems/examples/application/lib/
/opt/local/share/doc/rb-rubygems/examples/application/lib/
somefunctionality.rb
/opt/local/share/doc/rb-rubygems/gemspecs/
/opt/local/share/doc/rb-rubygems/gemspecs/cgikit-1.1.0.gemspec
/opt/local/share/doc/rb-rubygems/gemspecs/jabber4r.gemspec
/opt/local/share/doc/rb-rubygems/gemspecs/linguistics.gemspec
/opt/local/share/doc/rb-rubygems/gemspecs/ook.gemspec
/opt/local/share/doc/rb-rubygems/gemspecs/progressbar.gemspec
/opt/local/share/doc/rb-rubygems/gemspecs/README
/opt/local/share/doc/rb-rubygems/gemspecs/redcloth.gemspec
/opt/local/share/doc/rb-rubygems/gemspecs/rublog.gemspec
/opt/local/share/doc/rb-rubygems/gemspecs/ruby-doom.gemspec
/opt/local/share/doc/rb-rubygems/gemspecs/rubyjdwp.gemspec
/opt/local/share/doc/rb-rubygems/gemspecs/statistics.gemspec
/opt/local/share/doc/rb-rubygems/README
---> Archive rb-rubygems-0.8.11_0.i386.tgz unpacked
---> Installing rb-rubygems 0.8.11_0
---> Activating rb-rubygems 0.8.11_0
---> Cleaning rb-rubygems
---> Removing workpath for rb-rubygems

... and then .. in a new terminal


razor:~ dhaskew$ sudo gem install rails
Attempting local installation of 'rails'
Local gem file not found: rails*.gem
Attempting remote installation of 'rails'
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:204:in
`report_activate_error': Could not find RubyGem sources (> 0.0.0)
(Gem::LoadError)
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:141:in
`activate'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:37:in
`require_gem_with_options'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:31:in
`require_gem'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/
remote_installer.rb:425:in `sources'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/
remote_installer.rb:435:in `source_index_hash'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/
remote_installer.rb:399:in `install'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/
gem_commands.rb:195:in `execute'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/
gem_commands.rb:153:in `execute'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/command.rb:
49:in `invoke'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/
cmd_manager.rb:94:in `process_args'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/
cmd_manager.rb:67:in `run'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/
gem_runner.rb:13:in `run'
from /opt/local/bin/gem:17




* any other ideas?



-thanks



David Askew

7/30/2006 4:11:00 PM

0


On Jul 30, 2006, at 12:05 PM, David Askew wrote:

>
> On Jul 30, 2006, at 11:56 AM, David Askew wrote:
>
>>>
>>> Hi. It looks to me like something went wrong with the darwin ports
>>> RubyGems install. You might want to remove and reinstall that. If
>>> you type "gem list", you should see a gem called "sources", which
>>> tells RubyGems where to download gems from. It's a part of the
>>> RubyGems system, so it's not optional and should always be installed
>>> along with the RubyGems framework.
>
> should there be a file in the gems directory then?
>
> razor:/opt/local/lib/ruby/gems/1.8 dhaskew$ sudo gem env gempath
> /opt/local/lib/ruby/gems/1.8
> razor:/opt/local/lib/ruby/gems/1.8 dhaskew$ ls -al
> total 0
> drwxr-xr-x 6 root admin 204 Jul 30 03:13 .
> drwxr-xr-x 6 root admin 204 Jul 30 11:54 ..
> drwxr-xr-x 2 root admin 68 Jul 30 03:13 cache
> drwxr-xr-x 2 root admin 68 Jul 30 03:13 doc
> drwxr-xr-x 2 root admin 68 Jul 30 03:13 gems
> drwxr-xr-x 2 root admin 68 Jul 30 03:13 specifications
> razor:/opt/local/lib/ruby/gems/1.8 dhaskew$ ls -l gems/
> razor:/opt/local/lib/ruby/gems/1.8 dhaskew$
>
>

perhaps the gem was installed in the wrong place somehow?

razor:~ dhaskew$ sudo gem env gempath
/opt/local/lib/ruby/gems/1.8
razor:~ dhaskew$ cd /opt/local/lib/ruby/gems/
razor:/opt/local/lib/ruby/gems dhaskew$ ls
1.8 cache gems specifications
razor:/opt/local/lib/ruby/gems dhaskew$ find . -name "*sources*"
/cache/sources-0.0.1.gem
/gems/sources-0.0.1
/gems/sources-0.0.1/lib/sources.rb
/specifications/sources-0.0.1.gemspec

David Askew

7/30/2006 4:17:00 PM

0

>>
>
> perhaps the gem was installed in the wrong place somehow?
>
> razor:~ dhaskew$ sudo gem env gempath
> /opt/local/lib/ruby/gems/1.8
> razor:~ dhaskew$ cd /opt/local/lib/ruby/gems/
> razor:/opt/local/lib/ruby/gems dhaskew$ ls
> 1.8 cache gems specifications
> razor:/opt/local/lib/ruby/gems dhaskew$ find . -name "*sources*"
> ./cache/sources-0.0.1.gem
> ./gems/sources-0.0.1
> ./gems/sources-0.0.1/lib/sources.rb
> ./specifications/sources-0.0.1.gemspec



razor:/opt/local/lib/ruby/gems dhaskew$ sudo gem install cache/
sources-0.0.1.gem
Attempting local installation of 'cache/sources-0.0.1.gem'
Successfully installed sources, version 0.0.1
razor:/opt/local/lib/ruby/gems dhaskew$ ls
1.8 cache gems specifications
razor:/opt/local/lib/ruby/gems dhaskew$ ls -l
total 0
drwxr-xr-x 6 root admin 204 Jul 30 03:13 1.8
drwxr-xr-x 3 root admin 102 Jul 30 11:54 cache
drwxr-xr-x 3 root admin 102 Jul 30 11:54 gems
drwxr-xr-x 3 root admin 102 Jul 30 11:54 specifications
razor:/opt/local/lib/ruby/gems dhaskew$ cd 1.8/
razor:/opt/local/lib/ruby/gems/1.8 dhaskew$ ls
cache doc gems specifications
razor:/opt/local/lib/ruby/gems/1.8 dhaskew$ ls -l gems/
total 0
drwxr-xr-x 3 root admin 102 Jul 30 12:12 sources-0.0.1
razor:/opt/local/lib/ruby/gems/1.8 dhaskew$ ls
cache doc gems specifications
razor:/opt/local/lib/ruby/gems/1.8 dhaskew$



... above you can see where the gem was installed to by ports/
rubygems initially

when I reinstalled it locally, it installed it somewhere different.
now I can issue my commands

razor:~ dhaskew$ sudo gem list

*** LOCAL GEMS ***

sources (0.0.1)
This package provides download sources for remote gem installation