Skip to content

Instantly share code, notes, and snippets.

@iande
Created May 28, 2011 22:45
Show Gist options
  • Save iande/997309 to your computer and use it in GitHub Desktop.
Save iande/997309 to your computer and use it in GitHub Desktop.
gem sandbox error
chaos@godel:Downloads$ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]
chaos@godel:Downloads$ rake --version
rake, version 0.8.7
chaos@godel:Downloads$ gem -v
1.8.3
chaos@godel:Downloads$ gem sandbox install flog
/Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find rake (>= 0.8.1) amongst [] (Gem::LoadError)
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:444:in `block in find_in_unresolved'
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:444:in `map'
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:444:in `find_in_unresolved'
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:43:in `require'
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:447:in `ensure_gem_subdirectories'
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:51:in `initialize'
from /Users/chaos/.rvm/gems/ruby-1.9.2-p180/gems/rubygems-sandbox-1.0.0/lib/rubygems/commands/sandbox_command.rb:123:in `new'
from /Users/chaos/.rvm/gems/ruby-1.9.2-p180/gems/rubygems-sandbox-1.0.0/lib/rubygems/commands/sandbox_command.rb:123:in `install_gem'
from /Users/chaos/.rvm/gems/ruby-1.9.2-p180/gems/rubygems-sandbox-1.0.0/lib/rubygems/commands/sandbox_command.rb:88:in `block in install'
from /Users/chaos/.rvm/gems/ruby-1.9.2-p180/gems/rubygems-sandbox-1.0.0/lib/rubygems/commands/sandbox_command.rb:87:in `each'
from /Users/chaos/.rvm/gems/ruby-1.9.2-p180/gems/rubygems-sandbox-1.0.0/lib/rubygems/commands/sandbox_command.rb:87:in `install'
from /Users/chaos/.rvm/gems/ruby-1.9.2-p180/gems/rubygems-sandbox-1.0.0/lib/rubygems/commands/sandbox_command.rb:71:in `execute'
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/command.rb:278:in `invoke'
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:147:in `process_args'
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:117:in `run'
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:65:in `run'
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/bin/gem:21:in `<main>'
rvm use ruby-1.9.2
gem install open_gem
gem sandbox install flog
chaos@godel:Downloads$ rvm default
chaos@godel:Downloads$ gem sandbox install flog
/Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find rake (>= 0.8.1) amongst [flog-2.5.1, ruby_parser-2.0.6, sexp_processor-3.0.5] (Gem::LoadError)
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:444:in `block in find_in_unresolved'
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:444:in `map'
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:444:in `find_in_unresolved'
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:43:in `require'
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:447:in `ensure_gem_subdirectories'
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:51:in `initialize'
from /Users/chaos/.rvm/gems/ruby-1.9.2-p180/gems/rubygems-sandbox-1.0.0/lib/rubygems/commands/sandbox_command.rb:123:in `new'
from /Users/chaos/.rvm/gems/ruby-1.9.2-p180/gems/rubygems-sandbox-1.0.0/lib/rubygems/commands/sandbox_command.rb:123:in `install_gem'
from /Users/chaos/.rvm/gems/ruby-1.9.2-p180/gems/rubygems-sandbox-1.0.0/lib/rubygems/commands/sandbox_command.rb:88:in `block in install'
from /Users/chaos/.rvm/gems/ruby-1.9.2-p180/gems/rubygems-sandbox-1.0.0/lib/rubygems/commands/sandbox_command.rb:87:in `each'
from /Users/chaos/.rvm/gems/ruby-1.9.2-p180/gems/rubygems-sandbox-1.0.0/lib/rubygems/commands/sandbox_command.rb:87:in `install'
from /Users/chaos/.rvm/gems/ruby-1.9.2-p180/gems/rubygems-sandbox-1.0.0/lib/rubygems/commands/sandbox_command.rb:71:in `execute'
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/command.rb:278:in `invoke'
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:147:in `process_args'
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:117:in `run'
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:65:in `run'
from /Users/chaos/.rvm/rubies/ruby-1.9.2-p180/bin/gem:21:in `<main>'
chaos@godel:Downloads$ rvm system
chaos@godel:Downloads$ gem sandbox install flog
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#has_rdoc= called from /Library/Ruby/Gems/1.8/specifications/gemedit-1.0.0.gemspec:13.
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#has_rdoc= called from /Library/Ruby/Gems/1.8/specifications/rubygems-update-1.8.4.gemspec:39.
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#has_rdoc= called from /Library/Ruby/Gems/1.8/specifications/yard-0.6.4.gemspec:18.
Fetching: sexp_processor-3.0.5.gem (100%)
Fetching: ruby_parser-2.0.6.gem (100%)
Fetching: flog-2.5.1.gem (100%)
Successfully installed flog
Copy the following scripts to any directory in your path to use them:
cp /Users/chaos/.gem/sandboxes/flog/bin/flog _in_your_$PATH_
Whether the error is raised or not in Ruby 1.9.2 seems to hinge on line 8 in "lib/rubygems_plugin":
require 'open_gem/common_options'
For the life of me, I cannot figure out why as the defined module does not appear to be extended or included by anything else automatically.
It's a bad require statement. If it's replaced with:
require File.expand_path("../open_gem/common_options", __FILE__)
everything works just fine. So, Ruby 1.9.2 can't find "open_gem/common_options" in the standard load path, it defers back to rubygems, and that is apparently causing a problem with sandbox.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment