I am trying to install sass for the first time. Followed the following steps:
Installed Ruby 2.1.5 in Windows 7 64 bit from http://rubyinstaller.org/ successfully
ruby -v in cmd
ruby 2.1.5p273 (2014-11-13 revision 48405) [i386-mingw32]
gem install sass in cmd
I got the following error:
ERROR: Could not find a valid gem 'sass' (>= 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...
Fixed the above SSL error with the following line (found the solution in Stack Overflow):
gem source -a http://rubygems.org/
Again, I tried running gem install sass. I got the following error.
C:\Users\Michael>gem install sass
D:/Ruby21/lib/ruby/2.1.0/psych.rb:370:in parse': (<unknown>): control characters are not allowed at line 1 column 1 (Psych::SyntaxError) from D:/Ruby21/lib/ruby/2.1.0/psych.rb:370:inparse_stream' from D:/Ruby21/lib/ruby/2.1.0/psych.rb:318:in parse' from D:/Ruby21/lib/ruby/2.1.0/psych.rb:245:inload' from D:/Ruby21/lib/ruby/2.1.0/rubygems/config_file.rb:333:in load_file' from D:/Ruby21/lib/ruby/2.1.0/rubygems/config_file.rb:198:ininitialize' from D:/Ruby21/lib/ruby/2.1.0/rubygems/gem_runner.rb:74:in new' from D:/Ruby21/lib/ruby/2.1.0/rubygems/gem_runner.rb:74:indo_configuration' from D:/Ruby21/lib/ruby/2.1.0/rubygems/gem_runner.rb:39:in run' from D:/Ruby21/bin/gem:21:in'
Can anyone help me fix this? I even tried with the 64 bit Ruby but still I am stuck at this point.
Thanks in advance.
Try by downloading an older version of Ruby as sometimes new versions are not packaged with everything. I would also try to use a compiler app such as Koala. if you only want to try sass out.
Related
I am working on a Windows 7 64-bit machine. I had Ruby version 2.1.5 installed on my machine and everything was working great. I went and installed a gem that would set up a project for you with most of the basics already completed, but it required Ruby 2.2.2. I went and researched how to upgrade my Ruby version and the best solution I found was to install the Pik gem for windows and install 2.2.2 separately, and switch between the two versions.
I followed a tutorial on YouTube for how to set up Pik. I normally use Git Bash but the tutorial required me to use the cmd.exe prompt to set up Pik, and then it included a way to use Pik with Git Bash at the end of the tutorial. I also had to add a file to my PATH in the system settings.
I was able to set up Pik and everything worked great with Pik on both the cmd.exe and Git Bash consoles. However, from there if I went to run any other commands such as bundle install, I would get an error:
Could not locate gemfile.
I have also experienced the same error, but it would say something along the lines of an issue with the .bundle/directory. I tried switching to a project that I had already created in the past and tried running the command again. It still had the same error. (I did this to see if the gemfile in the project would fix anything.) If I try running gem install rails, I have had it work once or twice - but I still have the 'no gemfile' issue after the fact.
The times the command doesn't work I often get:
ERROR: Could not find a valid gem 'rails' (>= 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).
I tried running the pik gem and pik gemsync commands to see if that would fix my issues but it did not.
I tried uninstalling Pik by doing the pik implode command and deleting the files it created. The issue still persisted. I tried uninstalling the 2.2.2 version of Ruby using the uninstall executable in the file, and deleting any left over file(s). The issue still persisted. I tried to uninstall and reinstall Ruby completely from my machine, the 2.1.5 version that is doing the same method as the 2.2.2 version. Yet the issue still persists no matter what I do. I have tried many times uninstalling and reinstalling both Ruby versions, from the executable and from the control panel. I would like to find a way to completely uninstall and reinstall all of Ruby if possible, preferably reinstall Ruby 2.2.2. Or if anyone else has any other ideas for how to fix this issue?
from there if I went to run any other commands such as bundle install I would get an error Could not locate Gemfile.
As you've guessed, you need a file named gemfile in the same location you are running bundle install from
If I try running gem install rails I have had it work once or twice but I still have the no gemfile issue after the fact.
Running gem install <package> doesn't create a gemfile for you. You need to do this yourself. It's essentially a file where you manually specify which packages you would like your project to use. See here on how to create.
The times the command doesn't work I often get: "ERROR: Could not find a valid gem 'rails' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect retur ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed ( https://api.rubygems.org/latest_specs.4.8.gz)."
This sometimes happens on Windows machine. You can do a quick search on how to fix the gem command with SSL, or in your Gemfile you can temporarily specify http://rubygems.org/ instead of https://rubygems.org/
I'm a beginner in Ruby, following "Creating a New Rails Project".
But I can't start the server. I tried:
running rails server but got:
Could not find gem 'tzinfo-data <>= 0> x86-mingw32' in the gems available on the machine.
Run 'bundle install' to install missing gems.
running bundle install but got:
An error occurred while installing rake (10.4.2), and Bundler cannot continue.
Make sure that 'gem install rake -v '10.4.2'' succeeds before bundling.
gem 'tzinfo-data' but got:
Unknown command tzinfo-data
gem install tzinfo-data:
Could not find a valid gem 'tzinfo-data' <>= 0>, here is why:
Unable to download data from...
I have Windows 8.1. 64-bit
tzinfo-data was resolved with a cacert.pem file following the guide in the accepted answer. Today I am trying to install bootstrap-sass gem file. Do I need an another .pem file?
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read
server certificate B: certificate verify failed (https://rubygems.org/gems/boots
trap-sass-3.3.1.0.gem)
An error occurred while installing bootstrap-sass (3.3.1.0), and Bundler cannot
continue.
Make sure that `gem install bootstrap-sass -v '3.3.1.0'` succeeds before
bundling.
You have a common SSL issue.
You will see this error message:
certificate verify failed
The error message is because your system needs a new SSL certificate.
Here's information about it:
http://railsapps.github.io/openssl-certificate-verify-failed.html
On Windows:
Try upgrading your SSL certificates.
Download http://curl.haxx.se/ca/cacert.pem.
Save this file anywhere you want, such as:
C:\RailsInstaller\cacert.pem
On the command line, tell Ruby where to find the cert file, such as:
set SSL_CERT_FILE=C:\RailsInstaller\cacert.pem
Retry the gem installation.
If it works, that's great. If you want this to work with every project on your system, and also survive rebooting, then you can make the cert file permanent by adding the cert system-wide. To do this, use your Windows control panel.
Credit and more info: https://gist.github.com/fnichol/867550
I am trying to get SASS installed on my windows machine at work, however after installing ruby I cannot seem to install it ..
Ruby Version - 2.1.5
The error I am getting when running gem install sass on the command prompt :
ERROR: Could not find a valid gem 'SASS' ,.= 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.gx
Has anyone else encountered this? Know a way around it??
Turns out the latest download of ruby is having issues with it's SSL cert .. Installed an older version - works a treat
No laughing now...
I say this because there are a lot people who have already asked, not necessarily for the sass gem but for other gems. Answers almost always deflect the asker into building a virtualbox linux environment.
Okay, I've already got that, but I'd like to use the windows environment for personal reasons.
I followed Sass's own directions:
http://sass-lang.com/install
Ruby is supposed to be working in Windows 7, so I'd be grateful for answers that actually allow me to install gems in the windows environment. It's not a firewall issue. I turned off the firewall temporarily to check.
I've installed Ruby using the download at rubyinstaller.org.
I'm trying to install the sass gem. Gem will not install any gems, so it's not sass-specific.
It looks like the problem is related to https.
I'd be grateful if someone could tell me how to make this work.
PS C:\Users\Chris> ruby -v
ruby 2.0.0p353 (2013-11-22) [x64-mingw32]
PS C:\Users\Chris> gem -v
2.1.5
PS C:\Users\Chris> gem install sass
gem : ERROR: Could not find a valid gem 'sass' (>= 0), here is why:
At line:1 char:1
+ gem install sass
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (ERROR: Could n...), here is why::String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server
certificate B: certificate verify failed (https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz)
PS C:\Users\Chris>
After reading this on RubyGems Github that the problem might be with the installer I realized the problem might be with the installer. First I uninstalled the flawed version (Ruby 2.0.0-p353) and then installed 1.9.3-p484. Gem installs now run flawlessly, though not the latest preferred version.
As for me I closed the current prompt and opened a new command prompt window after installing DevKit then it was working fine.
check below full series of installation of ruby and ruby on rails on windows 7
http://www.youtube.com/watch?v=-eFwV8lRu1w
http://www.youtube.com/watch?v=D-YikrZqfbY
http://www.youtube.com/watch?v=y0X7SUfF928
http://www.youtube.com/watch?v=hy5x8aGKrrw
I am using Windows 7 and trying to install rspec, but I get the following error when I type gem install rspec into the terminal.
ERROR: Could not find a valid gem 'rspec' <>=0>, here is why:
Unable to download data from https://rubygems.org/ - SSL_connect SYSCA
LL returned=5 errno=0 state=SSLv2/v3 read server hello A <https://rubygems.org/l
atest_rspecs.4.8.gz>
ERROR: Possible alternatives: rspec
I've looked all over the internet for a solution, but I haven't managed to find anything.
The "SSL" part of the error message sounds similar to this issue with the certificates you have locally and the certificate that rubygems.org is using. There are specific instructions for Windows that show you how to download an updated certificate file and use it; it might be worth a shot.