Project

General

Profile

Actions

Bug #7779

closed

embedded rubygems 2.0.0.rc.2 mangles --user-install

Added by jonforums (Jon Forums) almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 2.0.0dev (2013-02-04 trunk 39035) [i686-linux]
Backport:
[ruby-core:51832]

Description

This is low priority for my usage, and while I'm not investigating the issue anytime soon, I'm surfacing it here in case it's not my system issue and it affects 2.0.0 readiness. I didn't see anything similar on RG's GH issue tracker.

system: ubuntu server 12.10 32bit running in virtualbox vm

jon@ubusvr:~/downloads$ uname -a
Linux ubusvr 3.5.0-23-generic #35-Ubuntu SMP Thu Jan 24 13:05:29 UTC 2013 i686 i686 i686 GNU/Linux

jon@ubusvr:~/downloads$ env | grep GEM

jon@ubusvr:~/downloads$ gem env
RubyGems Environment:

  • RUBYGEMS VERSION: 2.0.0.rc.2
  • RUBY VERSION: 2.0.0 (2013-02-04 patchlevel -1) [i686-linux]
  • INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/2.0.0
  • RUBY EXECUTABLE: /usr/local/bin/ruby
  • EXECUTABLE DIRECTORY: /usr/local/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86-linux
  • GEM PATHS:
    • /usr/local/lib/ruby/gems/2.0.0
    • /home/jon/.gem/ruby/2.0.0
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :backtrace => false
    • :bulk_threshold => 1000
    • "gem" => "--no-ri --no-rdoc"
  • REMOTE SOURCES:

nothing of interest in ~/.gem

jon@ubusvr:~/downloads$ ll ~/.gem/
total 4
drwxrwxr-x 3 jon jon 4096 2013-01-23 18:31:19 specs/

user install fail (also fails from a network install)

jon@ubusvr:~/downloads$ gem i rdiscount-2.0.7.gem --user-install
Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/local/bin directory.

partial install creates new dirs in ~/.gem

jon@ubusvr:~/downloads$ ll ~/.gem/ruby/2.0.0/
total 20
drwxrwxr-x 2 jon jon 4096 2013-02-03 19:29:24 build_info/
drwxrwxr-x 2 jon jon 4096 2013-02-03 19:29:24 cache/
drwxrwxr-x 2 jon jon 4096 2013-02-03 19:29:24 doc/
drwxrwxr-x 3 jon jon 4096 2013-02-03 19:29:24 gems/
drwxrwxr-x 2 jon jon 4096 2013-02-03 19:29:24 specifications/

rdiscount partially installed into ~/.gem

jon@ubusvr:~/downloads$ ll ~/.gem/ruby/2.0.0/gems/
total 4
drwxrwxr-x 7 jon jon 4096 2013-02-03 19:29:24 rdiscount-2.0.7/

try again...force the user-install

jon@ubusvr:~/downloads$ sudo gem i rdiscount-2.0.7.gem --user-install
[sudo] password for jon:
Building native extensions. This could take a while...
Successfully installed rdiscount-2.0.7
Done installing documentation for rdiscount (0 sec).
1 gem installed

gem installed to ~/.gem but command installed to /usr/local/bin

jon@ubusvr:~/downloads$ which rdiscount
/usr/local/bin/rdiscount

jon@ubusvr:~/downloads$ ll /usr/local/lib/ruby/gems/2.0.0/specifications/
total 24
drwxr-xr-x 2 root root 4096 2013-02-03 16:11:47 default/
-rw-r--r-- 1 root root 1364 2013-01-23 18:35:29 json-1.7.6.gemspec
-rw-r--r-- 1 root root 4528 2013-01-23 18:35:38 minitest-4.5.0.gemspec
-rw-r--r-- 1 root root 3697 2013-01-23 18:36:01 rake-10.0.3.gemspec
-rw-r--r-- 1 root root 1581 2013-01-23 18:36:12 test-unit-2.5.4.gemspec


Related issues 2 (0 open2 closed)

Related to Backport200 - Backport #7880: Backport r39307 to Ruby 2.0.0Closeddrbrain (Eric Hodel)02/19/2013Actions
Related to Backport200 - Backport #7889: Backport 39327 to ruby 2.0.0 to fix gem update --user-installCloseddrbrain (Eric Hodel)02/20/2013Actions

Updated by mame (Yusuke Endoh) almost 12 years ago

  • Status changed from Open to Assigned

drbrain, what do you think?

--
Yusuke Endoh

Updated by jonforums (Jon Forums) almost 12 years ago

haven't made it past looking at defaults...

jon@ubusvr:~/downloads$ ruby -ve '%w(bindir default_bindir user_dir).each {|i| p "#{i} -> #{Gem.send(i)}"}'
ruby 2.0.0dev (2013-02-18 trunk 39300) [i686-linux]
"bindir -> /usr/local/bin"
"default_bindir -> /usr/local/bin"
"user_dir -> /home/jon/.gem/ruby/2.0.0"

Actions #3

Updated by drbrain (Eric Hodel) almost 12 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r39307.
Jon, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/rubygems/installer.rb: Fixed placement of executables with
    --user-install. [ruby-trunk - Bug #7779]
  • test/rubygems/test_gem_installer.rb: Test for above.

Updated by jonforums (Jon Forums) almost 12 years ago

Thanks Eric. Install looks good but gem up xxx --user-install was missed.

If you want this opened as a new issue (here or on RG issues) let me know.

jon@ubusvr:~$ ruby --version
ruby 2.0.0dev (2013-02-19 trunk 39321) [i686-linux]

jon@ubusvr:~$ gem --version
2.0.0

jon@ubusvr:~$ ll ~/.gem
total 4
drwxrwxr-x 3 jon jon 4096 2013-01-23 18:31:19 specs/

jon@ubusvr:~$ export PATH=$HOME/.gem/ruby/2.0.0/bin:$PATH

jon@ubusvr:~$ gem i oj -v '2.0.6' --user-install
Fetching: oj-2.0.6.gem (100%)
Building native extensions. This could take a while...
Successfully installed oj-2.0.6
Done installing documentation for oj (0 sec).
1 gem installed

jon@ubusvr:~$ gem li oj

*** LOCAL GEMS ***

oj (2.0.6)

jon@ubusvr:~$ gem up oj --user-install
Updating installed gems
Updating oj
Fetching: oj-2.0.7.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/local/lib/ruby/gems/2.0.0 directory.

jon@ubusvr:~$ ll ~/.gem/ruby/2.0.0/cache/
total 152
-rw-rw-r-- 1 jon jon 74240 2013-02-19 11:44:36 oj-2.0.6.gem
-rw-rw-r-- 1 jon jon 74752 2013-02-19 11:45:19 oj-2.0.7.gem

jon@ubusvr:~$ ll ~/.gem/ruby/2.0.0/gems/
total 4
drwxrwxr-x 5 jon jon 4096 2013-02-19 11:44:36 oj-2.0.6/

jon@ubusvr:~$ ll ~/.gem/ruby/2.0.0/specifications/
total 4
-rw-rw-r-- 1 jon jon 711 2013-02-19 11:44:43 oj-2.0.6.gemspec

Updated by drbrain (Eric Hodel) almost 12 years ago

  • Status changed from Closed to Assigned
  • % Done changed from 100 to 50

Seems like the same issue.

Actions #6

Updated by drbrain (Eric Hodel) almost 12 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 50 to 100

This issue was solved with changeset r39327.
Jon, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/rubygems/commands/update_command.rb: Create the installer after
    options are processed. [ruby-trunk - Bug #7779]
  • test/rubygems/test_gem_commands_update_command.rb: Test for the
    above.
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0