Why can't I install the Ruby gem rspec on Cloud9? - ruby-on-rails

I am trying to run
gem install rspec --version 3.2.0
from Cloud9. It gives me this error:
ERROR: Could not find a valid gem 'rspec' (= 3.2.0), here is why:
Unable to download data from https://rubygems.org/ - Errno::ECONNREFUSED: Connection refused - connect(2) for "api.rubygems.org" port 443 (https://api.rubygems.org/specs.4.8.gz)
When I run the same command from a linux terminal it successfully installs the desired gem (six gems in total).
Why do I get the error on Cloud9?
I also have a file called Gemfile in my Workspace on Cloud9 with contents:
source "https://rubygems.org"
gem "rspec", "~> 3.2.0
Trying the following command on the Cloud9 command line:
bundle install
I get the following:
Fetching source index from https://rubygems.org/
Retrying source fetch due to error (2/3): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
Retrying source fetch due to error (3/3): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
Could not fetch specs from https://rubygems.org/
Another thing: if I go to the Rubygems website and search for the gem I want, the link is https://rubygems.org/gems/rspec/versions/3.2.0
Under versions, if I click on the version I want, shouldn't it download? I don't get a download.

Just try to run gem install rspec and you will get the 3.3.2 version.

Related

How to install Rails through a proxy

I was trying to install Ruby on Rails onto my PC, when I got this error:
gem install rails - ERROR: While executing gem (Net::HTTPServerException) 407 “Proxy Authentication Required” [on hold]
I tried:
gem install --http-proxy http://{domain}%5C{username}:{password}#{proxy.address}:{port}/ rails
got the error in the title
I also tried:
gem install -p http://pynewbie:mypassword#the-proxy-host.com:8888 rails
and got the error
ERROR: Could not find a valid gem 'rails' (>= 0), here is why: Unable to download data from https://rubygems.org/ - no such name(https://rubygems.org/specs.4.8.gz)
better to use proxychains to proxy all requests inside your command:
proxychains gem install rails
after install you have to create configuration file on ~/.proxychains/proxychains.conf
proxychains github

gem calls always timeout (can't reach rubygems.org)

I have a new install of Ubuntu 18.04. I am trying to install everything I need for Ruby on Rails, but whenever I use the gem command I get a timeout error, like this:
chris#linuxbox:~/Sites$ gem install bundler
ERROR: Could not find a valid gem 'bundler' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - timed out (https://api.rubygems.org/specs.4.8.gz)
But if I paste that URL into my browser, I get the file right away!
Why can't I connect from the command line?

grunt error in windows

I am using windows machine, when i try to run the grunt comment getting error.
Warning:
You need to have Ruby and Sass installed and in your PATH for this task to work.
More info: https://github.com/gruntjs/grunt-contrib-sass
Use --force to continue.
Aborted due to warnings.
I found the solution in internet need to install gem install sass
I tried to install - gem install sass - getting error.
ERROR: Could not find a valid gem 'sass' (>= 0) in any repository
I found the solution in online gem sources --add https://rubygems.org/
I tried to install - gem sources --add https://rubygems.org/
Error fetching https://rubygems.org/:
Errno::ECONNREFUSED: Failed to open TCP connection to api.rubygems.org:443 (No connection could be made because the target
machine actively re fused it. - connect(2) for "api.rubygems.org" port
443) (https://api.rubygems.org/specs.4.8.gz)
Any suggestions to fix this errors.

rake 10.4.2 not getting installed

I am new to Ruby on Rails. Till now I was using cloud9 online development environment. Recently I thought of setting up the environment locally(Windows 8). I installed ruby on rails using the railsinstaller. Then i cloned my repository onto my system. There was no error to this point. When I run the command bundle exec rake test I get
Could not find rake-10.4.2 in any of the sources.
Run `bundle install` to install missing gems.
Then I tried installing rake with command gem install rake -v '10.4.2'. I got
ERROR: Could not find a valid gem 'rake' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/latest_specs.4.8.gz)
What should I do?
Replace the ssl gem source with non-ssl as a temp solution:
gem sources -r https://rubygems.org/
gem sources -a http://rubygems.org/
From your log, it seems your server has some connection issues with the rubygems.org using SSL. That prevent you from instaling rake gem.
As a workaround, you can do like this:
Open Gemfile, change https://rubygems.org/ to http://rubygems.org and then issue command gem install rake -v '10.4.2' again, good luck!

How to install debugger in my NetBeans 6.9.1

I want to install debugger in my NetBeans 6.9.1.
I am using web applications which are communicating to each other and I am also using RVM with 2 different gemset which are having same version of Ruby and Rails install separately.
So how can I install debugger
I tried with this but not able to install this gem
ruby-debug-base19 (0.11.25)
ruby-debug-ide (0.4.16)
linecache19 (0.5.12)
Getting this error
bash: syntax error near unexpected token `('
samarth:~/project/MyECF-Pacer-Service$ gem install ruby-debug-base19
/home/samarth/.rvm/rubies/ruby-1.9.2-p320/bin/gem:4: warning: Insecure world writable dir /home/samarth/.rvm/gems/ruby-1.9.2-p320#persi/bin in PATH, mode 042777
WARNING: Error fetching data: Errno::ETIMEDOUT: Connection timed out - connect(2) (http://rubygems.org/latest_specs.4.8.gz)
ERROR: Could not find a valid gem 'ruby-debug-base19' (>= 0) in any repository
ERROR: Possible alternatives: ruby-debug-base19
I was able to install it by downloading the following versions manually, changing directory to the download location and run gem install on the following versions:
linecache19-0.5.13.gem
ruby-debug-base19.0.11.26.gem
You can fetch them from: http://rubyforge.org/projects/ruby-debug19/

Resources