NameError: uninitialized constant CarrierWave::Storage::Fog, heroku - ruby-on-rails

I am trying to use carrierwave, fog and AWS for my image uploading on Heroku. Pretty common...I even have it set up successfully for another app. However when I delpoy to heroku I'm getting this error:
Running: rake assets:precompile
rake aborted!
NameError: uninitialized constant CarrierWave::Storage::Fog
Gemfile
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.3.7'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.1'
# Use postgresql as the database for Active Record
gem 'pg', '>= 0.18', '< 2.0'
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'mini_racer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
gem 'devise'
gem 'tinymce-rails-imageupload', github: 'PerfectlyNormal/tinymce-rails-imageupload'
# Use ActiveStorage variant
gem 'mini_magick'
gem 'carrierwave'
gem 'fog'
gem 'figaro'
gem 'will_paginate', '~> 3.1.0'
gem 'bootstrap'
gem 'jquery-rails'
gem 'mini_racer'
gem 'stripe'
gem 'aws-sdk-s3', require: false
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
# Easy installation and use of chromedriver to run system tests with Chrome
gem 'chromedriver-helper'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
application.yml
amazon:
service: S3
aws_access_key_id: "key"
aws_secret_access_key: "key"
region: "us-east-2"
AWS_BUCKET: "bucket"
in the config initializers...
fog.rb
CarrierWave.configure do |config|
config.fog_credentials = {
provider: 'AWS',
aws_access_key_id: 'aws_access_key_id',
aws_secret_access_key: 'aws_secret_access_key',
region: 'us-east-2'
}
config.fog_directory = 'books4reviews'
if Rails.env.development? || Rails.env.test?
CarrierWave.configure do |config|
config.storage = :file
end
end
# Use AWS storage if in production
if Rails.env.production?
CarrierWave.configure do |config|
config.storage = :fog
end
end
end
Here's the build log:
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
NameError: uninitialized constant CarrierWave::Storage::Fog
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/carrierwave-1.2.3/lib/carrierwave/uploader/configuration.rb:78:in `eval'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:16:in `allow_bootsnap_retry'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:57:in `load_missing_constant'
(eval):1:in `storage'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/carrierwave-1.2.3/lib/carrierwave/uploader/configuration.rb:78:in `eval'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/carrierwave-1.2.3/lib/carrierwave/uploader/configuration.rb:78:in `storage'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/app/uploaders/avatar_uploader.rb:7:in `<class:AvatarUploader>'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/app/uploaders/avatar_uploader.rb:1:in `<main>'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/activesupport-5.2.1/lib/active_support/dependencies/interlock.rb:14:in `block in loading'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/activesupport-5.2.1/lib/active_support/concurrency/share_lock.rb:151:in `exclusive'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/activesupport-5.2.1/lib/active_support/dependencies/interlock.rb:13:in `loading'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:46:in `block in require_or_load'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:16:in `allow_bootsnap_retry'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:45:in `require_or_load'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:58:in `block in load_missing_constant'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:16:in `allow_bootsnap_retry'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:57:in `load_missing_constant'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:58:in `block in load_missing_constant'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:16:in `allow_bootsnap_retry'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:57:in `load_missing_constant'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/app/models/user.rb:2:in `<class:User>'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/app/models/user.rb:1:in `<main>'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/activesupport-5.2.1/lib/active_support/dependencies/interlock.rb:14:in `block in loading'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/activesupport-5.2.1/lib/active_support/concurrency/share_lock.rb:151:in `exclusive'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/activesupport-5.2.1/lib/active_support/dependencies/interlock.rb:13:in `loading'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:46:in `block in require_or_load'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:16:in `allow_bootsnap_retry'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:45:in `require_or_load'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:58:in `block in load_missing_constant'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:16:in `allow_bootsnap_retry'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:57:in `load_missing_constant'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/activesupport-5.2.1/lib/active_support/inflector/methods.rb:283:in `const_get'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/activesupport-5.2.1/lib/active_support/inflector/methods.rb:283:in `block in constantize'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/activesupport-5.2.1/lib/active_support/inflector/methods.rb:281:in `each'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/activesupport-5.2.1/lib/active_support/inflector/methods.rb:281:in `inject'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/activesupport-5.2.1/lib/active_support/inflector/methods.rb:281:in `constantize'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/devise-4.5.0/lib/devise.rb:316:in `get'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/devise-4.5.0/lib/devise/mapping.rb:83:in `to'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/devise-4.5.0/lib/devise/mapping.rb:78:in `modules'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/devise-4.5.0/lib/devise/mapping.rb:95:in `routes'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/devise-4.5.0/lib/devise/mapping.rb:162:in `default_used_route'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/devise-4.5.0/lib/devise/mapping.rb:72:in `initialize'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/devise-4.5.0/lib/devise.rb:346:in `new'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/devise-4.5.0/lib/devise.rb:346:in `add_mapping'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/devise-4.5.0/lib/devise/rails/routes.rb:243:in `block in devise_for'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/devise-4.5.0/lib/devise/rails/routes.rb:242:in `each'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/devise-4.5.0/lib/devise/rails/routes.rb:242:in `devise_for'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/config/routes.rb:33:in `block in <main>'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:432:in `instance_exec'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:432:in `eval_block'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:414:in `draw'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/config/routes.rb:1:in `<main>'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/railties-5.2.1/lib/rails/application/routes_reloader.rb:41:in `block in load_paths'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/railties-5.2.1/lib/rails/application/routes_reloader.rb:41:in `each'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/railties-5.2.1/lib/rails/application/routes_reloader.rb:41:in `load_paths'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/railties-5.2.1/lib/rails/application/routes_reloader.rb:20:in `reload!'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/railties-5.2.1/lib/rails/application/routes_reloader.rb:30:in `block in updater'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/activesupport-5.2.1/lib/active_support/file_update_checker.rb:83:in `execute'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/railties-5.2.1/lib/rails/application/routes_reloader.rb:10:in `execute'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/railties-5.2.1/lib/rails/application/finisher.rb:130:in `block in <module:Finisher>'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/railties-5.2.1/lib/rails/initializable.rb:32:in `instance_exec'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/railties-5.2.1/lib/rails/initializable.rb:32:in `run'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/railties-5.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/railties-5.2.1/lib/rails/initializable.rb:60:in `run_initializers'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/railties-5.2.1/lib/rails/application.rb:361:in `initialize!'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/config/environment.rb:5:in `<main>'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/railties-5.2.1/lib/rails/application.rb:337:in `require_environment!'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/railties-5.2.1/lib/rails/application.rb:520:in `block in run_tasks_blocks'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
/tmp/build_cc315cc16be89c43f2c799ba61fa4e8e/vendor/bundle/ruby/2.3.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => environment
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app.
! Push failed
I've been googling this and looking at similar questions on stackoverflow and can't figure it out. I'm sure it's something simple.

I've encountered this problem repeatedly across various projects, and I typically fix it by defining the CarrierWave::Storage::Fog class myself, as an empty class, in an initializer.
Amazingly this seems to work, and it doesn't seem to interfere with Rails' ability to load the real class:
# config/initializers/fix_fog.rb
module CarrierWave; module Storage; class Fog; end; end; end
I've deployed this several times, since at least February 2016. It doesn't seem like a great solution, and I'd be interested in alternatives.

Another solution:
Add require 'carrierwave/storage/fog' at the top of your config/initializers/fog.rb file.

Related

App doesnt run rake commands when deployed to heroku

in my development are the app works fine but when i deploy to heroku and try to run rake db:migrate to build the database, it aborts and says wrong number of arguments. i have searched all over the web but could not fix it.
here is the error
$ heroku run rake db:migrate
Running rake db:migrate on ⬢ blooming-dusk-86753... up, run.9621 (Free)
rake aborted!
ArgumentError: wrong number of arguments (given 3, expected 2)
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/type/adapter_specific_registry.rb:7:in `add_modifier'
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/type.rb:22:in `add_modifier'
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/postgresql_adapter.rb:827:in `<class:PostgreSQLAdapter>'
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/postgresql_adapter.rb:69:in `<module:ConnectionAdapters>'
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `<module:ActiveRecord>'
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/postgresql_adapter.rb:19:in `<top (required)>'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `require'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `block in require'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:259:in `load_dependency'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `require'
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/connection_specification.rb:174:in `spec'
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/connection_handling.rb:53:in `establish_connection'
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/railtie.rb:125:in `block (2 levels) in <class:Railtie>'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/lazy_load_hooks.rb:69:in `instance_eval'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/lazy_load_hooks.rb:69:in `block in execute_hook'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/lazy_load_hooks.rb:60:in `with_execution_control'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/lazy_load_hooks.rb:65:in `execute_hook'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/lazy_load_hooks.rb:50:in `block in run_load_hooks'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/lazy_load_hooks.rb:49:in `each'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/lazy_load_hooks.rb:49:in `run_load_hooks'
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/base.rb:324:in `<module:ActiveRecord>'
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/base.rb:24:in `<top (required)>'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `require'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `block in require'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:259:in `load_dependency'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `require'
/app/app/models/user.rb:1:in `<top (required)>'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `require'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `block in require'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:259:in `load_dependency'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `require'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:380:in `block in require_or_load'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:37:in `block in load_interlock'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies/interlock.rb:12:in `block in loading'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/concurrency/share_lock.rb:150:in `exclusive'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies/interlock.rb:11:in `loading'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:37:in `load_interlock'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:358:in `require_or_load'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:512:in `load_missing_constant'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:203:in `const_missing'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/inflector/methods.rb:268:in `const_get'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/inflector/methods.rb:268:in `block in constantize'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/inflector/methods.rb:266:in `each'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/inflector/methods.rb:266:in `inject'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/inflector/methods.rb:266:in `constantize'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:584:in `get'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:615:in `constantize'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise.rb:318:in `get'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise/mapping.rb:83:in `to'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise/mapping.rb:78:in `modules'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise/mapping.rb:95:in `routes'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise/mapping.rb:162:in `default_used_route'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise/mapping.rb:72:in `initialize'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise.rb:354:in `new'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise.rb:354:in `add_mapping'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise/rails/routes.rb:243:in `block in devise_for'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise/rails/routes.rb:242:in `each'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise/rails/routes.rb:242:in `devise_for'
/app/config/routes.rb:2:in `block in <top (required)>'
/app/vendor/bundle/ruby/3.0.0/gems/actionpack-5.0.7.2/lib/action_dispatch/routing/route_set.rb:391:in `instance_exec'
/app/vendor/bundle/ruby/3.0.0/gems/actionpack-5.0.7.2/lib/action_dispatch/routing/route_set.rb:391:in `eval_block'
/app/vendor/bundle/ruby/3.0.0/gems/actionpack-5.0.7.2/lib/action_dispatch/routing/route_set.rb:373:in `draw'
/app/config/routes.rb:1:in `<top (required)>'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:in `load'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:in `block in load'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:259:in `load_dependency'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:in `load'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application/routes_reloader.rb:40:in `each'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application/routes_reloader.rb:40:in `load_paths'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application/routes_reloader.rb:16:in `reload!'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application/routes_reloader.rb:26:in `block in updater'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/file_update_checker.rb:77:in `execute'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application/routes_reloader.rb:27:in `updater'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application/finisher.rb:119:in `block in <module:Finisher>'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:30:in `instance_exec'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:30:in `run'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:55:in `block in run_initializers'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:54:in `run_initializers'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application.rb:352:in `initialize!'
/app/config/environment.rb:5:in `<top (required)>'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `require'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `block in require'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:259:in `load_dependency'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `require'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application.rb:328:in `require_environment!'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application.rb:448:in `block in run_tasks_blocks'
/app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/app/bin/bundle:3:in `load'
/app/bin/bundle:3:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
here is my gem file:
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.7', '>= 5.0.7.2'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.3.13', group: [:development, :test]
# Use postgresql as the database for production
group :production do
gem 'pg', '~> 0.20'
gem 'rails_12factor'
end
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
#use bootsrtap for styles
gem 'bootstrap-sass', '~> 3.4.1'
#use font awesom for icons
gem 'font-awesome-sass', '~> 5.15.1'
#use devise for user logins
gem 'devise'
#use paperclip for images upload
gem 'paperclip'
gem 'jquery-rails'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# 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 navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# 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', platform: :mri
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '~> 3.0.5'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
i think the problem is related to sqlite3 vs postgresql(heroku) but i cant seem to fix it.
here is the github link:
https://github.com/fawzi-saab/S-Portfolio
if you are especially creating apps to deploy heroku its better to use postgresql in both development and production. I look into your repo and i think your config/database.yml file needs to be revised in order to connect to postgresql database. You can also check a documentation to deploy an app to heroku here

block in partition_matching_region': undefined method `match' for nil:NilClass (NoMethodError)

I have cloned a repository
After cloning it.
I navigate to the folder and run the command "bundle install"
next to that i run the command "rails server" and its give me this error.
I also read some references :
NoMethodError: undefined method `match' for nil:NilClass, https://github.com/aws/aws-sdk-ruby/issues/1240
Thank you for any help ..
=> Booting Puma
=> Rails 5.2.3 application starting in development
=> Run `rails server -h` for more startup options
Exiting
/home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-partitions-1.193.0/lib/aws-partitions/endpoint_provider.rb:82:in `block in partition_matching_region': undefined method `match' for nil:NilClass (NoMethodError)
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-partitions-1.193.0/lib/aws-partitions/endpoint_provider.rb:81:in `each'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-partitions-1.193.0/lib/aws-partitions/endpoint_provider.rb:81:in `find'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-partitions-1.193.0/lib/aws-partitions/endpoint_provider.rb:81:in `partition_matching_region'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-partitions-1.193.0/lib/aws-partitions/endpoint_provider.rb:70:in `get_partition'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-partitions-1.193.0/lib/aws-partitions/endpoint_provider.rb:23:in `signing_region'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-partitions-1.193.0/lib/aws-partitions/endpoint_provider.rb:99:in `signing_region'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-s3-1.46.0/lib/aws-sdk-s3/plugins/s3_signer.rb:20:in `block in <class:S3Signer>'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/configuration.rb:70:in `call'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/configuration.rb:213:in `block in resolve_defaults'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/configuration.rb:57:in `each'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/configuration.rb:57:in `each'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/configuration.rb:212:in `resolve_defaults'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/configuration.rb:205:in `value_at'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/configuration.rb:189:in `block in resolve'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/set.rb:324:in `each_key'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/set.rb:324:in `each'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/configuration.rb:189:in `resolve'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/configuration.rb:177:in `apply_defaults'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/configuration.rb:150:in `build!'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/base.rb:62:in `build_config'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/base.rb:19:in `initialize'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-s3-1.46.0/lib/aws-sdk-s3/client.rb:317:in `initialize'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/base.rb:99:in `new'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-s3-1.46.0/lib/aws-sdk-s3/resource.rb:14:in `initialize'
from /home/mike/agingcommunity/config/initializers/aws.rb:4:in `new'
from /home/mike/agingcommunity/config/initializers/aws.rb:4:in `<main>'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `load'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `load'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `block in load'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `load'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/engine.rb:657:in `block in load_config_initializer'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/notifications.rb:170:in `instrument'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/engine.rb:656:in `load_config_initializer'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/engine.rb:614:in `block (2 levels) in <class:Engine>'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/engine.rb:613:in `each'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/engine.rb:613:in `block in <class:Engine>'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `instance_exec'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `run'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/initializable.rb:61:in `block in run_initializers'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:228:in `block in tsort_each'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/initializable.rb:50:in `each'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/initializable.rb:50:in `tsort_each_child'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:415:in `call'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:415:in `each_strongly_connected_component_from'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:347:in `each'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:347:in `call'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:347:in `each_strongly_connected_component'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:226:in `tsort_each'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:205:in `tsort_each'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/initializable.rb:60:in `run_initializers'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/application.rb:361:in `initialize!'
from /home/mike/agingcommunity/config/environment.rb:5:in `<main>'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `require_relative'
from config.ru:3:in `block in <main>'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in `instance_eval'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in `initialize'
from config.ru:in `new'
from config.ru:in `<main>'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/builder.rb:49:in `eval'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/builder.rb:49:in `new_from_string'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/builder.rb:40:in `parse_file'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/server.rb:319:in `build_app_and_options_from_config'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/server.rb:219:in `app'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:27:in `app'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/server.rb:354:in `wrapped_app'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:89:in `log_to_stdout'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:51:in `start'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:147:in `block in perform'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `tap'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `perform'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/command/base.rb:65:in `perform'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/command.rb:46:in `invoke'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands.rb:18:in `<main>'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
from bin/rails:4:in `<main>'
Any help please.. Thank you
code in my GemFile
# Specify ruby version
ruby '2.4.6'
source 'https://rubygems.org'
#gem 'activemodel-serializers-xml'
gem "aasm"
gem 'activerecord-import', '~> 0.17.0' # Use activerecord-import to speed up bulk importation of facility records.
gem 'audited', '~> 4.5' # Log all changes to your models
gem 'aws-sdk', '~> 3.0', '>= 3.0.1'
gem "aws-sdk-s3", require: false
gem 'bootsnap', require: false
gem 'bootstrap-sass', '~> 3.3', '>= 3.3.6'
gem 'breadcrumbs_on_rails' # Rails 5 compatible breadcrumb gem that is popular.
gem 'cancancan' # Use cancancan for authorization.
gem 'coffee-rails', '~> 4.2' # Use CoffeeScript for .coffee assets and views
# useful information about every country packaged as country objects. It includes data from ISO 3166.
gem 'countries', '~> 1.2', '>= 1.2.5'
gem 'devise', '~> 4.2' # Use devise for authentication.
gem 'devise_invitable', '~> 1.7', '>= 1.7.2' # It adds support for send invitations by email
gem 'geocoder' # Provides object geocoding (by street or IP address)
# TODO: Once full support for Rails 5 is available, switch to the standard Gemfile syntax from rubygems.org.
gem 'globalize', git: 'https://github.com/globalize/globalize' # Use globalize for i18n of ActiveRecord models.
#gem 'globalize', '~> 5.1.0'
gem 'going_postal', '~> 0.1.6' # Postal code validation
gem 'haml'
gem 'jbuilder', '~> 2.7.0' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jquery-fileupload-rails', '~> 0.4.7' # Direct upload to S3 requires blueimp's fileupload jquery plugin.
gem 'jquery-rails' # Use jquery as the JavaScript library
gem 'mini_magick'
gem 'pg', '~> 0.18.4' # Database gem for Active Record
gem 'phony', '~> 2.15', '>= 2.15.44'
gem 'puma', '~> 3.0' # Use Puma as the app server
gem 'rails', '~> 5.2' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'resque', '~> 1.22.0', require: 'resque/server' # As of 2017-02-03, Heroku insists on 1.22.0.
gem 'sass-rails', '~> 5.0' # Use SCSS for stylesheets
gem 'sinatra', '~> 2.0.0.beta2' # Unfortunately, I need to use the beta sinatra to get past a stupid typo.
gem 'turbolinks', '~> 5'
gem 'twilio-ruby', '~> 5.1', '>= 5.1.2' # Use Twilio for facility ownership verification.
gem 'uglifier', '>= 1.3.0' # Use Uglifier as compressor for JavaScript assets
gem 'will_paginate', '~> 3.1', '>= 3.1.5' # TODO: consider bootstrap-will_paginate at some point.
# gem 'bcrypt', '~> 3.1.7' Use ActiveModel has_secure_password
# gem 'redis', '~> 3.0' Use Redis adapter to run Action Cable in production
### DO NOT bother with resque-scheduler. Instead, use Heroku scheduler
### which seems to be what Heroku wants.
# Use the highest resque-scheduler version compatible with resque 1.22.0.
# gem 'resque-scheduler', '~> 2.2'
gem 'awesome_print'
gem 'bindex', '~> 0.4.0'
gem 'ransack'
gem 'country_select'
gem 'simple_form'
gem 'jquery-ui-rails'
gem 'exception_handler', '~> 0.8.0.0' #Used for handling errors
group :development, :test do
gem "letter_opener"
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
# For, "heroku local:run rails console", for example, "rails
# console" is not inheritting the environment variables contained in
# .env. By including dotenv-rails, I think I will be redundantly
# loading .env in development and test.
gem 'dotenv-rails', '~> 2.1', '>= 2.1.2'
# Now that I'm doing system tests with Rails 5.1, I need Capybara and selenium-webdriver.
# Capybara Docs: https://github.com/teamcapybara/capybara
gem 'capybara', '~> 2.14', '>= 2.14.4'
gem 'selenium-webdriver', '~> 3.4', '>= 3.4.3'
end
group :production do
gem 'rails_12factor'
end
group :development do
gem 'rb-readline'
gem 'listen', '~> 3.0.5'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'web-console'
end
gem 'pg_search'
resolve to this.. i just go to my rails console and typed this code.. https://github.com/aws/aws-sdk-ruby/issues/1240#issuecomment-231866239

uninitialized constant Gibbon::Request (NameError)

I'm trying to do Basic Mailing List Setup with Gibbon and Mailchimp.
I´m constantly getting this error when I start up my rails server rails s
I even downgraded to version gem 'gibbon', '~>1.2.0'
but still my log is looking like this
/Users/dadi/Documents/Vefir/stores/brainstore/config/initializers/gibbon.rb:2:in `<top (required)>': uninitialized constant Gibbon::Request (NameError)
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:652:in `block in load_config_initializer'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/notifications.rb:166:in `instrument'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:651:in `load_config_initializer'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:615:in `each'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:615:in `block in <class:Engine>'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:420:in `block (2 levels) in each_strongly_connected_component_from'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:419:in `block in each_strongly_connected_component_from'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:44:in `each'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:44:in `tsort_each_child'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:413:in `call'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:413:in `each_strongly_connected_component_from'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
from /Users/dadi/Documents/Vefir/stores/brainstore/config/environment.rb:5:in `<top (required)>'
from /Users/dadi/Documents/Vefir/stores/brainstore/config.ru:3:in `block in <main>'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from /Users/dadi/Documents/Vefir/stores/brainstore/config.ru:in `new'
from /Users/dadi/Documents/Vefir/stores/brainstore/config.ru:in `<main>'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/server.rb:61:in `app'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/server.rb:139:in `log_to_stdout'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/server.rb:78:in `start'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/dadi/Documents/Vefir/stores/brainstore/bin/rails:9:in `require'
from /Users/dadi/Documents/Vefir/stores/brainstore/bin/rails:9:in `<top (required)>'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/spring-1.7.1/lib/spring/client/rails.rb:28:in `load'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/spring-1.7.1/lib/spring/client/rails.rb:28:in `call'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/spring-1.7.1/lib/spring/client/command.rb:7:in `call'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/spring-1.7.1/lib/spring/client.rb:30:in `run'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/spring-1.7.1/bin/spring:49:in `<top (required)>'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/spring-1.7.1/lib/spring/binstub.rb:11:in `load'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/spring-1.7.1/lib/spring/binstub.rb:11:in `<top (required)>'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/dadi/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/dadi/Documents/Vefir/stores/brainstore/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
dadi#Dadis-iMac brainstore (AddingMailChimp) $
I've been following this link http://cheshireoctopus.github.io/blog/2014/01/23/mailchimp-plus-gibbon-plus-rails-create-a-basic-sign-up-form/
and this one http://aspiringwebdev.com/e-mail-in-rails-with-mailchimp-and-mandrill-a-comprehensive-guide/
and I have done various modifications according to stackoverflow posts but still nothing seems to work.
I don´t have a clue what is going on here but it would be very helpful if someone could advise me...
this is my config/initializers/gibbon.rb
require 'gibbon'
gibbon = Gibbon::Request.new(api_key: "myAPIkey")
Gibbon::API.timeout = 15
Gibbon::API.throws_exceptions = false
emailapi_controller.rb
class EmailapiController < ApplicationController
def index
end
def subscribe
#list_id = "myLISTid"
gb = Gibbon::API.new
gb.lists.subscribe({
:id => #list_id,
:email => {:email => params[:email][:address]}
})
end
end
Gemfile.rb
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5'
# Use postgresql as the database for Active Record
gem 'pg', '~> 0.15'
# 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 'pry-rails'
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'
gem 'dotenv-rails'
end
gem 'social-share-button'
gem 'bootstrap-sass'
gem 'autoprefixer-rails'
gem 'carrierwave'
gem 'mini_magick'
gem 'puma'
gem 'devise'
gem 'country_select'
gem 'braintree'
gem 'rails_12factor', group: :production
gem 'gibbon', '~>1.2.0'
group :test do
gem 'minitest-rails'
gem 'factory_girl_rails'
end
If anyone is interested I managed to fix this by doing the following.
in the Gemfile I changed gem 'Gibbon' to gem 'gibbon', :git => 'https://github.com/amro/gibbon.git'
then I changed the emailapi_controller.rb to
class EmailapiController < ApplicationController
def subscribe
#list_id = ENV["MAILCHIMP_LIST_ID"]
gibbon = Gibbon::Request.new
gibbon.lists(#list_id).members.create(
body: {
email_address: params[:email][:address],
status: "subscribed"
}
)
respond_to do |format|
format.json{render :json => {:message => "You have been Successfully added to the list! :)"}}
end
end
end
the initializers/gibbon.rb is supposed to be like this:
Gibbon::Request.api_key = ENV["MAILCHIMP_API_KEY"]
Gibbon::Request.timeout = 15
Gibbon::Request.throws_exceptions = false
and the MAILCHIMP_API_KEY and MAILCHIMP_LIST_ID are stored in a application.ymlcreated by the figaro gem
hope this can help if someone stumbles on the same error.
The current README for Gibbon refers to Gibbon 2.x. I suggest using a release version instead of pointing your Gemfile to github. e.g.
gem 'gibbon', '~>2.2.4'
Try in your Gemfile, not sure why bundler is not doing it by default
gem 'gibbon', '>= 3.4.0', require: 'gibbon'

WeBrick does not bootup, gives an error white accessing new rails app

I'm getting an error when I try to boot up WeBrick.
When I type rails server, I get the following error:
C:\Users\xxxx\Documents\Sites\simple_cms>rails s
=> Booting WEBrick
=> Rails 4.2.4 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers.rb:40:in `<module:Helpers>': uninitialized constant ActionView::Helpers::ActiveModelHelper (NameError)
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers.rb:4:in `<module:ActionView>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers.rb:3:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/base.rb:5:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/view_paths.rb:1:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionpack-4.2.4/lib/abstract_controller/rendering.rb:4:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionmailer-4.2.4/lib/action_mailer/base.rb:423:in `<class:Base>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionmailer-4.2.4/lib/action_mailer/base.rb:417:in `<module:ActionMailer>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionmailer-4.2.4/lib/action_mailer/base.rb:9:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionmailer-4.2.4/lib/action_mailer/railtie.rb:59:in `block in <class:Railtie>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/activesupport-4.2.4/lib/active_support/lazy_load_hooks.rb:36:in `call'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/activesupport-4.2.4/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/activesupport-4.2.4/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/activesupport-4.2.4/lib/active_support/lazy_load_hooks.rb:44:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/activesupport-4.2.4/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/application/finisher.rb:62:in `block in <module:Finisher>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `instance_exec'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `run'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:55:in `block in run_initializers'
from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:345:in `each'
from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:345:in `call'
from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:54:in `run_initializers'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/application.rb:352:in `initialize!'
from C:/Users/xxxx/Documents/Sites/simple_cms/config/environment.rb:5:in `<top (required)>'
from C:/Users/xxxx/Documents/Sites/simple_cms/config.ru:3:in `require'
from C:/Users/xxxx/Documents/Sites/simple_cms/config.ru:3:in `block in <main>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from C:/Users/xxxx/Documents/Sites/simple_cms/config.ru:in `new'
from C:/Users/xxxx/Documents/Sites/simple_cms/config.ru:in `<main>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/server.rb:61:in `app'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/server.rb:139:in `log_to_stdout'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/server.rb:78:in `start'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Here is the Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.4'
# Use mysql as the database for Active Record
gem 'mysql2'
# 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'
#end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Can anybody help me fix this?
PS: I am running on Windows 10
Try adding this line to your Gemfile
gem 'rack', '~> 1.6.4'
and then run:
bundle install
and see if that fixes your issue.
Update
If the above does not work, try uninstalling railties gem. Then install an older version of the rails (rails version 4.0.0 was used in the from the tutorial). The issue is due to the version mismatch/incompatibility of some of your gems.

Active Admin and Sass Error

/usr/local/rvm/gems/ruby-1.9.3-p194/gems/activeadmin 0.5.0/lib/active_admin/application.rb:283:in `generate_stylesheets': uninitialized constant Sass::Plugin (NameError)
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activeadmin-0.5.0/lib/active_admin/application.rb:105:in `prepare!'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activeadmin-0.5.0/lib/active_admin.rb:72:in `setup'
from /Users/devinross/Desktop/music-server1/config/initializers/active_admin.rb:1:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/engine.rb:587:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/engine.rb:587:in `block in <class:Engine>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `instance_exec'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/devinross/Desktop/music-server1/config/environment.rb:5:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application.rb:103:in `require_environment!'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands.rb:25:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Does anyone know how to fix this?
gem 'rails', '~> 3.2.8'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'yui-compressor'
end
gem 'nokogiri'
# infrastructure
gem 'rake', require: false
gem 'pg'
gem 'dalli'
# web server
# gem 'thin' # for evented server
# gem 'goliath' # for evented server
gem 'puma' # for multi-threaded server
# gem 'unicorn' # for multi-processor server
# queue
gem 'sidekiq'
gem 'slim'
gem 'sinatra', :require => nil
# support
gem 'newrelic_rpm'
gem 'airbrake'
gem 'heroku'
Check out this issue here: https://github.com/gregbell/active_admin/issues/1686
In that issue there's a pull request for this problem: https://github.com/gregbell/active_admin/pull/2028
You may also be able to resolve the issue by precompiling the admin assets like in section 4.1 here: http://guides.rubyonrails.org/asset_pipeline.html

Resources