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'
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'm using the gem countries to populate a country select element. I'd like to add custom countries to the list of ISO3116 countries provided by the gem.
Gem: https://github.com/hexorx/countries
I've read the wiki for the countries gem. I've attempted to follow the instructions provided under the section 'Loading Custom Data'. unfortunately their too sparse for a relative to rails newcomer like myself.
When I try to boot up a development server, I get the error listed below.
I don't know where I should be adding the following code. I've added it to 'config/initializers' because according to the guides (http://guides.rubyonrails.org/initialization.html) files in this directory are loaded after the gem files are loaded when initializing the app. Hence, my confusion. By the time the code below is executed, shouldn't the constant 'ISO3116' have been initialized?
Code:
config/initializers/custom_countries.rb
ISO3116::Data.register(
continent: "Europe",
alpha2: "EN",
alpha3: "ENG",
name: "England"
)
Gem file
source 'https://rubygems.org'
#default:
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# 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'
#jQuery plugin for drop-in fix binded events problem caused by Turbolinks
gem 'jquery-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
#Optional Defaults:
# 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
#locales, inc en-GB
gem 'rails-i18n'
#OS:
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
#Servers:
#Thin web server, better than stock server
gem 'thin'
#Debugging:
group :development do #Development. Avoid using in production.
#Display compile/runtime errors better in browser
gem "better_errors"
#Required for better_errors advanced features (REPL, variable incpection)
gem "binding_of_caller"
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
end
group :development, :test do #Development & Test Avoid using in production.
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
end
#Models:
#Pagination
gem 'kaminari'
#search
gem 'filterrific'
#ISO 3166 countries list
gem 'countries'
gem 'country_select'
#Views:
#animation of page loads
gem "animate-rails"
#Simple Form, for creating froms
gem 'simple_form'
#nested forms
gem 'cocoon'
#Bootstrap, front-end web development framework to inetgrate with rails
gem 'bootstrap-sass', '~> 3.2.0'
#Allow you to write CSS (SASS, LESS etc) rules without vendor prefixes.
gem 'autoprefixer-rails'
#Override the browser default confirmation pop up with a bootsrap modal
gem 'data-confirm-modal'
#Testing:
group :development, :test do
#Exit test-suite execution at first test-failure.
gem 'minitest-fail-fast'
#Takes development database and converts to fixtures for testing
gem 'fixtures_dumper'
#Used to generate fake data
gem 'faker'
end
Server Error when trying to boot
C:\Users\Patrick\Desktop\Consign>rails server -b 0.0.0.0 -p 80
=> Booting Thin
=> Rails 4.2.5.1 application starting in development on http://0.0.0.0:80
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
C:/Users/Patrick/Desktop/Consign/config/initializers/custom_countries.rb:1:in `<
top (required)>': uninitialized constant ISO3116 (NameError)
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5
.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-
4.2.5.1/lib/active_support/notifications.rb:166:in `instrument'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5
.1/lib/rails/engine.rb:651:in `load_config_initializer'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5
.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5
.1/lib/rails/engine.rb:615:in `each'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5
.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5
.1/lib/rails/initializable.rb:30:in `instance_exec'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5
.1/lib/rails/initializable.rb:30:in `run'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5
.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:226:in `block i
n tsort_each'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:348:in `block (
2 levels) in each_strongly_connected_component'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:418:in `block (
2 levels) in each_strongly_connected_component_from'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:427:in `each_st
rongly_connected_component_from'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:417:in `block i
n each_strongly_connected_component_from'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5
.1/lib/rails/initializable.rb:44:in `each'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5
.1/lib/rails/initializable.rb:44:in `tsort_each_child'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `call'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `each_st
rongly_connected_component_from'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:347:in `block i
n each_strongly_connected_component'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `call'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each_st
rongly_connected_component'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:224:in `tsort_e
ach'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/tsort.rb:205:in `tsort_e
ach'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5
.1/lib/rails/initializable.rb:54:in `run_initializers'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5
.1/lib/rails/application.rb:352:in `initialize!'
from C:/Users/Patrick/Desktop/Consign/config/environment.rb:6:in `<top (
required)>'
from C:/Users/Patrick/Desktop/Consign/config.ru:3:in `require'
from C:/Users/Patrick/Desktop/Consign/config.ru:3:in `block in <main>'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.5/lib
/rack/builder.rb:55:in `instance_eval'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.5/lib
/rack/builder.rb:55:in `initialize'
from C:/Users/Patrick/Desktop/Consign/config.ru:in `new'
from C:/Users/Patrick/Desktop/Consign/config.ru:in `<main>'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.5/lib
/rack/builder.rb:49:in `eval'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.5/lib
/rack/builder.rb:49:in `new_from_string'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.5/lib
/rack/builder.rb:40:in `parse_file'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.5/lib
/rack/server.rb:299:in `build_app_and_options_from_config'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.5/lib
/rack/server.rb:208:in `app'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5
.1/lib/rails/commands/server.rb:61:in `app'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.5/lib
/rack/server.rb:336:in `wrapped_app'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5
.1/lib/rails/commands/server.rb:139:in `log_to_stdout'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5
.1/lib/rails/commands/server.rb:78:in `start'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5
.1/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5
.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5
.1/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5
.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5
.1/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Thank you,
PQ
PS. This is my second (maybe third) question I've asked on StackOverflow. Feedback welcome.
FML.
My approach is correct (well, it works). The code can be placed in config/initializers, my error was due to an incorectly formatted hash being passed into:
ISO3166::Data.register()
Hope this helps.
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.
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.
/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