Make sure that 'gem install ~ ' succeeds before bundling - ruby-on-rails

I began learning Ruby on rails today.
I have installed Ruby, DEVELOPMENT KIT, SQLite3, bundler and rails.
Next, My textbook says to run rails new todo in the console. Then, the following message appeared:
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read
server certificate B: certificate verify failed (https://rubygems.org/gems/coffee-rails-4.0.1.gem)
An error occurred while installing execjs (2.2.2), and Bundler cannot
continue.
Make sure that `gem install execjs -v '2.2.2'` succeeds before bundling.
I did as follows.
C:\rubyfolder>gem install execjs -v 2.2.2
Then it appeared as follows:
Fetching: execjs-2.2.2.gem (100%)
Successfully installed execjs-2.2.2
Parsing documentation for execjs-2.2.2
Installing ri documentation for execjs-2.2.2
Done installing documentation for execjs after 1 seconds
WARNING: Unable to pull data from 'https://rubygems.org/': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)
1 gem installed
Next, I ran rails new todo again. Then, the message that execjs of above message is replaced by coffee-script appeared.
Make sure that `gem install coffee-script -v '2.3.0'` succeeds before bundling.
Next, I installed coffee-script.
I have repeated this kind of work for 3 or 4 times, but it don't finish. What should I do?
(execjs might not be the first of this cycle. I can't see first part of logs)

I have faced similar kind of issue. This is what worked for me:
In your Gemfile or wherever you have specified the gems list and replace source 'https://......' with this source 'http://.......' otherwise it will keep on asking Make sure that gem install gem_name__ v xxx' succeeds before bundling.`
Do bundle install or rails new todo
Done, no error this time.

Just to run gem install separatly doesn't solve the root of the problem. Looks like you didn't install all needed development dependencies for Rails. Try to complete libraries within official instruction.
Also I see from you path you try it on Windows and probably you need to install dependencies this way, cause official documentation doesn't provide instructions for this OS:
gem install rails --include-dependencies

Related

ERROR: Could not find a valid gem 'rake' <=10.4.2.>

Tried to bundle install in my first ruby project, doing a tutorial so i'm pretty new to all of this coding stuff. I was following part of the tutorial and everything was going fine until I encountered this:
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read
server certificate B: certificate verify failed https://rubygems.org/gems/rake-10.4.2
An error occured while installing rake <10.4.2>, and Bundler cannot continue.
Make sure that 'gem install rake -v '10.4.2' succeeds before bundling.
Please explain in layman terms
Make sure that 'gem install rake -v '10.4.2' succeeds before bundling.
Type gem install rake -v '10.4.2 in to your command line and it'll install the rake gem.
Gems are simply other Ruby programs you can add to use within your program. See here: https://rubygems.org/ and here: https://en.wikipedia.org/wiki/RubyGems

Problems with rails on Windows

I have installed rails from railsinstaller.org and i tried to run a
Rails new myrubyblog
and after the gems were created it told me
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read sever certificate B: certificate Verify failed (https://rubygems.org/gems/i18n-0.7.0.gem)
An error occurred while installing i18n (0.7.0), and Bundler cannot continue. Make sure that 'gem install i18n -v '0.7.0''succeeds before bundling.
After that occured i then ran:
gem install i18n -v '0.7.0'
Then i ran
Rails new my
and the same thing occurred but instead it told me to run:
gem install json -v '1.8.3'
I don't know what else to do now could someone help me.

Creating a Rails app in Windows

I have been trying to install Rails on my Windows PC for the past days. I got the bundle from www.railsinstaller.org and it installed great. When creating a new application I can see that all the app files are created then I get the following error:
bundle install
DL is deprecated, please use Fiddle Fetching gem metadata from
https://rubygems.org/.......... Resolving dependencies...
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0
state=SSLv3 read server certificate B : certificate verify failed
(https://rubygems.org/gems/rake-10.4.2.gem) 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.
Hoping someone can help with resolving this.
This link could be helpful.
Creating a Ruby on Rails environment on Windows, in a VM Vagrant Box
Instead of install ROR directly onto Windows, you might want to use a Linux like OS. Not because Rails environment cannot be setup in Windows. But all the problems you will encounter, especially when most of tools are designed for that when you are not using a Linux like OS and try to mimic that.
But I highly recommend you skip doing all that if you are just trying to learn, and use Nitrous.io, which is an online IDE that gives you all the tool.
IMHO, dealing with Windows in this case is a waste of time.
First message:
DL is deprecated, please use Fiddle Fetching gem metadata ..
is a warning message. You read about it here.
The main error is encountered while installing rake.
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.
To solve this, you should first update Rubygems:
gem update --system
And then update Bundler:
gem install bundler
I simply run
gem update --system
and it fixed. More info please check bundle install fails with SSL certificate verification error

Following RailsBridge Installfest for Windows 8.1 - Failed Installing Ruby

I am new to this forum and web development :-) Career change.... I am having problems with the installation. I am following the instructions from Railsbridge Installfest for MS Windows.
I am now stuck at Create a Rails app, step rails new test_app. Everything else so far has installed without any issues. I get the following output and error:
run bundle install
DL is deprecated, please use Fiddle
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/gems/rake...
10.4.2.gem)
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.
I would appreciate help in what I need to do next. I am not very technical and would love some assistance! Thanks a lot.

Gem error on rails

Bundle install on rails does not complete due to the following error:
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.global.ssl.fastly.net/gems/jbuilder-2.2.5.gem)
An error occurred while installing jbuilder (2.2.5), and Bundler cannot
continue.
Make sure that gem install jbuilder -v '2.2.5' succeeds before bundling.
Each time I try to bundle install or bundle update, I get the same error.
How do I fix this problem?
Okay, so I got the solution to my problem. Looks like I was running an old version of bundler.
So I updated the version of bundler and then installed the required gem. Bundler version information and commands can be found on http://bundler.io/. It works perfectly fine now!

Resources