/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
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 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 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'
For some reason I can't run my tests anymore in rspec. Posts on stack overflow says it might be a namespace issue but there's nothing to indicate that in my code base (in my view). having running rspec spec I get the following error.
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.9.0
/Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/xpath-2.0.0/lib/xpath/dsl.rb:1:in `<top (required)>': XPath is not a module (TypeError)
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/xpath-2.0.0/lib/xpath.rb:3:in `require'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/xpath-2.0.0/lib/xpath.rb:3:in `<top (required)>'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/capybara-2.2.1/lib/capybara.rb:3:in `require'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/capybara-2.2.1/lib/capybara.rb:3:in `<top (required)>'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545#global/gems/bundler-1.6.0/lib/bundler/runtime.rb:76:in `require'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545#global/gems/bundler-1.6.0/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545#global/gems/bundler-1.6.0/lib/bundler/runtime.rb:72:in `each'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545#global/gems/bundler-1.6.0/lib/bundler/runtime.rb:72:in `block in require'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545#global/gems/bundler-1.6.0/lib/bundler/runtime.rb:61:in `each'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545#global/gems/bundler-1.6.0/lib/bundler/runtime.rb:61:in `require'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545#global/gems/bundler-1.6.0/lib/bundler.rb:132:in `require'
from /Users/garytsai/Projects/reader-tool/config/application.rb:13:in `<top (required)>'
from /Users/garytsai/Projects/reader-tool/config/environment.rb:2:in `require'
from /Users/garytsai/Projects/reader-tool/config/environment.rb:2:in `<top (required)>'
from /Users/garytsai/Projects/reader-tool/spec/spec_helper.rb:3:in `require'
from /Users/garytsai/Projects/reader-tool/spec/spec_helper.rb:3:in `<top (required)>'
from /Users/garytsai/Projects/reader-tool/spec/controllers/readers_controller_spec.rb:1:in `require'
from /Users/garytsai/Projects/reader-tool/spec/controllers/readers_controller_spec.rb:1:in `<top (required)>'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `load'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `block in load_spec_files'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `each'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `load_spec_files'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/rspec-core-2.14.7/lib/rspec/core/command_line.rb:22:in `run'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/rspec-core-2.14.7/lib/rspec/core/runner.rb:80:in `run'
from /Users/garytsai/.rvm/gems/ruby-1.9.3-p545/gems/rspec-core-2.14.7/lib/rspec/core/runner.rb:17:in `block in autorun'
Any fixes for this? I already looked for my gemfile for anything that needs to be removed but there's nothing that seems to indicate or conflict with rspec
source 'https://rubygems.org'
ruby "1.9.3"
gem 'rails', '3.2.14'
gem 'jquery-rails'
gem 'simple_form'
gem 'pg'
gem 'thin'
gem 'XMLCanonicalizer'
gem 'humanize'
group :development do
gem 'better_errors'
gem 'binding_of_caller'
gem 'debugger'
gem 'quiet_assets'
gem 'sextant'
end
group :test do
gem 'capybara'
gem 'selenium-webdriver'
gem 'shoulda-matchers'
gem 'simplecov'
gem 'database_cleaner'
end
group :development, :test do
gem 'rspec-rails'
gem "factory_girl_rails", "~> 4.0"
gem 'faker'
gem "rack_session_access"
gem 'populator'
gem 'dotenv'
end
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'twitter-bootstrap-rails'
gem "less-rails"
gem "therubyracer"
end
I got this error when I try to run my RoR application.
After rails server, this error appear:
uninitialized constant V8::JSError (NameError)
E:\Toan\tnkadmin>rails server
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/less-2.4.0/lib/less/java_sc
ript/v8_context.rb:61:in `rescue in lock': uninitialized constant V8::JSError (N
ameError)
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/less-2.4.0/lib
/less/java_script/v8_context.rb:60:in `lock'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/less-2.4.0/lib
/less/java_script/v8_context.rb:19:in `initialize'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/less-2.4.0/lib
/less/java_script/v8_context.rb:15:in `new'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/less-2.4.0/lib
/less/java_script/v8_context.rb:15:in `instance'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/less-2.4.0/lib
/less/loader.rb:13:in `initialize'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/less-2.4.0/lib
/less.rb:14:in `new'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/less-2.4.0/lib
/less.rb:14:in `<module:Less>'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/less-2.4.0/lib
/less.rb:9:in `<top (required)>'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/less-rails-2.4
.2/lib/less/rails.rb:6:in `require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/less-rails-2.4
.2/lib/less/rails.rb:6:in `<top (required)>'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/less-rails-2.4
.2/lib/less-rails.rb:1:in `require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/less-rails-2.4
.2/lib/less-rails.rb:1:in `<top (required)>'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/
lib/bundler/runtime.rb:72:in `require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/
lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/
lib/bundler/runtime.rb:70:in `each'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/
lib/bundler/runtime.rb:70:in `block in require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/
lib/bundler/runtime.rb:59:in `each'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/
lib/bundler/runtime.rb:59:in `require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/
lib/bundler.rb:132:in `require'
from E:/Toan/tnkadmin/config/application.rb:5:in `<top (required)>'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.1
/lib/rails/commands.rb:74:in `require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.1
/lib/rails/commands.rb:74:in `block in <top (required)>'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.1
/lib/rails/commands.rb:71:in `tap'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.1
/lib/rails/commands.rb:71:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
This is my gemfile
source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '~> 4.0.0'
#gem 'rails', '3.2.9'
gem 'thin'
gem 'haml'
gem 'jquery-rails'
gem 'i18n'
gem 'exception_notification'
# To use ActiveModel has_secure_password
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 4.0.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.0.3'
gem 'less-rails'
gem 'execjs'
#gem 'twitter-bootstrap-rails'
if RUBY_PLATFORM =~ /mingw/
gem 'therubyracer', path: 'lib/therubyracer-0.11.0beta1-x86-mingw32'
gem 'libv8', '3.3.10.4'
else
gem 'therubyracer', platforms: 'ruby'
end
end
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
group :test, :development do
gem 'sqlite3'
gem 'haml-rails'
gem 'rspec-rails'
gem 'factory_girl'
gem 'factory_girl_rails'
gem 'capybara'
gem 'database_cleaner'
end
group :test do
gem 'cucumber-rails'
# gem 'mysql2'
end
group :production do
gem 'rails_log_stdout', github: 'heroku/rails_log_stdout'
gem 'rails3_serve_static_assets', github: 'heroku/rails3_serve_static_assets'
# gem 'activerecord-postgresql-adapter'
gem 'pg'
gem 'newrelic_rpm'
end
#gem 'execjs'
#gem 'node'
Does anyone know how to fix it?
Remove this gem 'therubyracer and gem 'libv8', '3.3.10.4'' from the current line and add it below gem 'exception_notification'. is thisif RUBY_PLATFORM =~ /mingw/` validated? Check if the rubyracer gem is installed. run bundle and see if the issue exists