Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bundler::HTTPError Could not fetch specs from https://rubygems.org/

When I run

rails new project

to make new project in Ruby on rails on my PC.

It works fine. Then I run bundle install and it throws this error:

create  vendor/assets/stylesheets/.keep  
run  bundle install 

Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.

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/

When I try run my project it throws this error:

c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/resolver.rb:352:in `resolve': Could not find gem 'rails (= 4.1.1) x86-mingw32' in the gems available on this machine. (Bundler::GemNotFound)

Can somebody help me?

like image 879
user3841611 Avatar asked May 19 '26 20:05

user3841611


1 Answers

Are you using rails 4? check your Gemfile and replace

 source 'http://rubygems.org'

to

source 'https://rubygems.org'
like image 193
tokhi Avatar answered May 22 '26 10:05

tokhi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!