Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 691 Vote(s) - 3.51 Average
  • 1
  • 2
  • 3
  • 4
  • 5
<RubyGems> How to change gem environment settings?

#1
I installed `rbenv` and set up ruby and gems. Now if I run `gem env` then I got the following:

RubyGems Environment:
- RUBYGEMS VERSION: 2.2.2
- RUBY VERSION: 2.1.0 (2013-12-25 patchlevel 0) [x86_64-darwin13.0]
- INSTALLATION DIRECTORY: /Users/myusername/Tools/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0
- RUBY EXECUTABLE: /Users/myusername/Tools/.rbenv/versions/2.1.0/bin/ruby
- EXECUTABLE DIRECTORY: /Users/myusername/Tools/.rbenv/versions/2.1.0/bin
- SPEC CACHE DIRECTORY: /Users/myusername/.gem/specs
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-13
- GEM PATHS:
- /Users/myusername/Tools/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0
- /Users/myusername/.gem/ruby/2.1.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
-

[To see links please register here]

- SHELL PATH:
- /Users/myusername/Tools/.rbenv/versions/2.1.0/bin
- /Users/myusername/Tools/.rbenv/libexec
- /Users/myusername/Tools/.rbenv/plugins/ruby-build/bin
- /opt/local/bin
- /opt/local/sbin
- /Users/myusername/Tools/.rbenv/shims
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /usr/local/bin
- /Users/myusername/Tools/./bin
- /Users/myusername/Tools/.rbenv/bin

Well.. all looks good except for `SPEC CACHE DIRECTORY` and `GEM PATHS`, all others have self-configured paths. (So I really don't want any dev-related directories directly placed in my user home folder.) Is there a way to flexibly change these two `env variables` without affecting normal functioning of `ruby`, `gem` and `rbenv` etc.?

Thanks!
Reply

#2
Actually I searched online and found the solution.

Just put the following in your .profile (Max OS) or .bashrc (Linux)

export GEM_PATH=/Users/myusername/Tools/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0
export GEM_SPEC_CACHE=/Users/myusername/Tools/.rbenv/versions/2.1.0/lib/ruby/gems/specs

Make sure the folder you put there existed. Then source the .profile or .bashrc, or simply restart your terminal. It is tested working now my env is correct.

Reference:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through