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."
Questions tagged [ruby-on-rails-6]
2084 questions
8
votes
1 answer
Error: Cannot find module '@rails/webpacker' rails 6
When I run my Rails 6.0 application on development environment I get the next trace on the development.log
[Webpacker] Compiling…
[Webpacker] Compilation failed:
/home/alejo/rails_project/node_modules/webpack-cli/bin/cli.js:93
throw…

Alejo Dev
- 2,290
- 4
- 29
- 45
8
votes
4 answers
$(...).tooltip is not a function rails 6 webpack
I have tried changing the versions of bootstrap, jquery, and popper but no luck. I don't think I am using more than one version of jquery. Not sure where it went wrong. It would be great if someone helps me to find what I am missing.
Here is my…

Sri
- 2,233
- 4
- 31
- 55
8
votes
1 answer
Handle some rows differently on upsert -> exists?
I'm using Rails 6 and the new upsert_all method.
This is super useful, however, there are some questions I have about how to add columns only if it's a new record. Take for instance, the created_at column.
If the record is new, you would want to add…

Tallboy
- 12,847
- 13
- 82
- 173
8
votes
4 answers
Rails 6 and Tailwind CSS does not deploy to Heroku
I have a Rails 6 app that was successfully deployed to Heroku and worked on localhost:3000.
I added tailwindcss via yarn and webpack. It runs perfectly fine on localhost, but does not run on heroku. When I run heroku logs I get the following…

David Lee
- 571
- 6
- 20
8
votes
2 answers
Blocked host: localhost ruby on rails 6.0.0
I am developing my first rails 6 app but when I try to serve it in development environment behind my nginx server, I find this message
I tried adding the configuration mentioned in the error in config/environments/development.rb and in…

Alejo Dev
- 2,290
- 4
- 29
- 45
8
votes
5 answers
Many default routes in rails 6?
How do I remove the default routes in Rails 6?
I just installed Rails 6.0.0 and ran 'rails new blog'. I went to take a look at the routes and found a ton of routes (see below). I've tried creating several new projects and they all have the same…

Ahmed El Bannan
- 83
- 1
- 3
8
votes
2 answers
Rails Action Text for existing text field
I am upgrading one of my news app to Rails 6.0.0. While working around I got a problem using Rich Text. My app is pointing the rich text body field instead of the my existing table body field.
Is it possible to use the existing table text field for…

Santosh Aryal
- 1,276
- 1
- 18
- 41
8
votes
1 answer
ActiveStorage without ActiveRecord rails 6
Is it possible to add ActiveStorage on rails 6 without adding ActiveRecord
I am using API application having only mongoDB database. Now, as I have observed that FSGrid which actually a good option, having a database size issue and we want physical…

Arpit Vaishnav
- 4,739
- 6
- 39
- 57
8
votes
1 answer
Is there a unified way to install JS third party libraries (like QuillJS) in Rails 6?
I installed Rails 6 RC1 and I wanted to create a new project with it, however it turn out to a nightmare because of the webpack default feature, am facing a hard time installing third party JS libraries, if you want to add jQuery and bootstrap for…

medBouzid
- 7,484
- 10
- 56
- 86
8
votes
1 answer
Query nested jsonb Postgres column
I have a metadata column of type jsonb.
I know how to check whether it contains a specific key:
obj = Model.create
obj.metadata = {"foo"=>"1", "bar"=>{"baz"=>{"qux"=>2}}}
obj.save
Model.where("(metadata->'bar') IS NOT NULL") # returns obj
I…

Andrey Deineko
- 51,333
- 10
- 112
- 145
8
votes
2 answers
Rails action Mailer raise_delivery_errors, how does it works? How to detect bounces?
I have a Rails 4.2.0 application which sends lots of mails, it's a elearning platfrom.
At the moment I have problems with bounces, Lots of the Mails coming back because the Mail-Adresses aren't valid.
One way is to solve the problem manually,…

Felix
- 5,452
- 12
- 68
- 163
8
votes
3 answers
What is the equivalent of <% debug @variable %> for Haml?
I have an annoying view problem that I'm trying to debug and no where on the Haml Documentation Haml Docs does it specify how to debug view code. This is very annoying and all I need is to debug a variable. Can someone please help me with this?…

Dan Rubio
- 4,709
- 10
- 49
- 106
7
votes
2 answers
DEPRECATION WARNING: Initialization autoloaded the constants ActionText::ContentHelper and ActionText::TagHelper
I'm trying to understand the deprecation warning:
DEPRECATION WARNING: Initialization autoloaded the constants
ActionText::ContentHelper and ActionText::TagHelper.
Being able to do this is deprecated. Autoloading during initialization is
going
to…

karns
- 5,391
- 8
- 35
- 57
7
votes
1 answer
Rails 6.1 upgrade: undefined method `assert_nothing_raised'
I'm running into this error when upgrading from Rails 6.0.3 to 6.1:
NoMethodError:
undefined method `assert_nothing_raised' for #
Did you mean? assert_raises
This happens every time a…

alf
- 18,372
- 10
- 61
- 92
7
votes
2 answers
Psych::DisallowedClass while updating a rails ActiveModel entry
This is a little weird, I am trying to update an ActiveModel entry via rails_admin console and updating any attribute on the model throws the error Psych::DisallowedClass. Looks to me like the error is only thrown when the Model has some serialized…

cosmo10
- 145
- 2
- 8