rubygems / bundler

Manage your Ruby application's gem dependencies
https://bundler.io
MIT License
4.89k stars 2k forks source link

NoMethodError: undefined method `to_specs' for nil:NilClass #5316

Closed PikachuEXE closed 7 years ago

PikachuEXE commented 7 years ago

Error details

NoMethodError: undefined method `to_specs' for nil:NilClass
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/gems/bundler-1.13.7/lib/bundler/resolver.rb:201:in `map'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/gems/bundler-1.13.7/lib/bundler/resolver.rb:201:in `start'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/gems/bundler-1.13.7/lib/bundler/resolver.rb:181:in `resolve'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/gems/bundler-1.13.7/lib/bundler/definition.rb:250:in `resolve'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/gems/bundler-1.13.7/lib/bundler/definition.rb:174:in `specs'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/gems/bundler-1.13.7/lib/bundler/definition.rb:162:in `resolve_remotely!'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/gems/bundler-1.13.7/lib/bundler/installer.rb:225:in `resolve_if_need'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/gems/bundler-1.13.7/lib/bundler/installer.rb:78:in `run'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/gems/bundler-1.13.7/lib/bundler/installer.rb:24:in `install'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/gems/bundler-1.13.7/lib/bundler/cli/install.rb:71:in `run'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/gems/bundler-1.13.7/lib/bundler/cli.rb:189:in `install'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/gems/bundler-1.13.7/lib/bundler/cli.rb:20:in `dispatch'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/gems/bundler-1.13.7/lib/bundler/cli.rb:11:in `start'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/gems/bundler-1.13.7/exe/bundle:34:in `block in <top (required)>'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/gems/bundler-1.13.7/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/gems/bundler-1.13.7/exe/bundle:26:in `<top (required)>'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/bin/bundle:22:in `load'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/bin/bundle:22:in `<main>'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in `eval'
  /users/pikachuexe/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in `<main>'

Environment

Bundler 1.13.7 Rubygems 2.6.8 Ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16] GEM_HOME /users/pikachuexe/.rvm/gems/ruby-2.3.3 GEM_PATH /users/pikachuexe/.rvm/gems/ruby-2.3.3:/users/pikachuexe/.rvm/gems/ruby-2.3.3@global RVM 1.28.0 (master) Git 2.11.0 rubygems-bundler (1.4.4)

Bundler settings

jobs Set for the current user (/users/pikachuexe/.bundle/config): "8" gem.test Set for the current user (/users/pikachuexe/.bundle/config): "rspec"

Gemfile

source 'https://rubygems.org'

### Ruby Version
ruby '2.3.3'

### Bundler Version
gem 'bundler'

### Core extension/replacements
# The default URI library is faulty
gem 'addressable', require: 'addressable/uri'
# Library for POST, PUT and other verbs
# Version constraint applied due to a security issue reported at
# https://github.com/brooklynDev/airborne/issues/41
gem 'rest-client', '>= 1.7.3'
# A library that supports keep-alive connection
## See
## https://speakerdeck.com/nahi/ruby-http-clients-comparison
## http://reevoo.github.io/blog/2014/09/12/http-shooting-party/
## http://bit.ly/RubyHTTPClients
gem 'httpclient'
# Powerpack offers some useful extensions to the standard Ruby classes
gem 'powerpack'
# Wrap some HTTP exceptions
gem 'http-exceptions'
# Naught is a toolkit for building Null Objects in Ruby
gem 'naught'
# Replacement of Object#try
gem 'try_to'
# Dependncy injection
gem 'deject'
# Retry with limit and handling
gem 'retriable'
# Access nested hash values
gem 'key_path'
# String encoding detection
gem 'rchardet'
# Opt-in type checking
gem 'contracts', '>= 0.12.0', require: false
# Abstract classes
gem 'abstract_class', require: false
# Create class with typecast attributes and default values
# `virtus` seems incompatible with active_model
gem 'active_attr', require: false
# Struct & OpenStruct like data structure
# but more strict and immutable
gem "values", require: false
# Native version of `String#blank?`
gem "fast_blank", require: false

### Rails
gem 'rails', '4.2.7.1'
# Some tweaks to ActionController
gem 'action_controller_tweaks'
# Some tweaks to ActiveRecord
gem 'active_record_tweaks', require: false
# AR Relation cache key (should be removed in rails 5.0)
gem 'activerecord-collection_cache_key', require: false
# Adding like feature to AR
gem 'activerecord-like'
# Counter cache that does NOT update the parent in one transaction
gem 'counter_culture'
# Backport of ActiveRecord 5 OR feature to 4.2.x
# It's required to load it in bundler for the hook for patching ActiveRecord
# It should be removed after upgrading to Rails 5
gem "where-or"

### ActiveRecord extensions
# Case insensitive `where` for ActiveRecord
gem 'where_lower'
# Find record with string ID (slug)
gem 'friendly_id'
# Enum like string, also support I18n
gem 'enumerize'
# Normalize value
gem 'normalizr'
# Random record
gem 'randumb'
# Group data by time/date/time period
gem 'groupdate'
# Linear Regression gem
gem 'linear-regression'

### Application Server
# This is the open source one
gem 'passenger',                    '5.0.30', require: false, group: [:development, :test]
# We can only use this for 2 "servers"
gem 'passenger-enterprise-server',  '5.0.30', require: false, group: [:staging, :production]
# Since it has dependency with bundled gems and has no integration with the app
# Please just use `gem install`
# @see https://github.com/ddollar/foreman/pull/486
# gem 'foreman'
# Mime Types
gem 'multi_mime'
# Forcing timeout
gem 'rack-timeout'
# Force SSL selectively
gem 'rack-ssl-enforcer'
# Fix `ArgumentError` when trying to decode URI with invalid encoding
# See
# - https://github.com/rack/rack/issues/337
# Since it requires
gem 'invalid_utf8_rejector', require: false

### Database
# PostgreSQL for sure
gem 'pg'
# Support for managing foreign key constraints
# The foreign key constraint is built-in since rails 4.2
# And having `foreigner` gem will cause error when running `rake db:migrate`
# gem 'foreigner'
# Find missing foreign keys constraints
gem 'immigrant', group: :development
# Database insights
gem 'pghero'
# MongoDB
gem 'mongoid'

### ENV
gem 'env_bang-rails'

### Seeding
# Manage seed data in different files
gem 'seedbank'
# Import data
gem 'active_importer'
# Sometimes we need to read file manually
gem 'roo'
## Extracted extension for XLS support since 2.x
gem 'roo-xls'

### Caching
# Sets the memcached environment variables
gem 'memcached_cloud'
# New cache store, default for Rails 4
gem 'dalli'
# Caching items in a collection
# Also works with `cache_digests`
gem 'multi_fetch_fragments'
# Memorize the returned value of methods
# Good for method with expensive calculation
gem 'memoist'

### App config
gem 'settingslogic'

### Logging
# Change log format
gem 'shog'
# Send Logging to Logentries
gem 'le'

### Interactor, use Service like pattern
### Used for extracting logic from (fat) controller
gem 'interactor-rails'

gem 'execute_with_rescue'
gem 'execute_with_rescue_with_airbrake'

### Security
# Compare strings without being vulnerable to timing attacks
gem 'securecompare'

### Background Processing
gem 'sidekiq'
# Hash with string keys converted into symbols
gem 'sidekiq-symbols'
# Unique Jobs
gem 'sidekiq-unique-jobs', '>= 4.0.0', require: false
# Monitoring Sidekiq
gem 'slim', '>= 1.1.0'
# if you require 'sinatra' you get the DSL extended to Object
gem 'sinatra', '>= 1.3.0', :require => nil
# Rspec integration
gem 'rspec-sidekiq', group: :test

### Scraping
gem 'mechanize'

### Cloud Storage
# This is required by gems
# - `carrierwave`
# - `asset_sync`
#
# DO NOT add gem `fog`, since it will pull all fog providers
# which includes many other gems
gem 'fog-aws', require: false

### Uploads
gem 'carrierwave'
gem 'carrierwave_backgrounder'
gem 'carrierwave-mimetype-fu'
gem 'carrierwave-bombshelter', require: false
gem 'net-ssh'
gem 'mini_magick'
# Image optimazation
gem 'piet'
gem 'piet-binary'

### Session Store
gem 'redis-rails'
gem 'redis-activesupport'
gem 'redis-namespace', '>= 1.1.0'
gem 'mock_redis', group: :test

### Mobile
# Detect mobile browser
gem 'mobile-fu'
## Push Notification
# FCM (Android)
gem 'fcm'
# APN (Apple)
gem 'houston'

### Desktop
# Detect browser type and version
gem 'browser'

### Template
gem 'haml', git: "https://github.com/haml/haml.git", ref: "7c7c169"
# Create links from text
gem 'rails_autolink'
# Better layout handling
gem 'nestive'

## Cells, Micro VC
gem 'cells'
# Only `0.0.5 works with released `haml`
# The unreleased `haml` 4.1 seems incompatible with `rails_admin`
gem "cells-haml"
# `cells-rails` is required for `cells` >= 4.1
# Setting `require` explicitly
# to avoid railties from malfunctioning
gem "cells-rails", require: "cells-rails"
# Required for using cells with routes in action mailer
gem 'actionmailer-with-request'

## Forms
gem 'simple_form'
# Locked at 0.1.2 to avoid load errors in later versions
# https://github.com/trailblazer/reform-rails/issues/9
gem 'reform-rails', "0.1.2", require: false
gem 'reform', require: false
# For validations of "forms"
gem "dry-struct", require: false
gem "dry-types", require: false
gem "dry-validation", require: false
## Pagination
gem 'kaminari'
gem 'kaminari-mongoid'

## Automatic text-> HTML formatting
# Require Github markup gem for text to html converters
gem 'github-markup', require: false
# Require the Markdown converter gem
# This gem is an optional dependency for using markdown syntax
gem 'redcarpet', require: false

### Translation (I18n)
# The core
gem 'i18n'
# Translate attribute
gem 'traco', '>= 2.0.0'
# A set of common locale data and translations
gem 'rails-i18n'
# Tasks to manage translations in ruby applications using I18n.
gem 'i18n-tasks', group: :development
# Export translations to JS
gem 'i18n-js', '>= 3.0.0.rc7'
# Export routes to JS
## Only 1.3.1+ has proper sprockets integration (for cache expiry)
gem "js-routes", ">= 1.3.1"
# Detect preferred language from HTTP header
gem 'http_accept_language'

### SEO
# Site Metadata
gem 'meta-tags', require: 'meta_tags'
# Sitemap
gem 'sitemap_generator'
# Robot.txt
gem 'human_power'

### JS & CSS
gem 'jquery-rails'
#jQuery-ui
gem 'jquery-ui-rails'

### Email
# Inject CSS into email template as inline CSS
gem 'roadie', '>= 3.1.0.rc1'
gem 'roadie-rails', '>= 1.1.0.rc2'
# Tracking on Mandrill
gem 'mandriller'
gem 'mandrill-rails'

### Authentication, Authorization, Roles, etc
gem 'devise'
# `1.14.0` creates too many SQL calls
gem 'cancancan', '~> 1.13.1'
# Roles
gem 'easy_roles'
# OmniAuth
gem 'omniauth-facebook'
# Easier access to Facebook
gem 'koala'

### Exceptions and Performance Report
gem 'airbrake', '~> 4.3'
gem "sentry-raven"

### Administration
# Version locked for https://github.com/sferik/rails_admin/issues/2218
gem 'rails_admin'

### JS plugins as gems
# Modernizr
gem 'modernizr-rails'
# Show time in JS
gem 'rails-timeago'
# RubyJS
gem 'rubyjs-rails'
# Select2, best with remote data set

# Faster than Select2 with large local data set
gem 'chosen-rails'
# Makes sprite generation faster
gem 'oily_png'

# Integration with handlebar templates
gem 'handlebars_assets'

### Map related
gem 'geocoder'
# Calculation
gem 'ruby-geometry', require: 'geometry'

### Data processing
gem 'nokogiri'
gem 'phony'
gem 'daru', require: false

### Mobile SMS
gem 'twilio-ruby', require: false

### Math
gem 'descriptive_statistics', require: 'descriptive_statistics/safe'

### Analytics
## Enable Google analytics without custom JS
gem 'rack-google-analytics'
## Server Side Analytics
gem 'mixpanel-ruby'

### Bot traffic detection service
gem 'ss2', :git => 'https://bitbucket.org/ss2ast/ror_v2.0'

### JSON builder
gem 'rabl', '>= 0.9.4.pre1'
# fastest JSON parser
gem 'oj'
gem 'json', require: 'json/ext'

### API
gem 'versionist'

### Profiling
gem 'rack-mini-profiler', '>= 0.9.0.pre', require: false
# Tool for finding code invalidates Ruby's internal cache
gem 'busted', require: false

### Health Check
gem 'okcomputer'

### Assets
gem 'sprockets-rails', require: 'sprockets/railtie'
# Limit the version to be 3.x until we are able to upgrade to 4.x
gem 'sprockets', '~> 3.0'
gem 'sass-rails'
gem 'coffee-rails'
gem "browserify-rails"

# Generates sprites and so so so much more that we have no idea about
gem 'compass-rails'
gem 'compass', '>= 0.12.7'
# Try to speed up SASS
# `1.0.5` is buggy, although it's required by the gem `compass`, we do not activate it
# gem 'compass-import-once', require: "compass/import-once/activate"

# Bootstrap SASS version
gem 'bootstrap-sass', '~> 2.3'
# Better Bootstrap Modal
gem 'bootstrap-modal-rails'
# Make select look like button
gem 'bootstrap-select-rails'
# Font Awesome, display icon with ease
gem 'font-awesome-rails'

# Cross-browser style property mixin
gem 'bourbon'
# More related functions and mixins
gem 'neat'

# Some media query SASS mixins
gem 'sass-mediaqueries-rails'

# Upload generated assets to S3
gem 'asset_sync'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'libv8'
gem 'therubyracer', require: 'v8'

gem 'uglifier', '>= 1.3.0'
# New Relic
## Code for tracing specific stuff need to be
gem "newrelic_rpm"

## QR Code Generator
gem "rqrcode", require: false

## Active Merchant Payment System
gem "braintree", "~> 2.69.1"

# Staging, Production only
group :staging, :production do
  # Show app name and env on console
  gem 'marco-polo'
end

### Custom JS files
# Non bower registered assets (which can't be get through `rails-assets.org`)
# has to be managed by bower
gem 'bower-rails'

group :development, :test do
  ### Testing
  gem 'minitest'
  gem 'rspec-rails'
  # `rspec-cells` MUST be required after rspec-rails for current version
  # to avoid incorrect `require` on `rspec-rails` from it
  # See https://github.com/apotonick/rspec-cells/issues/71
  # The issue seems to be fixed in `0.3.3`, but requires upgrade of `cells`
  gem 'rspec-cells', require: false
  gem 'rspec-mocks'
  gem 'rspec-its'
  gem 'rspec-collection_matchers'
  # Progress bar format
  gem 'fuubar', group: :test
  # Simulate Web Interaction
  gem 'capybara', group: :test
  # JS engine for capybara
  gem 'poltergeist', group: :test
  # Freeze the time for some tests
  gem 'timecop', group: :test
  # For handling JSON in spec
  gem 'json_spec', group: :test
  # More Rails matchers
  gem 'shoulda-matchers', group: :test
  # RSpec driven API testing framework inspired by frisby.js
  gem 'airborne', group: :test
  # Matchers for JSON data
  gem 'rspec-json_matchers', '>= 0.1.0.alpha.1', group: :test, require: false

  # Web request stubbing
  # Deprecated since not actively maintained
  gem 'fakeweb'
  # A more actively maintained one
  gem 'webmock', require: false

  ## Generate fake data
  gem 'ffaker'
  gem 'useragents'
  gem 'factory_girl_rails'
  gem 'factory_girl-seeds'

  # Preload the application for testing
  gem 'spork', '>= 1.0rc'

  # Clean database in testing
  gem 'database_cleaner'

  # Generate XML format report for CI system
  gem 'ci_reporter'

  # Color
  # gems from `jazz_hands`
  gem 'awesome_print'
  gem 'coolline'
  # This gem is not usable - tested on 2016-04-22
  # gem 'hirb'
  gem 'pry'
  gem 'pry-byebug'
  gem 'pry-doc'
  gem 'pry-rails'
  gem 'pry-remote'
  gem 'pry-stack_explorer'

  # Preloader
  gem 'spring'

  # Hints for Developer
  ## Since we are using Ruby 2.3, at least `1.x` is required
  ## `1.1.0` requires Ruby 2.4
  gem 'did_you_mean', ">= 1.0.0", "< 1.1.0"

  # Find slow loading dependencies
  gem 'bumbler', require: false
end

### Tools
group :development do
  ## Find missing indexes
  gem 'lol_dba'

  ### Debugging
  # Detect N+1 queries and unused eager loading
  gem 'bullet'
  # Gives you some footnotes for params, sessions, routes, stuff
  gem 'rails-footnotes'
  # Much better error page
  gem 'better_errors'
  gem 'binding_of_caller'
  # Show database info in your Rails app by visiting http://localhost:3000/rails/info/db
  gem 'rails_db_info'
  # Add comment about record attributes (without visiting any url)
  ## Locked at 2.6.x to avoid a bug in 2.7.0
  gem 'annotate', '~> 2.6.10'
  gem 'kramdown', :require => false
  # For Rails Panel
  # https://github.com/dejan/rails_panel
  gem 'meta_request'

  # Disable annoying asset served messages
  gem 'quiet_assets'

  # Command-line utility that suggests places in your codebase where documentation can be improved
  gem 'inch'

  # Looks for common places that can easily accept frozen string literals
  gem 'let_it_go', require: false

  # /rails/info/routes alternative
  gem 'passages'

  ### Catch emails
  # Since it has dependency with bundled gems and has no integration with the app
  # Please just use `gem install`
  # gem "mailcatcher"

  # Console on web, for debugging purpose
  gem 'web-console'

  # RuboCop is a Ruby static code analyzer
  gem 'rubocop', require: false
  # Code smell detector for Ruby
  gem 'reek', require: false
end

# Library for easier console input and output
# Like deploy script
gem 'highline'

# Since this is also loaded on production, cannot put it inside dev and test group
# Render emails like a webpage
gem "mail_view"

# Load .env and .env.#{Rails.env} files for environment variables
gem 'dotenv-rails'
segiddins commented 7 years ago

I'm unable to reproduce this as passenger-enterprise-server is not a gem on rubygems.org

segiddins commented 7 years ago

Nevermind, commenting out that gem reproduced something similar, and I believe this will be fixed by https://github.com/bundler/bundler/pull/5307 which will be released in 1.14.0.pre.2 shortly

segiddins commented 7 years ago

This should be fixed in 1.14.0.pre.2 now

PikachuEXE commented 7 years ago

So I wait for 1.13.x or 1.14.0 release?

nathanvda commented 7 years ago

I have the same error, using the following environment:

  Bundler   1.12.5
  Rubygems  2.4.3
  Ruby      2.1.5p273 (2014-11-13 revision 48405) [x86_64-darwin14.0]
  GEM_HOME  /Users/nathan/.rvm/gems/ruby-2.1.5@sabic
  GEM_PATH  /Users/nathan/.rvm/gems/ruby-2.1.5@sabic:/Users/nathan/.rvm/gems/ruby-2.1.5@global
  RVM       1.27.0 (latest)
  Git       2.10.1 (Apple Git-78)
  rubygems-bundler (1.4.4)

In my development I switch between my local gem (using path, for easier testing) and my gem on github (for distribution). Doing bundle update my-gem-name failed, just doing bundle succeeded (weird?).

Can I see which gem is causing the error?

I do not understand how the update should fix this, as this does not seem related to the bundler version. Something changed, but I have been using the same versions for a while (obviously --ooooops).

olleolleolle commented 7 years ago

@nathanvda Update to a newer rubygems, and a newer Bundler. gem update --system and gem install bundler.

nathanvda commented 7 years ago

Thanks :+1: