grunt error in windows - ruby-on-rails

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.

Related

IOError: HTTP session not yet started when running [gem install bundler]

I tried to install bundler by using gem install bundler, however, I got the following error message:
ERROR: Could not find a valid gem 'bundler' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - IOError: HTTP session not yet started (https://rubygems.org/specs.4.8.gz)
Also, I tried to install webpacker by using gem install webpacker, and I got the following error message:
ERROR: Could not find a valid gem 'webpacker' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - timed out (https://rubygems.org/specs.4.8.gz)
Can anyone help me fix these two issues? I have searched on Google, but I didn't see efficient answers.
I installed ruby-2.7.2 using rvm on M1 chip macOS Big Sur 11.4.
Thanks Thanks Thanks!!!
It seems that you are not accessing rubygems.org. It can be an authorization issue on your end. Make sure that api.rubygems.org is correctly authorized.
You can test it by running curl https://api.rubygems.org/specs.4.8.gz

Cocoapods on Mac unable to install "Could not find a valid gem 'cocoapods' (>= 0)"

I have one office Mac running MacOS 10.13.2 and Ruby 2.2.1 and it is unable to install or run cocoapods via gems. sudo gem install cocoapods returns the error below. I compared the proxy and DNS configuration and it is identical to other macs that can install successfully.
▶ ping https://rubygems.org
ping: cannot resolve https://rubygems.org: Unknown host
What is causing cocoapods installation to fail with the cryptic no such name (https://rubygems.org/specs.4.8.gz) error message?
I tried the answer from this question: 'sudo gem install cocoapods' doesn't work on ElCapitan 10.11.4 , ERROR: Could not find a valid gem 'cocoapods' (>= 0) in any repository
$ sudo gem install cocoapods --source http://rubygems.org
ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - no such name (https://rubygems.org/specs.4.8.gz)
Unable to download data from http://rubygems.org/ - no such name (http://rubygems.org/specs.4.8.gz)
The problem was resolved by connecting to a mobile hotspot and updating ruby through that.

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?

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

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.

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