I'm using Rails 4.0.0, Ruby 2.3 and Unicorn.
My app was working perfectly until the day I tried to add a nem gem in my Gemfile. Everything's working like a charm locally, but when I deploy to DO using Capistrano, I get stuck in a loop with the error:
E, [2016-09-26T11:40:29.801388 #24545] ERROR -- : reaped #<Process::Status: pid 4280 exit 1> worker=0
I, [2016-09-26T11:40:29.802952 #4287] INFO -- : Refreshing Gem list
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/activesupport-4.0.0/lib/active_support/values/time_zone.rb:282: warning: circular argument reference - now
E, [2016-09-26T11:40:32.116762 #4287] ERROR -- : uninitialized constant Vimeo::HTTParty (NameError)
/home/deployer/apps/my_app/releases/20160924171252/app/controllers/webinars_controller.rb:2:in `<class:Vimeo>'
/home/deployer/apps/my_app/releases/20160924171252/app/controllers/webinars_controller.rb:1:in `<top (required)>'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/engine.rb:465:in `block (2 levels) in eager_load!'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/engine.rb:464:in `each'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/engine.rb:464:in `block in eager_load!'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/engine.rb:462:in `each'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/engine.rb:462:in `eager_load!'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/engine.rb:347:in `eager_load!'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/application/finisher.rb:56:in `each'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/deployer/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
/home/deployer/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
/home/deployer/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
/home/deployer/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
/home/deployer/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each'
/home/deployer/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `call'
/home/deployer/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
/home/deployer/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
/home/deployer/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/deployer/apps/my_app/releases/20160924171252/config/environment.rb:5:in `<top (required)>'
config.ru:4:in `require'
config.ru:4:in `block in <main>'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn.rb:56:in `eval'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn.rb:56:in `block in builder'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:752:in `build_app!'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:617:in `init_worker_process'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:639:in `worker_loop'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:508:in `spawn_missing_workers'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:519:in `maintain_worker_count'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:283:in `join'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/gems/unicorn-5.1.0/bin/unicorn:126:in `<top (required)>'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/bin/unicorn:23:in `load'
/home/deployer/apps/my_app/shared/bundle/ruby/2.3.0/bin/unicorn:23:in `<top (required)>'
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/cli/exec.rb:74:in `load'
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/cli/exec.rb:74:in `kernel_load'
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/cli/exec.rb:27:in `run'
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/cli.rb:332:in `exec'
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/cli.rb:20:in `dispatch'
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/cli.rb:11:in `start'
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/exe/bundle:34:in `block in <top (required)>'
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors'
/home/deployer/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.1/exe/bundle:26:in `<top (required)>'
/home/deployer/.rvm/gems/ruby-2.3.0/bin/bundle:23:in `load'
/home/deployer/.rvm/gems/ruby-2.3.0/bin/bundle:23:in `<main>'
/home/deployer/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
/home/deployer/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
I don't know exactly what's happening, because I can use the code from this new Gem locally but when deployed it don't load, or don't install.
Seems that could be a syntax problem searching on Google, but don't know how to make sure because it was a long time ago I haven't added a Gem, so the syntax erro could be so old. Is there some tool to check if there's a syntax error? And I thing it's weird since it's working locally.
My Gemfile
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/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'
gem 'jquery-turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
# gem 'anjlab-bootstrap-rails', :require => 'bootstrap-rails', :github => 'anjlab/bootstrap-rails'
gem 'bootstrap-sass', '~> 3.2.0'
gem 'devise'
gem 'paperclip', '~> 3.0'
gem 'aws-sdk', '~> 1'
gem 'nokogiri', '~> 1.5.1'
gem 'wicked_pdf'
# gem "wkhtmltopdf-heroku", :git => 'git://github.com/camdez/wkhtmltopdf-heroku.git'
gem "wkhtmltopdf-binary"
gem 'newrelic_rpm'
gem 'validates_email_format_of'
# gem 'will_paginate', '~> 3.0.6'
gem 'will_paginate-bootstrap'
gem 'iconv'
gem 'roo'
gem 'roo-xls'
gem 'airbrake', '~> 4.3'
gem "paranoia", "~> 2.0"
gem 'ransack'
gem 'omniauth-facebook'
gem 'omniauth-google-oauth2'
gem 'activerecord-session_store', github: 'rails/activerecord-session_store'
gem 'nested_form_fields'
gem 'httparty'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
# gem 'sdoc', require: false
end
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the app server
# Use Capistrano for deployment
group :development do
gem 'sqlite3'
gem 'awesome_print'
gem "capistrano", "~> 3.6"
gem 'capistrano-rails', '~> 1.1'
gem 'capistrano-rvm'
gem 'capistrano3-unicorn'
gem 'capistrano-local-precompile', require: false
end
group :production do
gem 'unicorn'
gem 'pg'
gem 'rails_12factor'
end
# Use debugger
# gem 'debugger', group: [:development, :test]
Similar problem here. It happens when you change you Gemfile, using unicorn:reload doesn't run your new code.
Solved restarting unicorn instead of reloading it.
If you are using Capistrano, change the after deploy trigger from
invoke 'unicorn:reload' to:
invoke 'unicorn:stop'
invoke 'unicorn:start'
According to https://github.com/tablexi/capistrano3-unicorn/issues/45 unicorn:restart is not working properly.
Our problem was that unicorn master process wasn't restarted correctly, because it was killed with:
/bin/kill -s HUP `cat tmp/pids/unicorn.pid`
Which doesn't actually kill the unicorn master process (only reloads the config, see SIGHUP documentation). Verify by running ps -ef | grep 'unicorn'.
Our problem was solved changing the killing of unicorn master process with:
/bin/kill `cat tmp/pids/unicorn.pid`
PS: cat tmp/pids/unicorn.pid just outputs the PID of the unicorn master process.
Related
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
I was messing around with the routes and decided to restart rails server and I ended up getting this error. I am using ruby on rails 5 with rails server 2.8.4. I tried running bundle update to see if that would fix the issue, restarting the computer, and restarting the redis server. I also tried to rename redis.rb file to test.rb so if it might be name conflicts stated in the other stack overflow questions
Error from my console terminal:
/home/ubuntu/workspace/config/initializers/redis.rb:1:in `<top (required)>': uninitialized constant Redis::Namespace (NameError)
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/engine.rb:655:in `block in load_config_initializer'
from /usr/local/rvm/gems/ruby-2.4.0/gems/activesupport-5.1.6/lib/active_support/notifications.rb:168:in `instrument'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/engine.rb:654:in `load_config_initializer'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/engine.rb:611:in `each'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/engine.rb:611:in `block in <class:Engine>'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/initializable.rb:30:in `instance_exec'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/initializable.rb:30:in `run'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/initializable.rb:59:in `block in run_initializers'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:228:in `block in tsort_each'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/initializable.rb:48:in `each'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/initializable.rb:48:in `tsort_each_child'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:415:in `call'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:415:in `each_strongly_connected_component_from'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:347:in `each'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:347:in `call'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:347:in `each_strongly_connected_component'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:226:in `tsort_each'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:205:in `tsort_each'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/initializable.rb:58:in `run_initializers'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/application.rb:353:in `initialize!'
from /home/ubuntu/workspace/config/environment.rb:5:in `<top (required)>'
from config.ru:3:in `require_relative'
from config.ru:3:in `block in <main>'
from /usr/local/rvm/gems/ruby-2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:55:in `instance_eval'
from /usr/local/rvm/gems/ruby-2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:55:in `initialize'
from config.ru:in `new'
from config.ru:in `<main>'
from /usr/local/rvm/gems/ruby-2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:49:in `eval'
from /usr/local/rvm/gems/ruby-2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:49:in `new_from_string'
from /usr/local/rvm/gems/ruby-2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:40:in `parse_file'
from /usr/local/rvm/gems/ruby-2.4.0/gems/rack-2.0.5/lib/rack/server.rb:319:in `build_app_and_options_from_config'
from /usr/local/rvm/gems/ruby-2.4.0/gems/rack-2.0.5/lib/rack/server.rb:219:in `app'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:24:in `app'
from /usr/local/rvm/gems/ruby-2.4.0/gems/rack-2.0.5/lib/rack/server.rb:354:in `wrapped_app'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:80:in `log_to_stdout'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:42:in `start'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:135:in `block in perform'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in `tap'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in `perform'
from /usr/local/rvm/gems/ruby-2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
from /usr/local/rvm/gems/ruby-2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
from /usr/local/rvm/gems/ruby-2.4.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/command/base.rb:63:in `perform'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/command.rb:44:in `invoke'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/commands.rb:16:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Gemfile:
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.1.6'
# Use sqlite3 as the database for Active Record
# Use Puma as the app server
gem 'puma', '~> 3.7'
# 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 'therubyracer', platforms: :ruby
gem 'devise'
gem 'bootstrap'
gem 'jquery-rails'
gem 'webpacker', '~> 3.5'
gem 'stripe'
gem 'httparty'
#gem 'mongoid', github: 'mongoid/mongoid'
#gem 'mongoid', '~> 6.2.0'
#gem 'bson_ext'
gem 'rspec-rails', '~> 3.6'
gem 'database_cleaner', '~> 1.6', '>= 1.6.1'
#gem 'rails_admin', '~> 1.3'
# 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
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', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
gem 'promise'
gem 'time_difference', '~> 0.7.0'
gem 'graphql-client'
# gem 'pg'
gem 'redis'
gem 'redis-namespace', group: :production
gem 'newrelic_rpm'
gem 'redis-rails'
gem 'redis-rack-cache'
gem 'informant-rails'
gem 'sidekiq'
#gem 'tzinfo-data'
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]
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '~> 2.13'
gem 'selenium-webdriver'
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', '< 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'
gem 'sqlite3'
end
group :production do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'pg'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'graphiql-rails', group: :development
and here is my redis.rb
$redis = Redis::Namespace.new("chronoci", :redis => Redis.new)
Okay for some reason, , group: :production was added to gem 'redis-namespace', group: :production in the Gemfile. Removing group :production fixed the issue for me
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'
I am a Rails newbie. Using RoR on Linux mint 16.
Bundle install seems to give me some problems. List of commands that generate this error:
gem install bundler, bundle install --without production, bundle update, gem install pg, or any gem install <insert_gem_here> (removed hyperlinks down below)
judeman#VB ~/rails_projects/first_app $ bundle update
Fetching gem metadata from ://rubygems.org/....
Fetching additional metadata from ://rubygems.org/..
**Unfortunately, a fatal error has occurred. Please see the Bundler troubleshooting documentation at**
://bit.ly/bundler-issues. Thanks!
/home/judeman/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/psych.rb:370:in `parse': (<unknown>): mapping values are not allowed in this context at line 3 column 8 (Psych::SyntaxError)
from /home/judeman/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/psych.rb:370:in `parse_stream'
from /home/judeman/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/psych.rb:318:in `parse'
from /home/judeman/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/psych.rb:245:in `load'
from /home/judeman/.rvm/rubies/ruby-2.1.1/lib/ruby/site_ruby/2.1.0/rubygems/config_file.rb:333:in `load_file'
from /home/judeman/.rvm/rubies/ruby-2.1.1/lib/ruby/site_ruby/2.1.0/rubygems/config_file.rb:198:in `initialize'
from /home/judeman/.rvm/rubies/ruby-2.1.1/lib/ruby/site_ruby/2.1.0/rubygems.rb:289:in `new'
from /home/judeman/.rvm/rubies/ruby-2.1.1/lib/ruby/site_ruby/2.1.0/rubygems.rb:289:in `configuration'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/rubygems_integration.rb:48:in `configuration'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/rubygems_integration.rb:71:in `sources='
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/source/rubygems.rb:275:in `remote_specs'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/source/rubygems.rb:166:in `fetch_specs'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/source/rubygems.rb:66:in `specs'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/definition.rb:216:in `block (2 levels) in index'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/definition.rb:213:in `each'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/definition.rb:213:in `block in index'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/index.rb:9:in `build'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/definition.rb:209:in `index'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/definition.rb:203:in `resolve'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/definition.rb:133:in `specs'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/definition.rb:122:in `resolve_remotely!'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/installer.rb:82:in `run'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/installer.rb:15:in `install'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/cli.rb:334:in `update'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/vendor/thor/command.rb:27:in `run'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/vendor/thor/invocation.rb:121:in `invoke_command'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/vendor/thor.rb:363:in `dispatch'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/vendor/thor/base.rb:440:in `start'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/cli.rb:10:in `start'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/bin/bundle:20:in `block in <top (required)>'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/friendly_errors.rb:5:in `with_friendly_errors'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/bin/bundle:20:in `<top (required)>'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/bin/bundle:23:in `load'
from /home/judeman/.rvm/gems/ruby-2.1.1#global/bin/bundle:23:in `<main>'
from /home/judeman/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
from /home/judeman/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
[Bad gemfile]
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.4'
# Use sqlite3 as the database for Active Record
group :development do
gem 'sqlite3'
end
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.2'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
group :production do
gem 'pg'
gem 'rails_12factor'
end
ruby '2.1.1'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
Psych is called probably because in your project you use environment variables or YAML files and in one of them there is syntax error.
Check these files:
~/.bashrc
~/.profile
~/.bash_profile
config/dababase.yml
If one of them has a syntax error in it, it was capturing the output. I had similiar problem and fixed ~/.profile error and all is good!
/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