Moving Ruby installation can cause it to be unable to run. How to solve this problem?

I want to compile Ruby from source code, install it, and then move and install it elsewhere.

For example:

ruby-1.9.3-p125$./configure --prefix=/tmp/ruby-1.9.3-p125

The problem is that it seems that the –prefix path is in the Ruby binary Hard-coded. When I moved /tmp/ruby-1.9.3-p125 to /opt/ruby-1.9.3-p125, the hard-coded path appeared in the installed binaries and scripts.

< p>After moving, I received an error:

<internal:gem_prelude>:1:in `require': cannot load such file - rubygems.rb (LoadError)
from <internal:gem_prelude>:1:in `<compiled>'

How can I bypass this?

Found that the solution is to use –enable-load-relative

p>

So instead:

./configure

Run:

./ configure --enable-load-relative

I want to compile Ruby from source code, install it, and then move and install it elsewhere.

For example:

ruby-1.9.3-p125$./configure --prefix=/tmp/ruby-1.9.3-p125

Problems Yes, it seems that the –prefix path is hard-coded in the Ruby binary. When I move /tmp/ruby-1.9.3-p125 to /opt/ruby-1.9.3-p125, the hard-coded path appears in the installed In the binary files and scripts.

After moving, I received an error:

<internal:gem_prelude>:1:in `require': cannot load such file - rubygems.rb (LoadError)
from <internal:gem_prelude>:1:in `<compiled>'

How can I bypass this?

The solution is to use –enable-load-relative when running configure

So instead:

./configure

Run:

./configure --enable-load-relative

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 4241 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.