I added the griddler and griddler-ses gem to my rails project and now I am getting this error. When I remove the griddler-ses gem the error goes away.
stack.rb:108:in `assert_index': No such middleware to insert before: ActionDispatch::ParamsParser (RuntimeError)
here is my Gemfile
gem 'rails', '~> 5.0.1'
gem 'sinatra', '2.0.0.beta2'
gem 'puma', '~> 3.0'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.2'
gem 'jquery-rails', '~> 4.2.2'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'spree', '~> 3.2.0.beta'
gem 'spree_auth_devise', '~> 3.2.0.beta'
gem 'spree_gateway', '~> 3.2.0.beta'
gem 'mysql2'
gem 'faker'
gem 'carrierwave', '~> 1.0'
gem 'stripe'
gem 'skeleton-rails'
gem 'griddler'
gem 'griddler-ses'
Does anyone have an idea of what is causing this error?
Judging by the pull requests and issues on the griddler-ses GitHub page, it currently doesn't support Rails 5.
You may want to log this as an issue there, as the gem will need to be updated to account for the change to ParamsParser in Rails 5.
Related
I have a project I'm trying to use ruby 3 (previously running with 2.7.2), but couldn't accomplish it.
After updated my gemfile with the ruby version and ran bundle, I'm receiving this error when trying to access rails c:
/home/rwehresmann/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': cannot load such file -- webrick/httputils (LoadError)
I already tried to add webrick gem to see what happens, and the result is that rails c get stuck.
Here is my gemfile:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '3.0.0'
gem 'rails', '~> 6.0.1'
gem 'pg', '>= 0.18', '< 2.0'
gem 'puma', ">= 4.3.3"
gem 'aws-sdk-s3', '~> 1'
gem 'http', '~> 4.3.0'
gem 'redis', '~> 4.1.3'
gem 'jwt', '~> 2.2.1'
gem 'pundit', '~> 2.1.0'
gem 'blueprinter', '~> 0.23.0'
gem 'money-rails', '~> 1.13.3'
gem 'dry-struct', '~> 1.3.0'
gem 'sidekiq', '~> 6.0.5'
gem 'sidekiq-scheduler', '~> 3.0.1'
gem 'friendly_id', '~> 5.2.4'
gem 'holidays', '~> 8.4.1'
gem 'administrate', '~> 0.14.0'
gem 'administrate-field-enum', '~> 0.0.9'
gem 'pg_search', '~> 2.3.2'
gem 'ransack', '~> 2.3.2'
gem 'administrate-field-active_storage', '0.3.4'
gem 'image_processing', '~> 1.2'
gem 'rolify', '~> 5.3.0'
gem 'active_storage_validations', '~> 0.8.7'
gem 'audited', '~> 4.9'
gem 'slack-ruby-client', '~> 0.15.0'
gem 'inky-rb', require: 'inky'
# Stylesheet inlining for email
gem 'premailer-rails'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.2', require: false
# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
gem 'rack-cors'
group :development, :test do
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'rspec-rails', '~> 3.8.3'
gem 'factory_bot_rails', '~> 5.1.1'
gem 'capybara', '~> 3.31.0'
end
group :development do
gem 'listen', '~> 3.4'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'letter_opener'
end
group :test do
gem 'shoulda-matchers', '~> 4.2.0'
gem 'webmock', '~> 3.8.2'
end
Any suggestions?
You have spring in your gemfile, usually hanging consoles and servers are related to that. The webrick gem was removed from the standard library in Ruby 3, so that's why it needs to be included in your Gemfile.
Add webrick to your Gemfile, do a bundle install, and then stop the background spring server with bin/spring stop. Then re-run the server.
Your best bet on solving issues with spring would be to head over and read about the gem on the GitHub project page, or opening a new question here on SO.
Try:
bundle add webrick
Adding gem "webrick" to Gemfile solves the problem.
I'm using Elastic Beanstalk to deploy ruby on rails application to aws. im following the instruction on this website.
Deploying a Rails Application to Elastic Beanstalk
but WHEN i get to step to deploy the application i get an error
This image from eb-activity.log
gem 'jquery-rails'
gem 'rails', '~> 5.1.4'
gem 'sqlite3'
gem 'puma', '~> 3.7'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'therubyracer', platforms: :ruby
gem 'coffee-rails', '~> 4.2'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'redis', '~> 3.0'
gem 'bcrypt', '~> 3.1.7'
gem 'capistrano-rails', group: :development
group :development, :test do
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'capybara', '~> 2.13'
gem 'selenium-webdriver'
end
group :development do
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'bootstrap-sass', '~> 3.3.7'
gem 'devise', '~>4.2'
gem 'toastr-rails', '~> 1.0'
gem 'omniauth', '~> 1.6'
gem 'omniauth-facebook', '~> 4.0'
gem 'paperclip', '~>5.1.0'
gem 'aws-sdk','~> 2.8'
gem 'geocoder', '~> 1.4'
gem 'jquery-ui-rails', '~> 5.0'
gem 'ransack', '~> 1.7'
gem 'twilio-ruby', '~> 4.11.1'
gem 'fullcalendar-rails', '~> 3.4.0'
gem 'momentjs-rails', '~> 2.17.1'
gem 'stripe', '~> 3.0.0'
gem 'rails-assets-card', source: 'https://rails-assets.org'
gem 'omniauth-stripe-connect', '~> 2.10.0'
gem 'chartkick', '~> 2.2.4'
gem 'mysql2', '~> 0.3.18'
gem 'yaml_db'
gem 'vider'
gem 'nokogiri', '1.8.1'
The relevant error is:
Installing nokogiri 1.8.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
nokogiri 1.8.1 has security vulnerabilities so it is a very good idea to upgrade to the latest version, which is 1.8.3. This also might have the side effect of fixing the build error you are seeing, so it is worth a shot.
On your development machine, upgrade nokogiri like this:
bundle update --conservative nokogiri
Then commit the Gemfile.lock, push and redeploy.
If that still doesn't work, you may simply not have enough memory on the server to compile the nokogiri extensions. See this question: ElasticBeanstalk - Rails Nokogiri Deployment Issue
Or search for "nokogiri elastic beanstalk" for more answers: https://stackoverflow.com/search?q=nokogiri+elastic+beanstalk
I was working on a GoRails refile gem course and trying to implement it into my app. When I tried to do bundle install, I kept running into an error message in my console saying that bundle could not find compatible versions for my gem "rack" (screenshot of error below).
I tried looking at these Stackoverflow questions - Bundler could not find compatible versions for gem "rack": In Gemfile: and Bundler could not find compatible versions for gem "rack": without success. I tried multiple approaches - 1. putting rack in my Gemfile, 2. uninstalling all previous rack and then installing rack versions. None seemed to work. I would greatly appreciate any help on this issue. Thank you so much.
Gemfile
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1', '>= 5.1.3'
gem 'sqlite3'
gem 'puma', '~> 3.0'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.2'
gem 'jquery-rails'
gem 'jquery-ui-sass-rails', '~> 4.0', '>= 4.0.3.0'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'bootstrap-sass', '~> 3.3', '>= 3.3.7'
gem 'devise', '~> 4.3'
gem 'omniauth-facebook'
gem 'paperclip', '~> 5.1'
gem 'redis'
gem "font-awesome-rails"
gem "twemoji"
gem 'koala', '~> 2.5'
gem 'chosen-rails'
gem 'devise-bootstrap-views', '~> 0.0.9'
gem 'pry', '~> 0.10.4'
gem 'bootstrap-modal-rails', '~> 2.2', '>= 2.2.5'
gem 'better_errors', '~> 2.3'
gem 'selectize-rails', '~> 0.12.4'
gem 'ransack', '~> 1.8', '>= 1.8.2'
gem 'searchkick', '~> 2.3', '>= 2.3.1'
gem 'jquery-fileupload-rails', '~> 0.4.7'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console'
gem 'listen', '~> 3.0.5'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
I'm upgrading a rails 3.0.9 app to 3.2.13 and from ruby 1.8.7 to 1.9.3. Any time I try to access a controller action, I get the following error
Started GET "/myapp/login" for 127.0.0.1 at 2013-07-25 07:10:06 -0600
SystemStackError (stack level too deep):
actionpack (3.2.13) lib/action_dispatch/middleware/reloader.rb:70
Rendered /actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.5ms)
Rendered /actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (5.2ms)
Rendered /actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (22.6ms)
The only way I've been able to get a page to load without error is to clear out the database sessions (rake db:sessions:clear) and then restart the rails server. This allows ONE single request to succeed and then all subsequent requests fail.
I've tried comparing all my core config files to a working 3.2 app and have also tried to upgrade all of my gems.
Here's my current Gemfile:
source 'http://rubygems.org'
gem 'rails', '3.2.13'
gem 'mysql2', '~> 0.3'
gem 'dynamic_form', '1.1.4'
gem 'validates_timeliness', '~> 3.0'
gem 'authlogic', '~> 3.3'
gem 'cancan', '~> 1.6'
gem 'jquery-rails', '~> 1.0.19'
gem 'simple_form', '~> 2.1'
#gem 'rails3-generators', '0.17.4'
gem 'yaml_db', '0.2.2' #
gem 'will_paginate', '~> 3.0'
gem 'activemerchant', '1.26.0', :path => "vendor/gems/activemerchant-1.26.0" #
gem 'active_utils', '~> 1.0'
gem 'httparty', '~> 0.11'
gem 'forgery', '~> 0.5'
gem 'mail', '~> 2.5'
gem 'state_machine', '~> 1.2'
gem 'uuid', '~> 2.3'
gem 'rails_config', '~> 0.3'
gem 'machinist', '2.0'
gem 'memcache-client', '1.8.5'
gem 'fastercsv', '~> 1.5'
gem 'faker', '~> 1.1'
gem 'rack-ssl', '~> 1.3', :require => 'rack/ssl'
gem 'sendgrid', '~> 1.2'
gem 'prawn', '0.12.0'
gem 'friendly_id', '~> 4.0'
gem 'whenever', '~> 0.8', :require => false
gem 'rake', '0.9.2.2' #
gem 'exception_notification', '3.0.1' #
gem 'credit_card_validator', '~> 1.1'
gem 'deadlock_retry', '~> 1.2'
gem 'delayed_job_active_record', '~> 0.4'
gem 'daemons', '1.0.10'
gem 'active_attr', '~> 0.8'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
group :development, :test do
gem 'mocha', '~> 0.14', :require => false
gem 'vcr', '~> 2.5'
gem 'fakeweb', '1.3.0'
gem 'capistrano', '~> 2.15'
gem 'ruby-debug-ide', '0.4.17', :require => false
gem 'letter_opener', '~> 1.1'
#gem 'better_errors'
gem 'thin'
end
This ended up being caused by this rails issue: https://github.com/rails/rails/issues/3144
Changing this in the model from:
include Rails.application.routes.url_helpers
To:
Rails.application.routes.url_helpers.path_that_i_was_referencing_in_a_model
I'm working on a Facebook app and using devise and omniauth-facebook for authentication.
I followed the wiki pages to set it up and also using OmniAuth.config.add_mock(:facebook, #omniauth_hash) for my specs.
This is my Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.3'
gem 'sqlite3', '~> 1.3.6'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'devise', '~> 2.0.4'
gem 'haml', '~> 3.1.4'
gem 'haml-rails', '~> 0.3.4'
gem 'therubyracer', '~> 0.9.10'
gem 'twitter-bootstrap-rails', '~> 2.0.6'
gem 'simple_form', '~> 2.0.2'
gem 'omniauth-facebook', '~> 1.2.0'
gem 'unicorn', '~> 4.3.1'
gem 'koala', '~> 1.4.1'
gem "formtastic", "~> 2.1.1" # 2.2.0 breaks activeadmin 0.4.3
gem 'activeadmin', '~> 0.4.3'
gem 'redis', '~> 2.2.2'
gem 'jquery-rails', '~> 2.0.2'
group :development, :test do
gem 'spork', '~> 1.0rc'
gem 'guard'
gem 'guard-test' # run tests automatically in background
gem 'annotate', '2.4.1.beta1'
gem 'guard-annotate' # annotate models, tests, etc with infos from db
gem 'guard-rspec' # run specs automatically in background
gem 'guard-spork', '~> 0.5.2'
gem 'rb-fsevent'
gem 'growl'
gem 'rspec-core', '2.7.0'
gem 'rspec-rails', '2.7.0'
gem 'simplecov' # test coverage
gem 'factory_girl', '2.3.2', :require => false
gem 'factory_girl_rails', '~> 1.4', :require => false # better fixtures
gem 'capybara' # better request tests with rspec
gem 'capybara-json', '~> 0.2.0'
gem 'launchy'
end
My GET requests specs are working fine. Redirecting to the omniauth-callback and so on.
Now i wanted to test my first POST request that i'm using as a backend api for the flash client. In my requests spec i just get a "401 Unauthorized" when calling this post request.
Can someone please help me out? Did i forget something? Why are my GET requests working fine but the POST doesn't?
Thanks in advance