Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rubygems 1.8.24 install using --prefix #383

Closed
Razzell opened this issue Oct 4, 2012 · 4 comments
Closed

Rubygems 1.8.24 install using --prefix #383

Razzell opened this issue Oct 4, 2012 · 4 comments

Comments

@Razzell
Copy link

Razzell commented Oct 4, 2012

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.

@rb2k
Copy link

rb2k commented Nov 1, 2012

I see the same behavior. From what I can see, this is also true for 1.8.23

@drbrain
Copy link
Member

drbrain commented Nov 27, 2012

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.

@duckinator
Copy link
Member

Is this issue still applicable, or can it be closed?

@copiousfreetime
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants