Note that there are some explanatory texts on larger screens.

plurals
  1. POFix ruby gems path issues in debian
    text
    copied!<p>I've be banging my head against the wall trying to fix a ruby gems path without success. Here is my problem. In my production server running <code>Debian GNU/Linux 6.0.6 (squeeze)</code> I have both ruby1.8.7, ruby1.9.1 and jruby installed. For some reasons gem install uses jruby gems directory and not ruby gems directory which means I can not run ruby programs that depends on installed ruby gems. I've tried to export the ruby gem PATH using </p> <pre><code>export PATH=/var/lib/gems/1.8/bin:$PATH </code></pre> <p>but nothing changed. </p> <p>Here is my <code>.bashrc</code> file</p> <pre><code># ~/.bashrc: executed by bash(1) for non-login shells. export PS1='\h:\w\$ ' umask 022 # You may uncomment the following lines if you want `ls' to be colorized: # export LS_OPTIONS='--color=auto' # eval "`dircolors`" # alias ls='ls $LS_OPTIONS' # alias ll='ls $LS_OPTIONS -l' # alias l='ls $LS_OPTIONS -lA' # # Some more alias to avoid making mistakes: # alias rm='rm -i' # alias cp='cp -i' # alias mv='mv -i' JAVA_HOME=/usr/bin/jdk1.6.0_21/ PATH="/usr/bin/jdk1.6.0_21/bin:$PATH" PATH="$PATH:/opt/jruby/bin/" export PATH export GEM_PATH=/usr/lib/ruby/gems/1.8 </code></pre> <p>Environment</p> <pre><code>No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 6.0.6 (squeeze) Release: 6.0.6 Codename: squeeze gem env RubyGems Environment: - RUBYGEMS VERSION: 1.8.16 - RUBY VERSION: 1.8.7 (2011-12-27 patchlevel 330) [java] - INSTALLATION DIRECTORY: /opt/jruby/lib/ruby/gems/1.8 - RUBY EXECUTABLE: /opt/jruby/bin/jruby - EXECUTABLE DIRECTORY: /opt/jruby/bin - RUBYGEMS PLATFORMS: - ruby - universal-java-1.6 - GEM PATHS: - /opt/jruby/lib/ruby/gems/1.8 - /usr/lib/ruby/gems/1.8 - GEM CONFIGURATION: - :update_sources =&gt; true - :verbose =&gt; true - :benchmark =&gt; false - :backtrace =&gt; false - :bulk_threshold =&gt; 1000 - "install" =&gt; "--no-rdoc --no-ri --env-shebang" - "update" =&gt; "--no-rdoc --no-ri --env-shebang" - REMOTE SOURCES: - http://rubygems.org/ which ruby /usr/bin/ruby which gem /opt/jruby/bin//gem </code></pre> <p>Here is the error I'm getting while running ruby file</p> <pre><code>usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- net/https (LoadError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' </code></pre> <p>I've been struggling to change that but with no luck. How do I change gem path on Debian?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload