I need to install ruby on rails + Nokogiri, httparty, json [and some less significant gems] on server which does not have connection to internet. How it could be done?
host operating system is windows
Additional question, well, it is not very good for me, since it can takes some days, but I can as customer to give this server access to the http proxy. However I must confess, that I already tried to use somethin like that
set http_proxy="http://username:password@host:port"
or
gem --http_proxy "http://username:password@host:port"
but in both cases was not able to access the gem store :(
With the --local ( -l ) option, you would perform a local search through your installed gems. To install a gem, use gem install [gem] . Browsing installed gems is done with gem list . For more information about the gem command, see below or head to RubyGems' docs.
Open up the 'Software Center' app from your launcher and type in `RubyGems` without quotes into the application search box at the top right, and press [enter]. RubyGems then can be installed by just clicking on the button labeled 'Install', thats it.
gem install -p http://proxy_ip:proxy_port rails
is a fast and working way but I needed something permanent for every installation.
Create a file:
vi ~/.gemrc
Add contents
# HTTP Proxy options
http_proxy: http://proxy_ip:proxy_port
https_proxy: http://proxy_ip:proxy_port
# For authentication (although not tested)
http_proxy_user: username
http_proxy_pass: password
https_proxy_user: username
https_proxy_pass: password
Verify proxies appear in gem environment variables
gem env
RubyGems Environment: - RUBYGEMS VERSION: 2.5.2 - RUBY VERSION: 2.3.3 (2016-11-21 patchlevel 222) [universal.x86_64-darwin17]
I solved it this way:
set http_proxy=host:port
without any quotes, http:// protocol and username:password. Cheers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With