Questions tagged [ruby-on-rails-6]

Ruby on Rails 6 is the latest version of Ruby on Rails, "an open-source web framework that's optimized for programmer happiness and sustainable productivity."

2084 questions
6
votes
2 answers

How to test ActionText rich_text_field in a System test?

I'm trying to fill in an ActionText rich_text field form input, but can't figure out how to select it. I'm using Rails 6 and ActionText. With class Activity has_rich_text :description end and _form.rb = f.label :description = f.rich_text_area…
Carson Cole
  • 4,183
  • 6
  • 25
  • 35
6
votes
2 answers

Rails 6 accessing credentials does not work?

I am trying to set up a Stripe payment form for a Rails 6 project, and I am not able to access my stripe secret keys. I am getting an error NoMethodError (undefined method `[]' for nil:NilClass) What am I doing wrong? Here's what I did Edit my…
David Lee
  • 571
  • 6
  • 20
6
votes
1 answer

Is it possible to override the create_migration template in Rails 6?

I tried placing my custom file in multiple locations inside the lib folder with no success. I found a PR from 2017 to reactivate this behavior but wasn't merged. https://github.com/rails/rails/pull/13972 I had a look…
Iván Quiñones
  • 501
  • 4
  • 12
6
votes
0 answers

How to install webpacker inside rails Engine?

I have built one Rails Engine using rails 6.0.3.2 as by default webpacker is not present inside the engine so I have configured the webpacker manually using https://github.com/rails/webpacker/blob/master/docs/engines.md link. But when I am trying…
6
votes
1 answer

Is establish_connection on worker boot still required on Rails 6 and Puma?

I read on Heroku that for Rails (4+ they say) I should add the following directive to Puma, when I use multiple workers and I preload the app: on_worker_boot do ActiveRecord::Base.establish_connection end However I have both preload_app! and…
collimarco
  • 34,231
  • 36
  • 108
  • 142
6
votes
1 answer

Uncaught TypeError: $(...).modal is not a function in rails 6

Getting this error in rails 6, in rails 5 it was a easy fix after updating the application to rails 6, including webpack this error is appear every where I try to close the model inside the js.erb files. My files:…
vidur punj
  • 5,019
  • 4
  • 46
  • 65
6
votes
2 answers

Ruby gems Will_Paginate styling

Using the Will_paginate gem for a ruby on rails app, I'm not using Bootstrap though. How do I go about styling the page buttons? I'm at a loss here. Thinking maybe will_paginate @posts do? or what o.o and by styling, I'm talking about CSS in just in…
CoderDude
  • 303
  • 2
  • 8
6
votes
1 answer

Can't resolve image into URL: undefined method `start_with?' for /\.(?:svg|eot|woff|ttf)$/:Regexp

Upgrading a Rails 5.2 project to Rails 6. After the upgrade, when I try to pull up the site, I'm getting the following error: Can't resolve image into URL: undefined method `start_with?' for /\.(?:svg|eot|woff|ttf)$/:Regexp This is code: def…
rip747
  • 9,375
  • 8
  • 36
  • 47
6
votes
1 answer

Deprecation of combine_options in Active Storage's ImageProcessing transformer

While developing a new Rails Application, I noticed the following deprecation warning in the console: DEPRECATION WARNING: Active Storage's ImageProcessing transformer doesn't support :combine_options, as it always generates a single ImageMagick…
NL-Kevin
  • 197
  • 10
6
votes
1 answer

Autoloading and Zeitwerk Mode in Rails 6

Is any of this code depreciated in Zeitwerk Mode in Rails 6? class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 5.2 # config/application.rb …
user2012677
  • 5,465
  • 6
  • 51
  • 113
6
votes
3 answers

Rails 6+, zeitwerk autoloader and namedspaced constants

The Rails 6+ default autoloader is zeitwerk, which seems like a great improvement over previous approaches. However, zeitwork follows the convention for Rails projects that anything in app/* is autoloaded and doesn't need to be namespaced. This…
Dan L
  • 4,319
  • 5
  • 41
  • 74
6
votes
2 answers

dotenv gem doesn't get variables in Rails 6 or Ruby 2.6.5

I was using the dotenv gem to store environmental variables for development in a secrets file. The gem is no longer pulling the variables after upgrading ruby and rails on my computer. To try and track down the cause, and after a while of trying…
6
votes
2 answers

how fix error? ' ....rubocop- ... revealed dependencies not in the API ..."

how do I fix this error? +bundle install --jobs 3 --full-index --retry 3 --deployment Warning: the running version of Bundler (1.17.2) is older than the version that created the lockfile (1.17.3). We suggest you upgrade to the latest version of…
american-ninja-warrior
  • 7,397
  • 11
  • 46
  • 80
6
votes
4 answers

Webpacker throws application.css not found in manifest.json in *Rails 6* application

Currently we use Rails 6 for our application. It's working fine in production but in development mode it throws some errors. Please assist me. This is how my application.js and application.css looks…
Siva Ganesh
  • 1,415
  • 2
  • 16
  • 28
6
votes
1 answer

Rails 6 ActiveJob undefined constant ActionMailer::MailDeliveryJob

I'm upgrading an app to Rails 6 and after fixing all breaking changes I'm now facing an error when sending emails from background jobs. I use Sidekiq through ActiveJob and I believe I've added the necessary config changes: #…