You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When packaging ruby 1.8.x with rubygems, it's necessary to specify "ruby setup.rb --prefix=dir" so that the packaging takes place within dir rather than the default install directory.
In earlier version of rubygems, for example 1.6.2, the --prefix option was not present. Instead the directory was inferred from ruby. Rubygems libraries would install correctly into ruby-dir/lib/ruby/site_ruby/abi, and gem would install correctly into ruby-dir/bin, though with an incorrect hashbang.
Now, whenever the new --prefix option is set, for example to ruby-dir so that gem will install correctly into ruby-dir/bin, the libraries are installed not under ruby-dir/lib/ruby/site_ruby/abi but directly under ruby-dir/lib, which is not in the ruby LOAD_PATH. Thus, the use of --prefix causes a broken rubygems install.
This behavior is determined by lib/rubygems/commands/setup_command.rb in method generate_default_dirs(install_destdir). If the --prefix option is unspecified, then lib_dir is set from the config map, producing a path correctly containing lib/ruby/site_ruby/abi . Otherwise, it's incorrectly concatenated from dir/lib.
The text was updated successfully, but these errors were encountered:
This is not how --prefix is intended to work. Perhaps you are looking for --destdir?
I don't know how the setup options for packagers are supposed to work, though. You may need to provide me with a patch that must include tests. Without tests I will not apply it as it may break again.
Yes, closing. I have vague recollections of being involved in the original discussion of adding --destdir to rubygems setup because of packaging. This also doesn't apply because rubygems is internally packaged with ruby itself now. That wasn't the case back in the 1.8.x days.
When packaging ruby 1.8.x with rubygems, it's necessary to specify "ruby setup.rb --prefix=dir" so that the packaging takes place within dir rather than the default install directory.
In earlier version of rubygems, for example 1.6.2, the --prefix option was not present. Instead the directory was inferred from ruby. Rubygems libraries would install correctly into ruby-dir/lib/ruby/site_ruby/abi, and gem would install correctly into ruby-dir/bin, though with an incorrect hashbang.
Now, whenever the new --prefix option is set, for example to ruby-dir so that gem will install correctly into ruby-dir/bin, the libraries are installed not under ruby-dir/lib/ruby/site_ruby/abi but directly under ruby-dir/lib, which is not in the ruby LOAD_PATH. Thus, the use of --prefix causes a broken rubygems install.
This behavior is determined by lib/rubygems/commands/setup_command.rb in method generate_default_dirs(install_destdir). If the --prefix option is unspecified, then lib_dir is set from the config map, producing a path correctly containing lib/ruby/site_ruby/abi . Otherwise, it's incorrectly concatenated from dir/lib.
The text was updated successfully, but these errors were encountered: