Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9083651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:49:27+00:00 2026-06-16T20:49:27+00:00

Does anyone know a way to deploy to a server and have the native

  • 0

Does anyone know a way to deploy to a server and have the native extensions installed in a user directory?

I’m using capistrano and bundler and don’t have write access to /usr/local… Gems with Native extensions (in the current case, bcrypt-ruby) don’t install. My initial problem was an inability to find “config.h.”

On some investigation of the generated Makefile, this line is the culprit:

 $(OBJS): $(hdrdir)/ruby.h $(hdrdir)/ruby/defines.h $(arch_hdrdir)/ruby/config.h

Mkmf defines arch_hdrdir this way:

arch_hdrdir = $(extout)/include/$(arch)

Why it does this is a bit baffling. Unfortunately, $extout is “”, so as a result, Make is looking for config in /include/i686-linux/ruby/config.h and fails.

Further investigation into mkmf lead me to think $extout being set to something that evaluates to true in install_dirs, but ends up being an empty string in the makefile. But, I can’t figure out where it’s getting set.

To shake things up, I’ve tried setting $extout in extconf.rb. But…

1) If I set it to ‘/usr/local/lib/ruby’ the makefile tries to install the .so into /usr/local/lib/ruby… where I don’t have write access. Boo.

2) I have tried setting $extout to ‘/home/crivens/railsapp/shared/bundle’. This actually compiles, but then the application can’t find the .so file. And I had to do a bunch of hacks to get there.

After spending a bunch of time on this, I’m looking for suggestions!

  1. Is it even possible to install a gem with native extensions without access to the system repository?
  2. What would be the best strategy for doing so?
  3. Is mkmf documented anywhere? (I sure can’t find much of note)
  4. What is $extout for and how does it get set?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T20:49:28+00:00Added an answer on June 16, 2026 at 8:49 pm

    I think what you’re looking for is ruby version manager (rvm). It’s available here and allows you to manage versions of Ruby, Rails, and Gem sets.

    https://rvm.io/

    There’s a good getting started guide here as well: http://rvm.beginrescueend.com/rvm/install/

    Here’s how the install goes:

    [sam@mungr ~]$ \curl -L https://get.rvm.io | bash -s stable --ruby
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 10956  100 10956    0     0   2240      0  0:00:04  0:00:04 --:--:--  2240
    Please read and follow further instructions.
    Press ENTER to continue.
    Downloading RVM from wayneeseguin branch stable
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 1243k  100 1243k    0     0   570k      0  0:00:02  0:00:02 --:--:--  929k
    
    Installing RVM to /home/sam/.rvm/
        Adding rvm PATH line to /home/sam/.bashrc /home/sam/.zshrc.
        Adding rvm loading line to /home/sam/.bash_profile /home/sam/.zprofile.
    
    # RVM:  Shell scripts enabling management of multiple ruby environments.
    # RTFM: https://rvm.io/
    # HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net)
    # Cheatsheet: http://cheat.errtheblog.com/s/rvm/
    # Screencast: http://screencasts.org/episodes/how-to-use-rvm
    
    # In case of any issues read output of 'rvm requirements' and/or 'rvm notes'
    
    Installation of RVM in /home/sam/.rvm/ is almost complete:
    
      * To start using RVM you need to run `source /home/sam/.rvm/scripts/rvm`
        in all your open shell windows, in rare cases you need to reopen all shell windows.
    
    # sam,
    #
    #   Thank you for using RVM!
    #   I sincerely hope that RVM helps to make your life easier and
    #   more enjoyable!!!
    #
    # ~Wayne
    
    
    rvm 1.17.7 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
    
    No binary rubies available for: downloads/ruby-1.9.3-p362.
    Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
    Fetching yaml-0.1.4.tar.gz to /home/sam/.rvm/archives
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  460k  100  460k    0     0   342k      0  0:00:01  0:00:01 --:--:--  492k
    Extracting yaml to /home/sam/.rvm/src/yaml-0.1.4
    Configuring yaml in /home/sam/.rvm/src/yaml-0.1.4.
    Compiling yaml in /home/sam/.rvm/src/yaml-0.1.4.
    Installing yaml to /home/sam/.rvm/usr
    Installing Ruby from source to: /home/sam/.rvm/rubies/ruby-1.9.3-p362, this may take a while depending on your cpu(s)...
    ruby-1.9.3-p362 - #downloading ruby-1.9.3-p362, this may take a while depending on your connection...
    ruby-1.9.3-p362 - #extracting ruby-1.9.3-p362 to /home/sam/.rvm/src/ruby-1.9.3-p362
    ruby-1.9.3-p362 - #extracted to /home/sam/.rvm/src/ruby-1.9.3-p362
    ruby-1.9.3-p362 - #configuring
    ruby-1.9.3-p362 - #compiling
    ruby-1.9.3-p362 - #installing 
    Retrieving rubygems-1.8.24
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  371k  100  371k    0     0   430k      0 --:--:-- --:--:-- --:--:--  611k
    Extracting rubygems-1.8.24 ...
    Removing old Rubygems files...
    Installing rubygems-1.8.24 for ruby-1.9.3-p362 ...
    Installation of rubygems completed successfully.
    Saving wrappers to '/home/sam/.rvm/bin'.
    ruby-1.9.3-p362 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
    ruby-1.9.3-p362 - #importing default gemsets (/home/sam/.rvm/gemsets/), this may take time ...
    Install of ruby-1.9.3-p362 - #complete 
    Creating alias default for ruby-1.9.3-p362.
    Recording alias default for ruby-1.9.3-p362.
    Creating default links/files
    Saving wrappers to '/home/sam/.rvm/bin'.
    
      * To start using RVM you need to run `source /home/sam/.rvm/scripts/rvm`
        in all your open shell windows, in rare cases you need to reopen all shell windows.
    

    Once complete I’ve got a fully functional install of Ruby 1.9.3-p362:

    [sam@mungr ~]$ source /home/sam/.rvm/scripts/rvm
    [sam@mungr ~]$ rvm list
    
    rvm rubies
    
    =* ruby-1.9.3-p362 [ x86_64 ]
    
    # => - current
    # =* - current && default
    #  * - default
    

    Which version of Ruby?

    [sam@mungr ~]$ which ruby
    ~/.rvm/rubies/ruby-1.9.3-p362/bin/ruby
    

    A little Hello World

    [sam@mungr ~]$ ruby -e "puts 'Hello world'"
    Hello world
    

    EDIT #1

    Through the course of discussing this question the author, Crivens, noted that he was getting the following error:

    Error curl: (77) Problem with the SSL CA cert (path? access rights?)
    and OS is Linux version 2.6.32-042stab055.16 (root@rh6-build-x64) (gcc
    version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC) ) #1 SMP Fri Jun 8
    19:22:28 MSD 2012. I’m still hoping to use the system install of ruby.

    If you encounter this error it usually means one of two things:

    1. I think you’re just missing this RPM, ca-certificates-2010.63-3.el6. These are the certificates. My install of RVM on a Ubuntu 8.04.4 machine fails. Should I install it as multi-user instead?

    solution #1

    % yum install ca-certificates-2010.63-3.el6
    

    2. The developer for rvm, Wayne, changed the URL from rvm.beginrescueend.com to rvm.io and probably wonked the SSL certs. Curl Certificate Error when Using RVM to install Ruby 1.9.2

    solution #2

    % curl -L get.rvm.io | bash -s stable
    
    -or-
    
    % echo insecure > ~/.curlrc
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know a way to register a persistent UDF in SQLite 3 (using
Does anyone know of any way to overcome NotSupportedException? I have a method against
Does anyone know a way of getting more tracks when using the license parameter.
Does anyone know a way of disabling compression for a single file using the
Does anyone know any good solutions for automated deployment to a remote server using
Does anyone know a way to re-order table columns, using jQuery? I don't mean
Does anyone know a way to change color codes to color names? I have
Does anyone know a way to make an asp button... <asp:button runat=server>Button1</asp:button> resemble an
Does anyone know if its possible to deploy to a server in a VPN
Does anyone know a way to get the mean amplitude of a .wav file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.