Was trying to bundle install this morning and got this error
bundle install
Fetching source index from https://rubygems.org/
Retrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/ due to underlying error <timed out (https://rubygems.org/specs.4.8.gz)>
Here is my environment
Versions
bundle -v
# Bundler version 2.2.7
asdf current
# nodejs 14.7.0
# ruby 2.7.1
source 'https://rubygems.org'
gemspec
group :development, :test do
gem 'dry-struct', '~> 1'
gem 'guard-bundler'
gem 'guard-rspec'
gem 'guard-rubocop'
gem 'rake', '~> 12.0'
gem 'rake-compiler', require: false
gem 'rspec', '~> 3.0'
gem 'rspec-collection_matchers'
gem 'rubocop'
gem 'rubocop-rake', require: false
gem 'rubocop-rspec', require: false
end
RubyGems Status looks good
I had to disable IP6 on my WiFi adapter
Find the name of my adapter
sudo networksetup -listallnetworkservices
# An asterisk (*) denotes that a network service is disabled.
# Wi-Fi
# Bluetooth PAN
# Thunderbolt Bridge
Turn it off
sudo networksetup -setv6off 'Wi-Fi'
Run Bundle
bundle install
Turn it back on
sudo networksetup -setv6automatic 'Wi-Fi'
Related
When trying to run bundle install on i receive the following exception:
$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..
Could not find gem 'minitest/autorun x64-mingw32' in any of the gem sources
listed in your Gemfile.
I was originally trying to run bundle exec rake, which suggests the same issue with gem 'minitest/autorun x64-mingw32'. Running them with rake test works fine; hence, I think I've done something wrong with bundler related to my OS (windows 7 x64). The install works properly without this package. I also tried using unit/test with the same result.
Ruby version is 2.4.4.
Gemfile:
source "https://rubygems.org"
gemspec
gem 'json', '~> 2.1.0', '>= 2.0.4'
gem 'addressable', '~> 2.5.2', '>= 2.5.2'
gem 'mongo', '~> 2.5.1', '>= 2.5.1'
group :test do
gem 'rake'
gem 'minitest/autorun'
end
Do I need to specify the platform or some other variable so that bundle looks for the right version of the gem on rubygems?
Any help would be much appreciated.
I typed rails s to run my server then I got this:
Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring.
Could not find gem 'pg' in any of the gem sources listed in your Gemfile or available on this machine.
Run `bundle install` to install missing gems.
So I did bundle install then I got this:
An error occurred while installing pg (0.18.4), and Bundler cannot continue.
Make sure that `gem install pg -v '0.18.4'` succeeds before bundling.
I did brew install postgres to solve this but it still didn't work. Also I put 'gem pg '0.18.4' on Gemfile then did bundle install but still didn't work.
I need your help!
below is my Gemfile
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', group: [:development, :test]
gem 'pg', group: :production
#gem 'pg', '0.18.4'
gem 'rails_12factor', group: :production
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
Have you tried to clean and rebuild you gem bundle? You can do it with command bundle clean --force and then bundle install again.
Please be advised: the clean command will remove all your gems.
Post back the result of such commands if you decide to run them.
On OS X 10.9.5...
Gemfile
source 'https://rubygems.org'
gem 'rails', '4.2.0'
gem 'sass-rails', '5.0.4'
gem 'uglifier', '2.7.2'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.0.5'
gem 'turbolinks', '2.5.3'
gem 'jbuilder', '2.3.1'
gem 'sdoc', '0.4.1', group: :doc
gem 'mongoid', '4.0.2'
gem 'mongoid-grid_fs', '2.1.0'
gem 'watir-rails', '1.1.0'
group :development, :test do
gem 'byebug', '6.0.2'
gem 'web-console', '2.2.1'
gem 'spring', '1.3.6'
end
Terminal
$ bundle install
...
Installing ffi 1.9.10 with native extensions
...
Bundle complete! 14 Gemfile dependencies, 68 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
$ bundle show ffi
/Users/me/.rvm/gems/ruby-2.2.2/gems/ffi-1.9.10
$ rails c
Could not find ffi-1.9.10 in any of the sources
Run `bundle install` to install missing gems
I tried placing "gem 'ffi', '1.9.10'" in my Gemfile.
I tried removing my Gemfile.lock and repeating this process.
I tried bundle exec rails c.
I tried gem install ffi --version 1.0.11, which seems to be the dependency for childprocess-0.5.6.
None of these attempts make any difference. Any ideas?
I ran into this same error just now, solved with gem pristine --all
Ran into the same issue with
An error occurred while installing ffi (1.10.0), and Bundler cannot
continue.
Make sure that `gem install ffi -v '1.10.0' --source 'https://rubygems.org/'`
succeeds before bundling.
A bundle update followed by a bundle install solved it for me
When you install Octopress many use rvm to switch between Ruby versions.
However, rvm does not work for Window users so Scott Muc created Yari
After following this and that, I finally overcame the yari not found issue
by simply restarting the Windows Power shell and making sure that my path was
pointing to the correct ruby installation under the Yari folder. The following commands ran fine:
git clone git://github.com/imathis/octopress.git octopress
cd octopress
ruby --version # reports Ruby 1.9.3 thanks to yari
gem install bundler
The bundle install command however starts complaining that it can't find gems to install. After some detective work, I can see that the Gemfile under Octopress is adding gems as i install them manually one by one (ugh). The list seems long. I hope a ruby or Octopress expert can become my hero today :-( so I can share my knowledge and start blogging.
I just took a shot of the bottom part of the console. I have added each gem one by one.Thanks for Yari and for taking a look.
and on and on till finally...
Not sure if this is yari related but i also modified line 205 of httpresponse.rb file to: if chunked? || #header['content-length'] || #status == 304 || #status == 204. This turns off a bunch of annoying warnings that really slow down the rake preview command and causes the need for endless refresh. Especially sensitive in chrome as FF had a better response time---
I have the same problem here, but the problem is the certificate (yari problem?):
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read
server certificate B: certificate verify failed (https://rubygems.org/gems/compa
ss-0.12.2.gem)
You can change the file GemFile of octopress without https and it works
source "http://rubygems.org"
group :development do
gem 'rake', '~> 0.9'
gem 'jekyll', '~> 0.12'
gem 'rdiscount', '~> 2.0.7'
gem 'pygments.rb', '~> 0.3.4'
gem 'RedCloth', '~> 4.2.9'
gem 'haml', '~> 3.1.7'
gem 'compass', '~> 0.12.2'
gem 'sass', '~> 3.2'
gem 'sass-globbing', '~> 1.0.0'
gem 'rubypants', '~> 0.2.0'
gem 'rb-fsevent', '~> 0.9'
gem 'stringex', '~> 1.4.0'
gem 'liquid', '~> 2.3.0'
gem 'directory_watcher', '1.4.1'
end
gem 'sinatra', '~> 1.4.2'
more info:
http://railsapps.github.io/openssl-certificate-verify-failed.html
I am following along the Ruby on Rails Tutorial and have gotten somewhat confused in the testing section, in particular - 3.6.2 - Automated tests with Guard
As per the tutorial's instructions for deployment to Heroku, I've switched over to Postgresql and removed sqlite3 from my gemfile and did a bundle install to update.
However, once I run
bundle exec guard
I receive the message:
/Users/username/.rvm/gems/ruby-1.9.3-p125#global/gems/bundler-1.1.3/lib/bundler/rubygems_integration.rb:147:in block in replace_gem': Please install the sqlite3 adapter:gem install activerecord-sqlite3-adapter` (sqlite3 is not part of the bundle. Add it to Gemfile.) (LoadError)
I'm confused why I need this as sqlite3 has been removed from my environment?
My Gemfile is as follows:
source 'https://rubygems.org'
gem 'rails', '3.2.3'
gem 'pg', '0.12.2'
group :development, :test do
gem 'rspec-rails', '2.9.0'
gem 'guard-rspec', '0.5.5'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '3.2.4'
gem 'coffee-rails', '3.2.2'
gem 'uglifier', '1.2.3'
end
gem 'jquery-rails', '2.0.0'
group :test do
gem 'rspec-rails', '2.9.0'
gem 'capybara', '1.1.2'
gem 'rb-fsevent', :require => false
gem 'growl', '1.0.3'
gem 'spork', '0.9.0'
end
I'm a bit confused because the Gemfile in the tutorial shows sqlite3 again even though it was removed in the previous section of the tutorial.
Update your database config file to use postgresql adapter:
adapter: postgresql
encoding: unicode
database:
username:
password: