ruby-on-rails-5 Questions

8

Solved

I simply can't get past the message: Missing `secret_key_base` for 'production' environment, set this string with `rails credentials:edit` (ArgumentError) I have Rails 5.2.0, and ran EDITOR=vim...
Mensal asked 22/7, 2018 at 16:3

1

In my Rails 5 app, if I load Bootstrap 4 using a header <script> tag from a CDN, everything works fine. But when I install Bootstrap (and its dependencies) to node_modules, and serve it with ...
Asset asked 9/5, 2020 at 23:42

2

I am coding a rake task which function is getting info from other webpage. To do that I use open-uri and nokogiri. I have tested in development and it does the job, but then I deploy to the product...

1

I obtained the following jwks from the server "keys": [ { "kty": "RSA", "e": "AQAB", "use": "sig", "alg": "RS256", "kid": "92595710205972640", "n": "l75bY3woSGVAYYDR6qE0tbzxqpYLr1-zz_ShSiF...
Blubber asked 2/4, 2020 at 9:47

7

Solved

In a Rails controller, I can set a cookie like this: cookies[:foo] = "bar" And specify that the "secure" (https-only) flag be on like this: cookies[:foo, :secure => true] = "bar" :secure i...
Averyaveryl asked 22/9, 2010 at 21:1

2

Solved

Following a guide, I ran the following command: rails g migration CreateSnippetsUsers snippet:belongs_to user:belongs_to This created the following migration: class CreateSnippetsUsers < Act...

2

Solved

First of all I want simply get an object inside the current object that I'm sending to my backend. I have this simple JSON (generated from a form): { "name": "Project 1", "project_criteria": [ ...
Mcculley asked 19/8, 2016 at 19:37

1

I want to scale separately some subparts of my rails app and avoid loading the whole codebase. For the sake of example, let's consider an APIv1 vs an APIv2, but I'd also want to extend this any cl...
Varicella asked 24/5, 2017 at 10:47

2

Hi I am trying to run the rails app inside a docker in production mode. it is throwing below error. Message from application: Invalid option key: raise_on_unfiltered_parameters= (RuntimeError) B...
Pellegrini asked 24/10, 2017 at 8:34

1

I just upgraded my Dropbox account from a personal account to a business account. As a result it changed my main dropbox name from just 'Dropbox' to 'Company Name Dropbox'. Now when I try to either...
Strong asked 20/6, 2020 at 22:47

4

Solved

I have a column amount_splits that I need to save my JSON to in the key order I've specified. How do I prevent Rails / Postgres jsonb from auto sorting my JSON keys when I save it to the database?...
Vanegas asked 31/8, 2018 at 22:12

1

I'm trying to deploy my rails app to the Heroku using heroku.yml. This is my yml setup setup: addons: - plan: cleardb-mysql as: DATABASE build: docker: web: Dockerfile config: RAILS_ENV: dev...
Davinadavine asked 2/7, 2020 at 11:39

3

Solved

The descriptions here seem to imply that stream_for is used only when passing in a record, but overall the documentation is rather vague. Can anyone explain the differences between stream_from and ...
Keyte asked 17/8, 2016 at 16:45

2

I am using turbolinks 5 beta 1 and for some specific pages I want to load an external javascript file. In my example I have a contacts page where I want to display a map by loading google maps api...
Abstract asked 21/2, 2016 at 21:39

1

I have been using Rails ActiveStorage DirectUpload in my Rails app. And here is the code of the form: <h3>Select Files To Upload</h3> <%= form_for @uploader, url: uploaders_file_pa...

2

Solved

I've whitelisted the params like so: permit_params(%i{identity os current_ip clients site_ids sites domains}) but I get the following in the log: {"utf8"=>"✓", "_method"=>"patch", "authe...
Walli asked 2/10, 2017 at 7:53

1

Solved

I am using jquery-datatables-rails gem in my application. I want to add feature multi-select in my application. on multi-select, I want to set projectdirector table status at once on submission. to...
Antipathetic asked 14/6, 2020 at 15:58

10

Solved

module ApplicationCable class Connection < ActionCable::Connection::Base identified_by :current_user def connect #puts params[:auth_token] self.current_user = find_verified_user logger.ad...
Quits asked 19/2, 2016 at 9:37

1

I have some code in my concerns that I want to call from Action Cable Channel. Say I have notification channel and I want to call my concerns to update some values and it does call the method bu...
Messene asked 20/3, 2017 at 21:52

2

Rails app which handle and activation of a license using an external service, the external service sometime delays the handling of rails request to over 30s, which will then return an error to fron...
Saxena asked 6/10, 2018 at 11:21

2

I'm working in a legacy Rails app that has been diligently upgraded with each major version of Rails and we're currently on rails 5.1 and I can't get a before_destroy to prevent the deletion if it ...
Hermaphroditism asked 28/6, 2018 at 2:29

4

Solved

I have the following model class Measurement < ApplicationRecord belongs_to :examination, class_name: "TestStructure", foreign_key: "examination_id" end The association is actually made to ...
Percept asked 29/8, 2017 at 19:49

3

We have been using ActionCable on Heroku for some time, and overall it works well. However, we see the H15 Idle Connection error many times per day. They always have path=/cable and a long service ...
Overcash asked 4/12, 2016 at 16:36

3

Solved

I am trying to implement authorization on the websocket connection (rails 5.2.1) Following the rubyonrails guideline, I have created the connection.rb as follows: # app/channels/application_cable...
Booker asked 7/10, 2018 at 18:43

2

Solved

How do I set a fallback locale in Rails 5.2? Right now it prints ''(blank) for attribute names if not found in locale. I would like it to fallback to :en when that happens. Rails 5 specific? # ...
Intersex asked 20/11, 2018 at 17:21

© 2022 - 2024 — McMap. All rights reserved.